commonMain.app.bsky.embed.video.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluesky Show documentation
Show all versions of bluesky Show documentation
Bluesky Social API bindings for Kotlin.
The newest version!
@file:Suppress("DEPRECATION")
package app.bsky.embed
import kotlin.String
import kotlin.Suppress
import kotlinx.collections.immutable.persistentListOf
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.model.Blob
import sh.christian.ozone.api.model.ReadOnlyList
/**
* @param alt Alt text description of the video, for accessibility.
*/
@Serializable
public data class Video(
public val video: Blob,
public val captions: ReadOnlyList = persistentListOf(),
/**
* Alt text description of the video, for accessibility.
*/
public val alt: String? = null,
public val aspectRatio: AspectRatio? = null,
) {
init {
require(captions.count() <= 20) {
"captions.count() must be <= 20, but was ${captions.count()}"
}
require(alt == null || alt.count() <= 10_000) {
"alt.count() must be <= 10_000, but was ${alt?.count()}"
}
}
}