Skip to main content

Stream Concurrency

The stream concurrency library is a personalization library that facilitates stream concurrency check during playback and aborts playback if check fails. The library facilitates check for concurrent streams of any content at different stages of playback and abort playback if the number of concurrent streams exceeds allowed limit.

import { StreamConcurrencyConfig , createPlayer, PlayerConfig } from '@quickplay/rn-qp-nxg-player';

// create streamConcurrency configuration and pass that to playerConfig.

const streamConcurrencyConfiguration: StreamConcurrencyConfig = {
streamConcurrencyServiceEndpoint: <StreamConcurrencyEndpointUrl>,
platformClient: <PlatformClient>,
streamConcurrencySyncIntervalMs: <SyncInterval> //eg: 5000,
};

const playerConfig: PlayerConfig = {
streamConcurrencyConfig: streamConcurrencyConfiguration,
}

const player = await createPlayer(playerConfig);