Player Types Reference
Tracks
Tracks
| Parameter | Type | Description |
|---|---|---|
video | VideoTrack? | Video tracks |
audio | AudioTrack? | Audio tracks |
caption | CaptionTrack? | Caption tracks |
viewGrid | ViewGrid? | View grid tracks |
public struct Tracks: Codable {
public var video: [VideoTrack]?
public var audio: [AudioTrack]?
public var caption: [CaptionTrack]?
public var viewGrid: [ViewGrid]?
}
VideoTrack
| Parameter | Type | Description |
|---|---|---|
active | Bool | Track is active |
width | Int? | Video width |
height | Int? | Video height |
bitrate | Int? | Bitrate |
language | String? | Language |
public struct VideoTrack: Codable {
public var active: Bool
public var width: Int?
public var height: Int?
public var bitrate: Int?
public var language: String?
}
AudioTrack
| Parameter | Type | Description |
|---|---|---|
active | Bool | Track is active |
label | String? | Track label |
language | String? | Language |
channels | Int? | Audio channels |
public struct AudioTrack: Codable {
public var active: Bool
public var label: String?
public var language: String?
public var channels: Int?
}
CaptionTrack
| Parameter | Type | Description |
|---|---|---|
active | Bool? | Track is active |
language | String | Language |
type | String | Caption type |
label | String? | Track label |
public struct CaptionTrack: Codable {
public var active: Bool?
public var language: String
public var type: String
public var label: String?
}
ViewGrid
| Parameter | Type | Description |
|---|---|---|
gridId | String? | Grid identifier |
audioLabel | String? | Audio label |
left | Double? | Left position (relative) |
top | Double? | Top position (relative) |
width | Double? | Width (relative) |
height | Double? | Height (relative) |
active | Bool | Grid is active |
isComposite | Bool | Composite grid |
public struct ViewGrid: Codable {
public var gridId: String?
public var audioLabel: String?
public var left: Double?
public var top: Double?
public var width: Double?
public var height: Double?
public var active: Bool
public var isComposite: Bool
}
Configuration
LuraPlayerConfiguration
| Parameter | Type | Description |
|---|---|---|
debug | Bool? | Enables debug logging |
playerOpsKey | String? | Identifier for log tracking |
name | String? | Human-readable player instance name |
lura | Lura | MCP configuration |
content | LuraContent | Manual content configuration |
controls | LuraControl | Player controls settings |
analytics | LuraAnalyticsConfiguration | Analytics configuration |
ads | LuraAdsConfiguration | Ads configuration |
cast | LuraCastConfiguration | Cast configuration |
plugins | LuraPlugins | Plugin configurations |
license | LuraLicense | DRM license configuration |
initialization | LuraInitialization | Initial playback state |
latency | LuraLatencyConfiguration | Latency mode availability |
offline | LuraOfflineConfiguration | Offline playback configuration |
concurrency | LuraConcurrencyConfiguration | Concurrency limiting |
system | LuraSystemConfiguration | System metadata |
teasers | LuraTeasersConfiguration | Teaser content |
nxs | LuraNxsConfiguration | NXS request configuration |
highlights | LuraHighlight | Highlight content |
avCoreConfig | LuraAvCoreConfig | AVCore platform overrides |
public struct LuraPlayerConfiguration: Codable {
public var debug: Bool?
public var playerOpsKey: String?
public var name: String?
public var lura: Lura?
public var content: LuraContent?
public var controls: LuraControl?
public var analytics: LuraAnalyticsConfiguration?
public var ads: LuraAdsConfiguration?
public var cast: LuraCastConfiguration?
public var plugins: LuraPlugins?
public var license: LuraLicense?
public var initialization: LuraInitialization?
public var latency: LuraLatencyConfiguration?
#if os(iOS)
public var offline: LuraOfflineConfiguration?
#endif
public var concurrency: LuraConcurrencyConfiguration?
public var system: LuraSystemConfiguration?
public var teasers: LuraTeasersConfiguration?
public var nxs: LuraNxsConfiguration?
public var highlights: LuraHighlight?
public var avCoreConfig: LuraAvCoreConfig?
}
info
The offline property is available on iOS only.
Lura
| Parameter | Type | Description |
|---|---|---|
appKey | String? | Lura app key |
assetId | String? | Lura asset ID |
token | String? | Lura token |
public struct Lura: Codable {
public var appKey: String?
public var assetId: String?
public var token: String?
}
LuraControl
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | Controls enabled |
autoplay | Bool? | Autoplay enabled |
muted | Bool? | Muted state |
volume | Double? | Volume level |
theme | String? | UI theme |
layout | String? | UI layout |
loop | Bool? | Loop enabled |
public struct LuraControl: Codable {
public var enabled: Bool?
public var autoplay: Bool?
public var muted: Bool?
public var volume: Double?
public var theme: String?
public var layout: String?
public var loop: Bool?
}
LuraLicense
| Parameter | Type | Description |
|---|---|---|
licenseKey | String? | License key |
url | String? | License URL |
data | String? | License data |
public struct LuraLicense: Codable {
public var licenseKey: String?
public var url: String?
public var data: String?
}
LuraSystemConfiguration
| Parameter | Type | Description |
|---|---|---|
ts | Double? | System timestamp |
public class LuraSystemConfiguration: Codable {
public var ts: Double?
}
LuraConcurrencyConfiguration
| Parameter | Type | Description |
|---|---|---|
accountId | String? | Account ID |
deviceId | String? | Device ID |
enabled | Bool? | Concurrency check enabled |
max | Int? | Maximum concurrent streams |
public struct LuraConcurrencyConfiguration: Codable {
public var accountId: String?
public var deviceId: String?
public var enabled: Bool?
public var max: Int?
}
LuraTeasersConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | Teasers enabled |
mode | String? | Teaser mode |
media | [LuraMedia]? | Teaser media |
public struct LuraTeasersConfiguration: Codable {
public var enabled: Bool?
public var mode: String?
public var media: [LuraMedia]?
}
LuraNxsConfiguration
| Parameter | Type | Description |
|---|---|---|
host | String? | NXS host URL |
public struct LuraNxsConfiguration: Codable {
let host: String?
}
LuraAvCoreConfig
| Parameter | Type | Description |
|---|---|---|
ios | [String: Any]? | AVCore overrides for iOS and tvOS |
public struct LuraAvCoreConfig: Codable {
public var ios: [String: Any]?
}
Content & Media
LuraContent
| Parameter | Type | Description |
|---|---|---|
media | [LuraMedia] | Media list |
lowLatencyMedia | [LuraMedia] | Low-latency media list |
clientCertificates | ClientCertificate | Client certificate |
annotations | [Annotation] | Content annotations |
title | String? | Content title |
description | String? | Content description |
preferredDrmSystems | [String] | Preferred DRM systems |
dvr | LuraDVR | DVR configuration |
type | String? | Video type (VOD or LIVE) |
language | String? | Content language |
startAt | Double? | Start position (seconds) |
aspectRatio | String? | Aspect ratio |
public struct LuraContent: Codable {
public var media: [LuraMedia]?
public var lowLatencyMedia: [LuraMedia]?
public var clientCertificates: ClientCertificate?
public var annotations: [Annotation]?
public var title: String?
public var description: String?
public var preferredDrmSystems: [String]?
public var dvr: LuraDVR?
public var type: String?
public var language: String?
public var startAt: Double?
public var aspectRatio: String?
}
ClientCertificate
| Parameter | Type | Description |
|---|---|---|
fairplay | Fairplay | FairPlay certificate |
public struct ClientCertificate: Codable {
var fairplay: Fairplay?
}
Fairplay
| Parameter | Type | Description |
|---|---|---|
data | String? | FairPlay certificate data |
url | URL? | FairPlay certificate URL |
public struct Fairplay: Codable {
var data: String?
var url: URL?
}
LuraMedia
| Parameter | Type | Description |
|---|---|---|
url | String? | Media URL |
type | String? | Media type |
licenseUrl | String? | DRM license URL |
width | Dimension? | Media width |
height | Dimension? | Media height |
public struct LuraMedia: Codable {
public var url: String?
public var type: String?
public var licenseUrl: String?
public var width: Dimension?
public var height: Dimension?
public enum Dimension: Codable {
case int(Int)
case string(String)
}
}
Annotation
| Parameter | Type | Description |
|---|---|---|
start | Double? | Annotation start time |
end | Double? | Annotation end time |
type | String? | Annotation type |
public struct Annotation: Codable {
public var start: Double?
public var end: Double?
public var type: String?
}
LuraDVR
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | DVR enabled |
mode | LuraDVRMode? | DVR mode |
availabilityWindow | Double? | Availability window |
public struct LuraDVR: Codable {
var enabled: Bool?
var mode: LuraDVRMode?
var availabilityWindow: Double?
}
LuraDVRMode
| Case | Raw value |
|---|---|
event | "event" |
window | "window" |
public enum LuraDVRMode: String, Codable {
case event = "event"
case window = "window"
}
LuraServersideBitrateControl
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | Enable server-side bitrate manipulation |
estimatedBandwidth | Int? | Estimated network bandwidth (bps) |
public struct LuraServersideBitrateControl: Codable {
public var enabled: Bool?
public var estimatedBandwidth: Int?
}
Cast
LuraCastConfiguration
| Parameter | Type | Description |
|---|---|---|
chromecast | LuraChromecastConfiguration? | Chromecast configuration |
airplay | LuraAirplayConfiguration? | AirPlay configuration |
public struct LuraCastConfiguration : Codable {
public var chromecast : LuraChromecastConfiguration?
public var airplay : LuraAirplayConfiguration?
}
LuraChromecastConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | Chromecast enabled |
appId | String? | Chromecast app ID |
public struct LuraChromecastConfiguration : Codable {
public var enabled : Bool?
public var appId : String?
}
LuraAirplayConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | AirPlay enabled |
public struct LuraAirplayConfiguration : Codable {
public var enabled : Bool?
}
LuraCast
| Parameter | Type | Description |
|---|---|---|
chromecast | Chromecast? | Chromecast settings |
airplay | Airplay? | AirPlay settings |
public struct LuraCast: Codable {
public struct Chromecast: Codable {
var enabled: Bool?
}
public struct Airplay: Codable {
var enabled: Bool?
}
var chromecast: Chromecast?
var airplay: Airplay?
}
Chromecast
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | Chromecast enabled |
public struct Chromecast: Codable {
var enabled: Bool?
}
Airplay
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | AirPlay enabled |
public struct Airplay: Codable {
var enabled: Bool?
}
Initialization
LuraInitialization
| Parameter | Type | Description |
|---|---|---|
video | Video? | Initial video track settings |
caption | Caption? | Initial caption settings |
audio | Audio? | Initial audio track settings |
public struct LuraInitialization: Codable {
public var video: Video?
public var caption: Caption?
public var audio: Audio?
public struct Video: Codable {
public var abrEnabled: Bool?
public var preferredBitrate: Int?
public var latencyMode: LuraLatencyMode?
}
public struct Caption: Codable {
public var enabled: Bool?
public var preferredLanguage: String?
}
public struct Audio: Codable {
public var preferredLanguage: String?
}
}
Video
| Parameter | Type | Description |
|---|---|---|
abrEnabled | Bool? | Adaptive bitrate enabled |
preferredBitrate | Int? | Preferred initial bitrate |
latencyMode | LuraLatencyMode? | Initial latency mode |
public struct Video: Codable {
public var abrEnabled: Bool?
public var preferredBitrate: Int?
public var latencyMode: LuraLatencyMode?
}
Caption
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | Captions enabled at start |
preferredLanguage | String? | Preferred caption language |
public struct Caption: Codable {
public var enabled: Bool?
public var preferredLanguage: String?
}
Audio
| Parameter | Type | Description |
|---|---|---|
preferredLanguage | String? | Preferred audio language |
public struct Audio: Codable {
public var preferredLanguage: String?
}
Latency
LuraLatencyConfiguration
| Parameter | Type | Description |
|---|---|---|
allowedModes | [LuraLatencyMode: Bool]? | Allowed latency modes |
public struct LuraLatencyConfiguration: Codable {
public var allowedModes: [LuraLatencyMode: Bool]?
}
LuraLatencyMode
| Case | Raw value | Description |
|---|---|---|
DEFAULT | "def" | Default latency mode |
LOW_LATENCY | "low" | Low latency mode |
public enum LuraLatencyMode: String, Codable {
case DEFAULT = "def"
case LOW_LATENCY = "low"
}
Highlights
LuraHighlight
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | Highlights enabled |
url | String? | Highlights feed URL |
refreshPeriod | Double? | Refresh period |
autoSwitch | LuraAutoSwitch? | Auto-switch settings |
mode | String? | Highlight mode |
public struct LuraHighlight: Codable {
public var enabled: Bool?
public var url: String?
public var refreshPeriod: Double?
public var autoSwitch: LuraAutoSwitch?
public var mode: String?
}
Playlist
LuraPlaylistConfiguration
| Parameter | Type | Description |
|---|---|---|
startingIndex | Int? | Starting playlist index |
loop | Bool | Loop playlist |
items | [LuraPlayerConfiguration] | Playlist items |
ads | LuraPlaylistAds? | Playlist ads |
autoSwitch | LuraAutoSwitch? | Auto-switch settings |
nextPage | String? | Next page URL |
layout | String | Playlist layout |
slideAnimation | LuraSlideAnimation? | Slide animation |
lura | Lura? | MCP configuration |
nxs | LuraNxsConfiguration? | NXS configuration |
public struct LuraPlaylistConfiguration: Codable {
public var startingIndex: Int?
public var loop: Bool
public var items: [LuraPlayerConfiguration]
public var ads: LuraPlaylistAds?
public var autoSwitch: LuraAutoSwitch?
public var nextPage: String?
public var layout: String
public var slideAnimation: LuraSlideAnimation?
public var lura: Lura?
public var nxs: LuraNxsConfiguration?
}
LuraAutoSwitch
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | Auto-switch enabled |
duration | Double | Countdown duration |
public struct LuraAutoSwitch: Codable {
public var enabled: Bool?
public var duration: Double
}
LuraSlideAnimation
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | Animation enabled |
duration | Double | Animation duration |
public struct LuraSlideAnimation: Codable {
public var enabled: Bool?
public var duration: Double
}
LuraPlaylistAds
| Parameter | Type | Description |
|---|---|---|
criteria | String? | Ad criteria |
time | Double? | Ad time |
count | Int? | Ad count |
macros | [String: String]? | Ad macros |
public struct LuraPlaylistAds: Codable {
public var criteria: String?
public var time: Double?
public var count: Int?
public var macros: [String: String]?
}
Ads Configuration
LuraAdsConfiguration
| Parameter | Type | Description |
|---|---|---|
macros | [String: String]? | Ad macros |
serverSide | LuraAdsServerSideConfiguration? | Server-side ads |
clientSide | LuraAdsClientSideConfiguration? | Client-side ads |
nonLinear | LuraNonLinearConfiguration? | Non-linear ads |
pluginTimeout | Double? | Plugin timeout |
policy | LuraAdPolicyConfiguration | Ad policy |
sgai | LuraSgai? | SGAI configuration |
public struct LuraAdsConfiguration: Codable {
public var macros: [String: String]?
public var serverSide: LuraAdsServerSideConfiguration?
public var clientSide: LuraAdsClientSideConfiguration?
public var nonLinear: LuraNonLinearConfiguration?
public var pluginTimeout: Double?
public var policy: LuraAdPolicyConfiguration
public var sgai: LuraSgai?
}
LuraAdsClientSideConfiguration
| Parameter | Type | Description |
|---|---|---|
provider | String? | Ad provider |
generic | LuraAdsGenericConfiguration? | Generic configuration |
gam | LuraGamConfiguration? | GAM configuration |
public struct LuraAdsClientSideConfiguration : Codable {
var provider : String?
var generic : LuraAdsGenericConfiguration?
var gam : LuraGamConfiguration?
}
LuraAdsServerSideConfiguration
| Parameter | Type | Description |
|---|---|---|
provider | String? | Ad provider |
gam | LuraGamConfiguration? | GAM configuration |
generic | LuraAdsGenericConfiguration? | Generic configuration |
public struct LuraAdsServerSideConfiguration : Codable {
var provider : String?
var gam : LuraGamConfiguration?
var generic : LuraAdsGenericConfiguration?
}
LuraNonLinearConfiguration
| Parameter | Type | Description |
|---|---|---|
pause | NonLinearPauseConfiguration? | Pause ad configuration |
public struct LuraNonLinearConfiguration: Codable {
var pause: NonLinearPauseConfiguration?
}
NonLinearPauseConfiguration
| Parameter | Type | Description |
|---|---|---|
generic | NonLinearPauseGenericConfiguration? | Generic pause ad config |
public struct NonLinearPauseConfiguration: Codable {
var generic: NonLinearPauseGenericConfiguration?
}
NonLinearPauseGenericConfiguration
| Parameter | Type | Description |
|---|---|---|
url | String? | Ad URL |
xPosition | LuraXPosition? | Horizontal position |
yPosition | LuraYPosition? | Vertical position |
backgroundOpacity | Double? | Background opacity |
slideAnimation | NonLinearSlideAnimationConfiguration? | Slide animation |
padding | NonLinearPaddingConfiguration? | Padding |
public struct NonLinearPauseGenericConfiguration: Codable {
var url: String?
var xPosition: LuraXPosition?
var yPosition: LuraYPosition?
var backgroundOpacity: Double?
var slideAnimation: NonLinearSlideAnimationConfiguration?
var padding: NonLinearPaddingConfiguration?
}
NonLinearSlideAnimationConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | Animation enabled |
direction | LuraSlideDirections? | Slide direction |
duration | Double? | Animation duration |
public struct NonLinearSlideAnimationConfiguration: Codable {
var enabled: Bool?
var direction: LuraSlideDirections?
var duration: Double?
}
NonLinearPaddingConfiguration
| Parameter | Type | Description |
|---|---|---|
top | String? | Top padding |
bottom | String? | Bottom padding |
left | String? | Left padding |
right | String? | Right padding |
public struct NonLinearPaddingConfiguration: Codable {
var top: String?
var bottom: String?
var left: String?
var right: String?
}
LuraGamConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | GAM enabled |
mode | String? | GAM mode |
networkCode | String? | Network code |
adTagUrl | String? | Ad tag URL |
cmsId | String? | CMS ID |
videoID | String? | Video ID |
apiKey | String? | API key |
assetKey | String? | Asset key |
custParams | String? | Custom parameters |
liveStreamPrefetchSeconds | Int? | Live stream prefetch |
streamFormat | String? | Stream format |
customAssetKey | String? | Custom asset key |
macros | [String: String]? | Macros |
adTagParameters | [String: Any]? | Ad tag parameters |
public struct LuraGamConfiguration : Codable {
var enabled : Bool?
var mode : String?
var networkCode : String?
var adTagUrl : String?
var cmsId : String?
var videoID : String?
var apiKey : String?
var assetKey : String?
var custParams : String?
var liveStreamPrefetchSeconds: Int?
var streamFormat : String?
var customAssetKey : String?
var macros : [String : String]?
var adTagParameters : [String : Any]?
}
LuraAdsGenericConfiguration
| Parameter | Type | Description |
|---|---|---|
breaks | [LuraBreakGenericConfiguration]? | Ad breaks |
public struct LuraAdsGenericConfiguration : Codable {
var breaks : [LuraBreakGenericConfiguration]?
}
LuraBreakGenericConfiguration
| Parameter | Type | Description |
|---|---|---|
offset | String? | Break offset |
url | String? | VAST URL |
public struct LuraBreakGenericConfiguration : Codable {
var offset : String?
var url : String?
}
LuraSgai
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | SGAI enabled |
assetId | String? | Asset ID |
nonLinear | LuraSgaiNonlinear? | Non-linear SGAI |
linear | LuraSgaiLinear? | Linear SGAI |
public struct LuraSgai: Codable {
public var enabled: Bool?
public var assetId: String?
public var nonLinear: LuraSgaiNonlinear?
public var linear: LuraSgaiLinear?
}
LuraSgaiLinear
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | Linear SGAI enabled |
defaultAdDuration | Double? | Default ad duration |
public struct LuraSgaiLinear: Codable {
public var enabled: Bool?
public var defaultAdDuration: Double?
}
LuraSgaiNonlinear
| Parameter | Type | Description |
|---|---|---|
enabled | Bool? | Non-linear SGAI enabled |
endpoint | String? | Endpoint URL |
public struct LuraSgaiNonlinear: Codable {
public var enabled: Bool?
public var endpoint: String?
}
LuraAdPolicyConfiguration
| Parameter | Type | Description |
|---|---|---|
skipMode | LuraAdSkipMode | Ad skip mode |
cooldown | Double | Cooldown between ads (seconds) |
pauseAdCooldown | Double | Pause ad cooldown (seconds) |
public struct LuraAdPolicyConfiguration: Codable {
var skipMode: LuraAdSkipMode
public var cooldown: Double
public var pauseAdCooldown: Double
}
LuraAdSkipMode
| Case | Description |
|---|---|
ad | Skip individual ads |
pod | Skip ad pods |
public enum LuraAdSkipMode: String, Codable {
case ad
case pod
}
Ads
LuraAdBreak
| Parameter | Type | Description |
|---|---|---|
id | String? | Ad break ID |
offset | Double? | Break offset |
ads | [LuraAd]? | Ads in break |
watched | Bool? | Break watched |
totalAds | Int? | Total ads |
breakDuration | Double? | Break duration |
origin | String | Break origin |
stitcher | String? | Ad stitcher |
public struct LuraAdBreak: LuraEventData {
public var id: String?
public var offset: Double?
public var ads: [LuraAd]?
public var watched: Bool?
public var totalAds: Int?
public var breakDuration: Double?
public var origin: String
public var stitcher: String?
}
LuraAd
| Parameter | Type | Description |
|---|---|---|
duration | Double? | Ad duration |
skipOffset | Double? | Skip offset |
title | String? | Ad title |
description | String? | Ad description |
companions | [LuraCompanionCodable]? | Companion ads |
icons | [LuraIconCodable]? | Ad icons |
interactiveFiles | [LuraInteractiveFileCodable]? | Interactive files |
isClickable | Bool | Ad is clickable |
callToActionItems | [CallToActionItem]? | CTA items |
public struct LuraAd: LuraEventData {
public var duration: Double?
public var skipOffset: Double?
public var title: String?
public var description: String?
public var companions: [LuraCompanionCodable]?
public var icons: [LuraIconCodable]?
public var interactiveFiles: [LuraInteractiveFileCodable]?
public var isClickable: Bool
public var callToActionItems: [CallToActionItem]?
}
LuraIconCodable
| Parameter | Type |
|---|---|
program | String? |
width | String? |
height | String? |
xPosition | String? |
yPosition | String? |
duration | String? |
offset | String? |
apiFramework | String? |
clicks | LuraClickCodable? |
type | String? |
creativeType | String? |
data | String? |
public struct LuraIconCodable: Codable {
public var program : String?
public var width : String?
public var height : String?
public var xPosition : String?
public var yPosition : String?
public var duration : String?
public var offset : String?
public var apiFramework : String?
public var clicks : LuraClickCodable?
public var type : String?
public var creativeType : String?
public var data : String?
}
LuraClickCodable
| Parameter | Type |
|---|---|
clickThrough | String? |
clickTracking | LuraClickTrackingCodable? |
public struct LuraClickCodable: Codable {
public var clickThrough : String?
public var clickTracking : [LuraClickTrackingCodable]?
}
LuraClickTrackingCodable
| Parameter | Type |
|---|---|
id | String? |
url | String? |
public struct LuraClickTrackingCodable: Codable {
public var id : String?
public var url : String?
}
LuraCompanionCodable
| Parameter | Type |
|---|---|
id | String? |
apiFramework | String? |
width | String? |
height | String? |
assetWidth | String? |
assetHeight | String? |
expandedWidth | String? |
expandedHeight | String? |
adSlotId | String? |
pxratio | String? |
renderingMode | String? |
altText | String? |
clickThrough | String? |
clickTracking | String? |
type | String? |
creativeType | String? |
data | String? |
tracking | [LuraTrackingCodable]? |
public struct LuraCompanionCodable: Codable {
var id : String?
var apiFramework : String?
var width : String?
var height : String?
var assetWidth : String?
var assetHeight : String?
var expandedWidth : String?
var expandedHeight : String?
var adSlotId : String?
var pxratio : String?
var renderingMode : String?
var altText : String?
var clickThrough : String?
var clickTracking : String?
var type : String?
var creativeType : String?
var data : String?
var tracking : [LuraTrackingCodable]?
}
LuraTrackingCodable
| Parameter | Type |
|---|---|
type | LuraPingType? |
url | URL? |
progressOffset | Double? |
public struct LuraTrackingCodable: Codable {
public var type: LuraPingType?
public var url: URL?
public var progressOffset: Double?
}
LuraInteractiveFileCodable
| Parameter | Type |
|---|---|
apiFramework | String? |
type | String? |
url | String? |
variableDuration | Bool? |
public struct LuraInteractiveFileCodable: Codable {
public var apiFramework : String?
public var type : String?
public var url : String?
public var variableDuration: Bool?
}
CallToActionItem
| Parameter | Type | Description |
|---|---|---|
id | UUID | Item ID |
label | String? | Button label |
buttonVariant | Int? | Button variant |
action | Int? | Action type |
data | String? | Action data |
start | Double? | Start time |
end | Double? | End time |
public struct CallToActionItem: Codable {
public let id: UUID
public var label: String?
public var buttonVariant: Int?
public var action: Int?
public var data: String?
public var start: Double?
public var end: Double?
}
Plugins
LuraPlugins
| Parameter | Type | Description |
|---|---|---|
palConfiguration | PALPluginConfiguration? | PAL plugin |
convivaConfiguration | ConvivaPluginConfiguration? | Conviva plugin |
openMeasurementConfiguration | OpenMeasurementPluginConfiguration? | Open Measurement plugin |
imaPluginConfiguration | IMAPluginConfiguration? | IMA plugin |
nielsenPluginConfiguration | NielsenPluginConfiguration? | Nielsen plugin |
adobePluginConfiguration | AdobeMediaAnalyticsConfiguration? | Adobe plugin |
comscorePluginConfiguration | ComScorePluginConfiguration? | Comscore plugin |
public struct LuraPlugins : Codable {
public var palConfiguration : PALPluginConfiguration?
public var convivaConfiguration : ConvivaPluginConfiguration?
public var openMeasurementConfiguration : OpenMeasurementPluginConfiguration?
public var imaPluginConfiguration : IMAPluginConfiguration?
public var nielsenPluginConfiguration : NielsenPluginConfiguration?
public var adobePluginConfiguration : AdobeMediaAnalyticsConfiguration?
public var comscorePluginConfiguration : ComScorePluginConfiguration?
}
LuraPluginConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool | Plugin enabled |
public class LuraPluginConfiguration : Codable {
public var enabled : Bool = false
}
AdobeMediaAnalyticsConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool | Plugin enabled |
appId | String? | Adobe app ID |
griffonUrl | String? | Griffon URL |
marketingCloudId | String? | Marketing cloud ID |
publisherId | String? | Publisher ID |
trackingServer | String? | Tracking server |
mediaTrackingServer | String? | Media tracking server |
channel | String? | Channel |
userId | String? | User ID |
pageName | String? | Page name |
playerName | String? | Player name |
debugLogging | Bool | Debug logging |
contentInfo | AdobeContentInfo? | Content info |
contextData | [String: String]? | Context data |
public class AdobeMediaAnalyticsConfiguration: LuraPluginConfiguration {
var appId : String?
var griffonUrl : String?
public var contentInfo : AdobeContentInfo?
public var contextData: [String: String]?
}
AdobeContentInfo
| Parameter | Type | Description |
|---|---|---|
name | String? | Content name |
id | String? | Content ID |
length | Double? | Content length |
streamType | String? | Stream type |
mediaType | String? | Media type |
public class AdobeContentInfo: Codable {
var name: String?
var id: String?
var length: Double?
var streamType: String?
var mediaType: String?
}
ComScorePluginConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool | Plugin enabled |
publisherId | String? | Publisher ID |
playerName | String? | Player name |
implementationId | String? | Implementation ID |
projectId | String? | Project ID |
playerVersion | String? | Player version |
metadata | [String: Any]? | Metadata |
public class ComScorePluginConfiguration: LuraPluginConfiguration {
private(set) var publisherId: String?
private(set) var playerName: String?
private(set) var implementationId: String?
private(set) var projectId: String?
private(set) var playerVersion: String?
public var metadata: [String: Any]?
}
ConvivaPluginConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool | Plugin enabled |
customerKey | String? | Conviva customer key |
gatewayUrl | String? | Conviva gateway URL |
logLevel | Int | Log level |
viewerId | String? | Viewer ID |
contentInfo | [String: Any]? | Content info |
public class ConvivaPluginConfiguration: LuraPluginConfiguration {
var customerKey : String?
var gatewayUrl : String?
var logLevel : Int = 0
var viewerId : String?
public var contentInfo : [String : Any]?
}
NielsenPluginConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool | Plugin enabled |
appId | String? | Nielsen app ID |
initialization | [String: String]? | Initialization parameters |
metadata | [String: Any]? | Metadata |
public class NielsenPluginConfiguration: LuraPluginConfiguration {
var appId: String?
var initialization: [String : String]?
var metadata: [String : Any]?
}
OpenMeasurementPluginConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool | Plugin enabled |
additionalData | [String: Any]? | Additional data |
public class OpenMeasurementPluginConfiguration: LuraPluginConfiguration {
var additionalData: [String: Any]?
}
PALPluginConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool | Plugin enabled |
ppid | String? | Publisher provided ID |
descriptionUrl | String? | Description URL |
skippablesSupported | Bool? | Skippable ads supported |
forceLimitedAds | Bool? | Force limited ads |
directedForChildOrUnknownAge | Bool? | Directed for child or unknown age |
disableLimitedAdsStorage | Bool? | Disable limited ads storage |
disableFirstPartyIdentifiers | Bool? | Disable first-party identifiers |
public class PALPluginConfiguration : LuraPluginConfiguration {
var ppid : String?
var descriptionUrl : String?
var skippablesSupported: Bool?
var forceLimitedAds: Bool?
var directedForChildOrUnknownAge: Bool?
var disableLimitedAdsStorage: Bool?
var disableFirstPartyIdentifiers: Bool?
}
IMAPluginConfiguration
Programmatic-only configuration for Google IMA. Initialized with a config dictionary and UIViewController.
public class IMAPluginConfiguration : LuraPluginConfiguration {
var dai: ImaDai?
var client: ImaClient?
var podserve : ImaPodserve?
}
Analytics
LuraAnalyticsConfiguration
| Parameter | Type | Description |
|---|---|---|
enabled | Bool | Analytics enabled |
host | String? | Analytics server URL |
apiKey | String? | API key |
period | Double | Send period in seconds |
app | App? | Application info |
session | Session? | Session info |
public class LuraAnalyticsConfiguration: LuraPluginConfiguration {
public var host: String?
public var apiKey: String?
public var period: Double = 10.0
public var app: App?
public var session: Session?
public struct App: Codable {
let id: String
let name: String
let version: String
}
public struct Session: Codable {
let data: String
let userId: String
}
}
App
| Parameter | Type | Description |
|---|---|---|
id | String | Application identifier |
name | String | Application name |
version | String | Application version |
public struct App: Codable {
let id: String
let name: String
let version: String
}
Session
| Parameter | Type | Description |
|---|---|---|
data | String | Session data |
userId | String | User identifier |
public struct Session: Codable {
let data: String
let userId: String
}
Events
LuraEventListener
public typealias LuraEventListener = (LuraEventBundle) -> ()
LuraOfflineEventListener
info
This type is available on iOS only.
public typealias LuraOfflineEventListener = (LuraOfflineBundle) -> ()
LuraEventBundle
| Parameter | Type | Description |
|---|---|---|
name | String? | Event name |
type | LuraEvent? | Event type |
data | LuraEventData? | Event payload |
public struct LuraEventBundle: Codable {
public var name: String?
public var type: LuraEvent?
public var data: LuraEventData?
}
LuraEventData
public protocol LuraEventData : Codable {}
RateChanged
| Parameter | Type | Description |
|---|---|---|
playbackRate | Float | Playback rate |
public struct RateChanged: LuraEventData {
public var playbackRate: Float
}
DurationChanged
| Parameter | Type | Description |
|---|---|---|
duration | Float | Media duration |
public struct DurationChanged: LuraEventData {
public var duration: Float
}
TrickPlayData
| Parameter | Type | Description |
|---|---|---|
time | Double | Trick-play time |
width | Int? | Thumbnail width |
height | Int? | Thumbnail height |
imageData | String? | Base64 image data |
rows | Int? | Sprite rows |
columns | Int? | Sprite columns |
offset | [Int]? | Sprite offset |
public struct TrickPlayData: LuraEventData {
public var time: Double
public var width: Int?
public var height: Int?
public var imageData: String?
public var rows: Int?
public var columns: Int?
public var offset: [Int]?
}
TimeUpdate
| Parameter | Type | Description |
|---|---|---|
contentTime | Double | Current content time |
type | String | Update type |
annotations | [Annotation]? | Active annotations |
ad | Ad? | Current ad info |
highlight | Highlight? | Current highlight info |
public struct TimeUpdate: LuraEventData {
public var contentTime: Double
public var type: String
public var annotations: [Annotation]?
public var ad: Ad?
public var highlight: Highlight?
public struct Ad: Codable {
public var id: String
public var totalAds: Int
public var adPosition: Int
public var breakDuration: Double
public var adDuration: Double
public var timeInAd: Double
public var timeInBreak: Double
public var skipOffset: Double
public var isClickable: Bool
}
public struct Highlight: Codable {
public var id: String
public var position: Int
public var duration: Double
public var time: Double
public var totalCount: Int
}
}
Ad
| Parameter | Type | Description |
|---|---|---|
id | String | Ad identifier |
totalAds | Int | Total ads in the break |
adPosition | Int | Position of the current ad |
breakDuration | Double | Ad break duration in seconds |
adDuration | Double | Current ad duration in seconds |
timeInAd | Double | Time elapsed in current ad in seconds |
timeInBreak | Double | Time elapsed in ad break in seconds |
skipOffset | Double | Skip offset in seconds |
isClickable | Bool | Whether the ad is clickable |
public struct Ad: Codable {
public var id: String
public var totalAds: Int
public var adPosition: Int
public var breakDuration: Double
public var adDuration: Double
public var timeInAd: Double
public var timeInBreak: Double
public var skipOffset: Double
public var isClickable: Bool
}
Highlight
| Parameter | Type | Description |
|---|---|---|
id | String | Highlight identifier |
position | Int | Highlight position |
duration | Double | Highlight duration in seconds |
time | Double | Current time within highlight in seconds |
totalCount | Int | Total highlight count |
public struct Highlight: Codable {
public var id: String
public var position: Int
public var duration: Double
public var time: Double
public var totalCount: Int
}
ErrorData
| Parameter | Type | Description |
|---|---|---|
type | String | Error type |
message | String? | Error message |
errorCode | String? | Error code |
public struct ErrorData: LuraEventData, Error {
public var type: String
public var message: String?
public var errorCode: String?
}
VolumeChanged
| Parameter | Type | Description |
|---|---|---|
volume | Float | Volume level |
public struct VolumeChanged: LuraEventData {
public var volume: Float
}
MuteChanged
| Parameter | Type | Description |
|---|---|---|
muted | Bool | Muted state |
public struct MuteChanged: LuraEventData {
public var muted: Bool
}
VideoMetadata
| Parameter | Type | Description |
|---|---|---|
metadata | LuraVideoMetadata | Video metadata |
public struct VideoMetadata: LuraEventData {
public var metadata: LuraVideoMetadata
}
TrackChanged
| Parameter | Type | Description |
|---|---|---|
trackType | String? | Track type |
track | VideoTrack? | AudioTrack? | CaptionTrack? | ViewGrid? | Changed track |
public struct TrackChanged: LuraEventData {
public var trackType: String?
public var track: LuraTrack?
}
AvailabilityWindow
| Parameter | Type | Description |
|---|---|---|
id | String | Window identifier |
start | Double | Start time |
end | Double | End time |
public struct AvailabilityWindow: LuraEventData {
public var id: String
public var start: Double
public var end: Double
}
TimedMetadata
| Parameter | Type | Description |
|---|---|---|
data | [String: String] | Metadata key-value pairs |
public struct TimedMetadata: LuraEventData {
public var data: [String : String]
}
ShowCaption
| Parameter | Type | Description |
|---|---|---|
text | String | Caption text |
public struct ShowCaption: LuraEventData {
public var text: String
}
BufferChanged
| Parameter | Type | Description |
|---|---|---|
start | Double | Buffer start |
end | Double | Buffer end |
public struct BufferChanged: LuraEventData {
public var start: Double
public var end: Double
}
CustomDataChanged
| Parameter | Type | Description |
|---|---|---|
key | String | Custom data key |
value | String | Custom data value |
public struct CustomDataChanged: LuraEventData {
public var key: String
public var value: String
}
EventNotifiedData
| Parameter | Type | Description |
|---|---|---|
type | NotifiableEventType | Event type |
payload | String? | Event payload |
public struct EventNotifiedData: LuraEventData {
public let type: NotifiableEventType
public let payload: String?
}
ScreenState
| Parameter | Type | Description |
|---|---|---|
state | LuraScreenState | Screen state |
public struct ScreenState: LuraEventData {
public var state: LuraScreenState
}
Warning
| Parameter | Type | Description |
|---|---|---|
message | String? | Warning message |
errorCode | Int? | Warning code |
public struct Warning: LuraEventData {
public var message: String?
public var errorCode: Int?
}
PlaylistData
| Parameter | Type | Description |
|---|---|---|
item | [LuraPlayerConfiguration] | Playlist item |
index | Int | Item index |
public struct PlaylistData : LuraEventData {
public var item: LuraPlayerConfiguration
public var index: Int
}
AutoSwitchCounter
| Parameter | Type | Description |
|---|---|---|
item | LuraPlayerConfiguration? | Next playlist item |
index | Int | Item index |
remaining | Double | Remaining seconds |
public struct AutoSwitchCounter: LuraEventData {
public let item: LuraPlayerConfiguration?
public let index: Int
public let remaining: Double
}
LuraEngagement
| Parameter | Type | Description |
|---|---|---|
id | String? | Engagement ID |
count | Int? | Engagement count |
histogram | [Int]? | Engagement histogram |
public struct LuraEngagement: LuraEventData, Codable {
public let id: String?
public let count: Int?
public let histogram: [Int]?
}
NonLinearMarkersData
| Parameter | Type | Description |
|---|---|---|
markers | SgaiMarker | SGAI markers |
public struct NonLinearMarkersData: LuraEventData {
public let markers: [SgaiMarker]
}
SgaiMarker
| Parameter | Type | Description |
|---|---|---|
id | String | Marker ID |
offset | Double | Marker offset |
type | String | Marker type |
duration | Double | Marker duration |
public struct SgaiMarker: LuraEventData {
public let id: String
public let offset: Double
public let type: String
public let duration: Double
}
NonLinearProgressData
| Parameter | Type | Description |
|---|---|---|
adId | String | Ad ID |
time | Double | Current time |
duration | Double | Ad duration |
public struct NonLinearProgressData: LuraEventData {
public let adId: String
public let time: Double
public let duration: Double
}
NonLinearLoadedData
| Parameter | Type | Description |
|---|---|---|
adId | String | Ad ID |
ad | String | Ad data |
public struct NonLinearLoadedData: LuraEventData {
public let adId: String
public let ad: String
}
HighlightData
| Parameter | Type | Description |
|---|---|---|
highlight | Highlight? | Highlight info |
grid | HighlightLoadedGrid? | Loaded grid layout |
public struct HighlightData: LuraEventData, Codable {
public let highlight: Highlight?
public let grid: HighlightLoadedGrid?
}
HighlightLoadedGrid
| Parameter | Type | Description |
|---|---|---|
mode | String? | Grid mode |
viewportWidth | Double? | Viewport width |
viewportHeight | Double? | Viewport height |
content | HighlightLoadedGridSlot? | Content slot |
highlight | HighlightLoadedGridSlot? | Highlight slot |
public struct HighlightLoadedGrid: Codable {
public let mode: String?
public let viewportWidth: Double?
public let viewportHeight: Double?
public let content: HighlightLoadedGridSlot?
public let highlight: HighlightLoadedGridSlot?
}
HighlightLoadedGridSlot
| Parameter | Type | Description |
|---|---|---|
videoWidth | Double? | Video width |
videoHeight | Double? | Video height |
relativeX | Double? | Relative X position |
relativeY | Double? | Relative Y position |
relativeHeight | Double? | Relative height |
relativeWidth | Double? | Relative width |
public struct HighlightLoadedGridSlot: Codable {
public let videoWidth: Double?
public let videoHeight: Double?
public let relativeX: Double?
public let relativeY: Double?
public let relativeHeight: Double?
public let relativeWidth: Double?
}
Highlight
| Parameter | Type | Description |
|---|---|---|
id | String? | Highlight ID |
active | Bool? | Highlight active |
time | Double? | Highlight time |
title | String? | Title |
description | String? | Description |
poster | String? | Poster URL |
mode | String? | Display mode |
public struct Highlight: Codable {
public let id: String?
public let active: Bool?
public let time: Double?
public let title: String?
public let description: String?
public let poster: String?
public let mode: String?
}
LatencyModeChanged
| Parameter | Type | Description |
|---|---|---|
latencyMode | LuraLatencyMode | Current latency mode |
availability | [LuraLatencyMode: Bool] | Mode availability |
public struct LatencyModeChanged: LuraEventData {
public var latencyMode: LuraLatencyMode
public var availability: [LuraLatencyMode: Bool]
}
CTAEventData
| Parameter | Type | Description |
|---|---|---|
item | CallToActionItem | CTA item |
public struct CTAEventData: LuraEventData {
public let item: CallToActionItem
}
Metadata
LuraVideoMetadata
| Parameter | Type | Description |
|---|---|---|
eventId | String? | Event identifier |
title | String? | Video title |
description | String? | Video description |
startTime | Double? | Start timestamp |
endTime | Double? | End timestamp |
tsAbs | Double? | Absolute timestamp |
dvrAvailability | String? | DVR availability flag |
customMetadata | [String: Any]? | Custom metadata fields |
public class LuraVideoMetadata: Codable {
public var eventId: String?
public var title: String?
public var description: String?
public var startTime: Double?
public var endTime: Double?
public var tsAbs: Double?
public var dvrAvailability: String?
public var customMetadata: [String : Any]?
}
Enums & Constants
LuraScreenState
| Case | Description |
|---|---|
FULLSCREEN | Fullscreen mode |
PICTURE_IN_PICTURE | Picture-in-picture mode |
WINDOWED | Windowed mode |
public enum LuraScreenState : String, Codable {
case FULLSCREEN
case PICTURE_IN_PICTURE
case WINDOWED
}
NotifiableEventType
| Case | Raw value |
|---|---|
click | "CLICK" |
cta_click | "CTA_CLICK" |
activity | "ACTIVITY" |
back_click | "BACK_CLICK" |
public enum NotifiableEventType: String, Codable {
case click = "CLICK"
case cta_click = "CTA_CLICK"
case activity = "ACTIVITY"
case back_click = "BACK_CLICK"
}
LuraCastTargets
| Case | Raw value |
|---|---|
CHROMECAST | "chromecast" |
AIRPLAY | "airplay" |
public enum LuraCastTargets : String {
case CHROMECAST = "chromecast"
case AIRPLAY = "airplay"
}
LuraXPosition
| Case | Raw value |
|---|---|
Left | "left" |
Right | "right" |
Center | "center" |
public enum LuraXPosition: String, Codable {
case Left = "left"
case Right = "right"
case Center = "center"
}
LuraYPosition
| Case | Raw value |
|---|---|
Top | "top" |
Bottom | "bottom" |
Center | "center" |
public enum LuraYPosition: String, Codable {
case Top = "top"
case Bottom = "bottom"
case Center = "center"
}
LuraSlideDirections
| Case | Raw value |
|---|---|
Left | "left" |
Right | "right" |
Up | "up" |
Down | "down" |
public enum LuraSlideDirections: String, Codable {
case Left = "left"
case Right = "right"
case Up = "up"
case Down = "down"
}