CastPlayerSynchronizer
class CastPlayerSynchronizer(castContext: CastContext, coroutineScope: CoroutineScope, castPlayer: PillarboxCastPlayer, localPlayer: PillarboxExoPlayer, playerSynchronizer: PlayerSynchronizer = DefaultPlayerSynchronizer())
Deprecated
Use RemotePlayer instead
Replace with
import ch.srgssr.pillarbox.cast
Content copied to clipboard
RemotePlayerContent copied to clipboard
Synchronizes a PillarboxCastPlayer with a PillarboxExoPlayer. It switches the two players when the cast session becomes available
Parameters
castContext
The CastContext to use to check if a cast session is available.
coroutineScope
The CoroutineScope to use to launch coroutines.
castPlayer
The PillarboxCastPlayer to use when a cast session is connected.
localPlayer
The PillarboxExoPlayer to use when playing locally.
playerSynchronizer
The PlayerSynchronizer to customize the synchronization of the two players.
Constructors
Link copied to clipboard
constructor(castContext: CastContext, coroutineScope: CoroutineScope, castPlayer: PillarboxCastPlayer, localPlayer: PillarboxExoPlayer, playerSynchronizer: PlayerSynchronizer = DefaultPlayerSynchronizer())
Properties
Link copied to clipboard
The current player, it can be either a PillarboxCastPlayer or a PillarboxExoPlayer.