ArcVideoStream

@JsonClass(generateAdapter = true)
data class ArcVideoStream(    val type: String,     @Json(name = "_id") val id: String,     val uuid: String?,     val version: String?,     @Json(name = "canonical_url") val canonicalUrl: String,     @Json(name = "short_url") val shortUrl: String?,     @Json(name = "created_date") val createdDate: String,     @Json(name = "last_updated_date") val lastUpdatedDate: String,     @Json(name = "published_date") val publishedDate: String?,     @Json(name = "first_publish_date") val firstPublishDate: String,     @Json(name = "display_date") val displayDate: String,     val headlines: Headlines?,     val subheadlines: Subheadlines?,     val description: Description?,     val credits: Credits?,     val taxonomy: Taxonomy?,     @Json(name = "additional_properties") val additionalProperties: AdditionalProperties?,     val duration: Long?,     @Json(name = "video_type") val videoType: String,     val streams: List<Stream>,     val subtitles: SubtitleUrls?,     @Json(name = "promo_image") val promoImage: PromoItemBasic,     var adTagUrl: String? = null,     val status: String? = null)

What is it?

This class holds the data for an individual video object returned from one of the ArcMediaClient API calls.

How does it relate to other important Video SDK classes

The ArcMediaClient API calls will return a list that will contain 0 or more of these objects. Each one can be sent to an ArcMediaPlayer object and played.

What are the core components that make it up?

This is a data class that has only one method, findBestStream(), which calculates the best stream to use when playing a video based upon passed in parameters.

Constructors

Link copied to clipboard
fun ArcVideoStream(    type: String,     @Json(name = "_id") id: String,     uuid: String?,     version: String?,     @Json(name = "canonical_url") canonicalUrl: String,     @Json(name = "short_url") shortUrl: String?,     @Json(name = "created_date") createdDate: String,     @Json(name = "last_updated_date") lastUpdatedDate: String,     @Json(name = "published_date") publishedDate: String?,     @Json(name = "first_publish_date") firstPublishDate: String,     @Json(name = "display_date") displayDate: String,     headlines: Headlines?,     subheadlines: Subheadlines?,     description: Description?,     credits: Credits?,     taxonomy: Taxonomy?,     @Json(name = "additional_properties") additionalProperties: AdditionalProperties?,     duration: Long?,     @Json(name = "video_type") videoType: String,     streams: List<Stream>,     subtitles: SubtitleUrls?,     @Json(name = "promo_image") promoImage: PromoItemBasic,     adTagUrl: String? = null,     status: String? = null)

Create empty Arc video stream

Functions

Link copied to clipboard
fun findBestStream(preferredtype: ArcXPVideoConfig.PreferredStreamType, preferredbitrate: Int): Stream?

This algorithm iterates through the streams looking for one that is of the preferred type and comes closest to matching the max bitrate. If a match is not found it uses recursion to call the algorithm again with the next preferred stream type (the order is HLS, TS, MP4, GIF, GIF-MP4) until we get a match or we have exhausted our preferred types.

Properties

Link copied to clipboard
val additionalProperties: AdditionalProperties?
Link copied to clipboard
var adTagUrl: String? = null
Link copied to clipboard
val canonicalUrl: String
Link copied to clipboard
val createdDate: String
Link copied to clipboard
val credits: Credits?
Link copied to clipboard
val description: Description?
Link copied to clipboard
val displayDate: String
Link copied to clipboard
val duration: Long?
Link copied to clipboard
val firstPublishDate: String
Link copied to clipboard
val headlines: Headlines?
Link copied to clipboard
val id: String
Link copied to clipboard
val lastUpdatedDate: String
Link copied to clipboard
val promoImage: PromoItemBasic
Link copied to clipboard
val publishedDate: String?
Link copied to clipboard
val shortUrl: String?
Link copied to clipboard
val status: String? = null
Link copied to clipboard
val streams: List<Stream>
Link copied to clipboard
val subheadlines: Subheadlines?
Link copied to clipboard
val subtitles: SubtitleUrls?
Link copied to clipboard
val taxonomy: Taxonomy?
Link copied to clipboard
val type: String
Link copied to clipboard
val uuid: String?
Link copied to clipboard
val version: String?
Link copied to clipboard
val videoType: String

Extensions

Link copied to clipboard
fun ArcVideoStream.isLive(): Boolean
Link copied to clipboard
fun ArcVideoStream.url(): String