Concurrency Configuration
Playback concurrency allows Lura Player to identify a viewer session and enforce the maximum number of concurrent playback sessions allowed for an account. This feature requires Akta Cloud.
To enable concurrency handling, add the concurrency configuration to your player configuration.
| Attribute | Type | Description |
|---|---|---|
| enabled | boolean | Whether concurrency handling is enabled. |
| accountId | string | Account identifier used for concurrency checks. |
| deviceId | string | Device identifier used for concurrency checks. |
| max | number | Maximum number of allowed concurrent playback sessions. |
Concurrency Example
let player = try? LuraPlayer(playerView: playerView)
player?.addListener(listener: luraListener)
let lura = Lura(appKey: "APP_KEY", assetId: "ASSET_ID")
let concurrency = LuraConcurrencyConfiguration(
enabled: true,
accountId: "<ACCOUNT_ID>",
deviceId: "<DEVICE_ID>",
max: 2
)
let luraConfig = LuraPlayerConfiguration(
lura: lura,
concurrency: concurrency
)
player?.setConfig(luraConfig)
When the concurrency limit is reached, playback is blocked and the player emits the CONCURRENCY_LIMIT_REACHED error with code 1901.