Skip to main content

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.

AttributeTypeDescription
enabledbooleanWhether concurrency handling is enabled.
accountIdstringAccount identifier used for concurrency checks.
deviceIdstringDevice identifier used for concurrency checks.
maxnumberMaximum 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.