Player Types Reference
LuraTrack
sealed class LuraTrack
LuraTracks
Parameter | Type | Description |
---|---|---|
video | List<LuraTrack.Video> | Video tracks of current media |
audio | List<LuraTrack.Audio> | Audio tracks of current media |
caption | List<LuraTrack.Text> | Text tracks of current media |
@Serializable
data class LuraTracks(
val video: List<LuraTrack.Video> = emptyList(),
val audio: List<LuraTrack.Audio> = emptyList(),
val caption: List<LuraTrack.Text> = emptyList()
)
LuraTrack.Video
Parameter | Type | Description |
---|---|---|
groupIndex | Int | Index of track group |
index | Int | Index of track |
isAdaptiveSupported | Boolean | Is video track support adaptive |
id | String? | ID of track |
width | Int? | Width of video track |
height | Int? | Height of video track |
bitrate | Int? | Bitrate of video track |
language | String? | Language of video track |
frameRate | Float | Frame rate of video track |
active | Boolean | Is video track selected |
isCurrent | Boolean | Is current video track selected |
@Serializable
data class Video(
val groupIndex: Int = -1,
val index: Int = -1,
val isAdaptiveSupported: Boolean = false,
val id: String? = null,
val width: Int? = null,
val height: Int? = null,
val bitrate: Int? = null,
val language: String? = "",
val frameRate: Float = 30.0f,
var active: Boolean = false
var isCurrent: Boolean = false
) : LuraTrack
LuraTrack.Audio
Parameter | Type | Description |
---|---|---|
groupIndex | Int | Index of track group |
index | Int | Index of track |
isAdaptiveSupported | Boolean | Is audio track support adaptive |
id | String? | ID of track |
bitrate | Int? | Bitrate of audio track |
language | String? | Language of audio track |
channels | Int? | Frame rate of audio track |
active | Boolean | Is audio track selected |
@Serializable
data class Audio(
val groupIndex: Int = -1,
val index: Int = -1,
val isAdaptiveSupported: Boolean = false,
val id: String? = null,
val bitrate: Int? = null,
val language: String? = "",
val channels: Int? = null,
var active: Boolean = false
) : LuraTrack
LuraTrack.Text
Parameter | Type | Description |
---|---|---|
groupIndex | Int | Index of track group |
index | Int | Index of track |
isAdaptiveSupported | Boolean | Is text track support adaptive |
id | String? | ID of track |
language | String? | Language of text track |
active | Boolean | Is text track selected |
@Serializable
data class Text(
val groupIndex: Int = -1,
val index: Int = -1,
val id: String? = null,
val language: String? = "Off",
var active: Boolean = false
) : LuraTrack
LuraConfiguration
Parameter | Type | Description |
---|---|---|
name | String? | Configuration name |
lura | Lura? | Credentials for lura backend |
controls | LuraControlsConfiguration | Controls configuration |
content | LuraContent? | Content configuration |
offlinePlayback | LuraOfflineConfiguration? | Offline configuration |
cast | LuraCastConfiguration? | Cast configuration |
ads | LuraAdsConfiguration? | Ads configuration |
plugins | LuraPluginsConfigurations? | Plugin Configurations |
@Serializable
data class LuraConfiguration(
val name: String? = null,
val lura: Lura? = null,
val controls: LuraControlsConfiguration = LuraControlsConfiguration(),
val content: LuraContent? = null,
val offlinePlayback: LuraOfflineConfiguration? = null,
val cast: LuraCastConfiguration? = null,
val ads: LuraAdsConfiguration? = null,
val plugins: LuraPluginsConfigurations? = null
)
Lura
Parameter | Type | Description |
---|---|---|
appKey | String | Lura configuration app key |
assetId | String | Lura asset id |
token | String | Lura token |
data class Lura(val appKey: String, val assetId: String)
// or
data class Lura(val token: String)
LuraControlsConfiguration
Parameter | Type | Description |
---|---|---|
autoplay | Boolean | Is autoplay enabled |
enabled | Boolean | Is controls enabled |
muted | Boolean | Is muted |
volume | Double | Volume value |
@Serializable
data class LuraControlsConfiguration(
val autoplay: Boolean = true,
val enabled: Boolean = true,
val muted: Boolean = true,
val volume: Double = 0.9
)
LuraContent
Parameter | Type | Description |
---|---|---|
media | List<LuraMedia> | List of medias for content |
preferredDRMSystems | List<String> | Preferred DRM sustems |
id | String | Content id |
title | String | Content title |
startAt | Double | Content starting point (in seconds) |
description | String? | Content description |
language | String? | Language |
type | LuraVideoType | Video type |
annotations | List<LuraAnnotation> | Video type |
@Serializable
data class LuraContent(
val media: List<LuraMedia> = emptyList(),
val preferredDRMSystems: List<String> = emptyList(),
val id: String = "",
val title: String = "",
val startAt: Double = 0.0,
val description: String? = null,
val language: String? = null,
val type: LuraVideoType? = null,
val annotations: List<LuraAnnotation>? = null,
)
LuraAnnotation
Field | Type | Description |
---|---|---|
start | number | Starting time of the annotation |
end | number | Ending time of the annotation |
type | string | Type of the annotation (e.g. intro, outro) |
label | string | Label for the annotation |
@Serializable
data class LuraAnnotation(
val start: Double = 0.0,
val end: Double = 0.0,
val type: String = "",
val label: String? = null,
)
LuraOfflineConfiguration
Parameter | Type | Description |
---|---|---|
resolution | LuraOfflineVideoResolution | Resolution of video rendition |
@Serializable
data class LuraOfflineConfiguration(
val resolution: LuraOfflineVideoResolution = LuraOfflineVideoResolution.HD,
)
LuraCastConfiguration
Parameter | Type |
---|---|
chromecast | LuraChromecastConfiguration |
@Serializable
data class LuraCastConfiguration(
val chromecast: LuraChromecastConfiguration = LuraChromecastConfiguration()
)
LuraChromecastConfiguration
Parameter | Type | Description |
---|---|---|
enabled | Boolean | List of medias for content |
@Serializable
data class LuraChromecastConfiguration(val enabled: Boolean = false)
LuraAdsConfiguration
Parameter | Type | Description |
---|---|---|
macros | Map<String, Any?>? | Macros |
clientSide | LuraClientSideConfiguration? | Client-side configurations |
serverSide | LuraServerSideConfiguration? | Server-side configurations |
@Serializable
data class LuraAdsConfiguration(
val macros: Map<String, Any?>? = null,
val clientSide: LuraClientSideConfiguration? = null,
val serverSide: LuraServerSideConfiguration? = null
)
LuraPluginsConfigurations
Parameter | Type | Description |
---|---|---|
adobeMediaAnalytics | AdobeMediaAnalyticsConfiguration? | Adobe Media Analytics configuration |
comscore | ComscoreConfiguration? | Comscore configuration |
conviva | ConvivaConfiguration? | Conviva configuration |
nielsen | NielsenConfiguration? | Nielsen configuration |
openMeasurement | OpenMeasurementConfiguration? | Open Measurement configuration |
pal | PalConfiguration? | PAL configuration |
@Serializable
data class LuraPluginsConfigurations(
val adobeMediaAnalytics: AdobeMediaAnalyticsConfiguration? = null,
val comscore: ComscoreConfiguration? = null,
val conviva: ConvivaConfiguration? = null,
val nielsen: NielsenConfiguration? = null,
val openMeasurement: OpenMeasurementConfiguration? = null,
val pal: PalConfiguration? = null
)
LuraVideoType
Parameter | Type |
---|---|
type | String |
@Serializable(with = LuraVideTypeSerializer::class)
enum class LuraVideoType(val type: String) {
LIVE("LIVE"),
VOD("VOD"),
LINEAR("LINEAR"),
NONE("NONE");
}
LuraMediaFormat
Parameter | Type |
---|---|
format | String |
@Serializable(with = LuraMediaFormatsSerializer::class)
enum class LuraMediaFormat(val format: String) {
DASH("dash"),
M3U8_VARIANT("m3u8-variant"),
MP4("mp4"),
NONE("");
}
LuraTrickPlayInformation
Parameter | Type | Description |
---|---|---|
width | Int | Width of trick play |
height | Int | Height of trick play |
@Serializable
data class LuraTrickPlayInformation(val width: Int, val height: Int)
LuraAdBreak
Parameter | Type | Description |
---|---|---|
id | String | An identifier for the Ad Break |
offset | Double | Start time of the ad in seconds. |
ads | List<LuraAd> | Ads of the ad break |
watched | Boolean | A parameter representing whether the ad break is watched or not. |
totalAds | Int | Count of the ads in the ad break. |
breakDuration | Double | Duration of the ad break. |
@Serializable
open class LuraAdBreak(
val id: String = System.currentTimeMillis().toString(),
val offset: Double,
val ads: List<LuraAd> = emptyList(),
val watched: Boolean = false,
val totalAds: Int,
val breakDuration: Double,
)
LuraAd
Parameter | Type | Description |
---|---|---|
duration | Double | Duration of the ad in seconds. |
skipOffset | Double | Skip offset of the ad in seconds. |
title | String? | Title of the ad. |
description | String? | Description of the ad. |
companions | List<LuraAdCompanion>? | Data for the companion ads. |
icon | List<LuraAdIcon>? | Data for the ad icons. |
interactiveFiles | List<LuraInteractiveFile>? | Interactive creative files. |
isClickable | Boolean | Is Ad has ClickThrough url. |
@Serializable
open class LuraAd(
open var duration: Double = 0.0,
open var skipOffset: Double = 0.0,
open val title: String? = null,
open val description: String? = null,
open val companions: List<LuraAdCompanion>? = null,
open val icon: List<LuraAdIcon>? = null,
open val interactiveFiles: List<LuraInteractiveFile>? = null,
open val isClickable: Boolean = false,
)
LuraAdCompanion
Parameter | Type | Description |
---|---|---|
id | String? | An optional identifier for the creative. |
apiFramework | String? | The API necessary to communicate with the creative if available. |
width | String? | The pixel width of the placement slot for which the creative is intended. |
height | String? | The pixel height of the placement slot for which the creative is intended. |
assetWidth | String? | The pixel width of the creative. |
assetHeight | String? | The pixel height of the creative. |
expandedWidth | String? | The maximum pixel width of the creative in its expanded state. |
expandedHeight | String? | The maximum pixel height of the creative in its expanded state. |
adSlotId | String? | Used to identify desiredplacement on a publisher’spage. Values to be used should be discussed between publishers and advertisers |
pxratio | String? | The pixel ratio for which the companion creative is intended. The pixel ratio is the ratio of physical pixels on the device to the device-independent pixels. An ad intended for display on a device with a pixel ratio that is twice that of a standard 1:1 pixel ratio would use the value "2." Default value is "1." |
renderingMode | String? | Used to indicate when and where to use this companion ad. Values can be “default” or “end-card” or “concurrent”. If this field is empty or not given, “default” will be used. |
altText | String? | A string to describe the creative when an ad viewer mouses over the ad. |
clickThrough | String? | A URI to the advertiser’s page that should open when the viewer clicks the companion ad. |
clickTracking | List<String>? | A URI to a tracking resource file used to track a companion clickthrough |
type | String? | Resource type of the creative |
creativeType | String? | Mime type of the creative |
data | String? | Data of the creative, URL for static and iframe resources, html code snippet for html resource. Check the type field for the resource type |
tracking | List<LuraAdCompanionTracking>? | racking events of the companion |
@Serializable
data class LuraAdCompanion(
val id: String? = null,
val apiFramework: String? = null,
val width: String? = null,
val height: String? = null,
val assetWidth: String? = null,
val assetHeight: String? = null,
val expandedWidth: String? = null,
val expandedHeight: String? = null,
val adSlotId: String? = null,
val pxratio: String? = null,
val renderingMode: String? = null,
val altText: String? = null,
val clickThrough: String? = null,
val clickTracking: List<String>? = null,
val type: String? = null,
val creativeType: String? = null,
val data: String? = null,
val tracking: List<LuraAdCompanionTracking>? = null,
)
LuraInteractiveFile
Parameter | Type | Description |
---|---|---|
apiFramework | String? | Identifies the API needed to execute the resource file if applicable |
type | String? | Identifies the MIME type of the file provided. |
url | String? | URI to a file providing creative functions for the media file. |
variableDuration | Boolean? | Useful for interactive use cases. Identifies whether the ad always drops when the duration is reached, or if it can potentially extend the duration by pausing the underlying video or delaying the adStopped call after adVideoComplete. If set to true, the extension of the duration should be user-initiated (typically, by engaging with an interactive element to view additional content). |
@Serializable
data class LuraInteractiveFile(
val apiFramework: String? = null,
val type: String? = null,
val url: String? = null,
val variableDuration: Boolean? = null,
)
LuraAdCompanionTracking
Parameter | Type | Description |
---|---|---|
offset | String? | Offset for progress trackings |
type | String? | Type of the tracking event. |
url | String? | A URI to the tracking resource for the event specified using the event attribute. |
@Serializable
data class LuraAdCompanionTracking(
val type: String?,
val url: String?,
val offset: String? = null,
)
LuraAdIcon
Parameter | Type | Description |
---|---|---|
program | String? | The program represented in the icon. |
width | String? | Pixel width of the icon asset |
height | String? | Pixel height of the icon asset. |
xPosition | String? | The x-coordinate of the top, left corner of the icon asset relative to the ad display area. Values of "left" or "right" also accepted and indicate the leftmost or rightmost available position for the icon asset. |
yPosition | String? | The y-coordinate of the top left corner of the icon asset relative to the ad display area; values of"top" or "bottom" also accepted and indicate the topmost or bottommost available position for the icon asset. |
duration | String? | The duration the icon should be displayed unless clicked or ad is finished playing in seconds. |
offset | String? | The time of delay from when the associated linear creative begins playing to when the icon should be displayed in seconds. |
apiFramework | String? | Identifies the API needed to execute the icon resource file if applicable. |
pxRatio | String? | The pixel ratio for which the icon creative is intended. The pixel ratio is the ratio of physical pixels on the device to the device-independent pixels. An ad intended for display on a device with a pixel ratio that is twice that of a standard 1:1 pixel ratio would use the value "2 " Default value is "1 ". |
clicks | String? | Icon clicks |
type | String? | Resource type of the creative |
creativeType | String? | Mime type of the creative |
data | String? | Data of the creative, URL for static and iframe resources, html code snippet for html resource. Check the type field for the resource type |
@Serializable
data class LuraAdIcon(
val program: String? = null,
val width: String? = null,
val height: String? = null,
val xPosition: String? = null,
val yPosition: String? = null,
val duration: Double? = null,
val offset: String? = null,
val apiFramework: String? = null,
val pxRatio: String? = null,
val clicks: LuraAdClicks? = null,
val type: String? = null,
val creativeType: String? = null,
val data: String? = null,
)
LuraAdClicks
Parameter | Type | Description |
---|---|---|
clickThrough | String? | A URI to the industryprogram page opened when a viewer clicks the icon. |
clickTracking | List<LuraAdClickTracking>? | Track click activity within the icon. |
@Serializable
data class LuraAdClicks(
val clickThrough: String? = null,
val clickTracking: List<LuraAdClickTracking>? = null,
)
LuraClickTracking
Parameter | Type | Description |
---|---|---|
id | String? | An id for the click to be measured. |
url | String? | A URI to the tracking resource file to be called when a click corresponding to the id attribute (if provided) occurs. |
@Serializable
data class LuraAdClickTracking(
val id: String? = null,
val url: String? = null,
)
LuraCastTargets
Parameter | Type |
---|---|
target | String |
enum class LuraCastTargets(private val target: String) {
CHROMECAST("chromecast")
}
LuraMedia
Parameter | Type | Description |
---|---|---|
type | String | Media type |
url | String | Media url |
licenseUrl | String? | DRM license url |
height | Int | Media height |
width | Int | Media width |
language | String | Media language |
@Serializable
data class LuraMedia(
val type: String,
val url: String,
val licenseUrl: String? = null,
val height: Int = 0,
val width: Int = 0,
val language: String? = null,
)
LuraEventListener
typealias LuraEventListener = FlowCollector<LuraEvent>
LuraAvailabilityWindow
Parameter | Type | Description |
---|---|---|
id | String | Identifier for the availability window |
start | Double | Start time of the availability window |
end | Double | End time of the availability window |
@Serializable
data class LuraAvailabilityWindow(
val id: String,
val start: Double,
val end: Double,
)
LuraScreenState
@Serializable
enum class LuraScreenState {
@SerialName("FULLSCREEN")
FULLSCREEN,
@SerialName("PICTURE_IN_PICTURE")
PICTURE_IN_PICTURE,
@SerialName("WINDOWED")
WINDOWED,
}