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.
maxIntMaximum number of allowed concurrent playback sessions.
Concurrency Example
val luraConfiguration = LuraConfiguration(
lura = Lura(
appKey = "<YOUR_APP_KEY>",
assetId = "<ASSET_ID>"
),
concurrency = LuraConcurrencyConfiguration(
enabled = true,
accountId = "<ACCOUNT_ID>",
deviceId = "<DEVICE_ID>",
max = 2
)
)

playerView = findViewById(R.id.lura_player_view)
player = LuraPlayer(context = this, playerView = playerView)
player.setConfig(luraConfiguration)

When the concurrency limit is reached, playback is blocked and the player emits the CONCURRENCY_LIMIT_REACHED error with code 1901.