All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.app.bsky.embed.video.kt Maven / Gradle / Ivy

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()}"
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy