CastPlayerSynchronizer
class CastPlayerSynchronizer(castContext: CastContext, coroutineScope: CoroutineScope, castPlayer: PillarboxCastPlayer, localPlayer: PillarboxExoPlayer, playerSynchronizer: CastPlayerSynchronizer.PlayerSynchronizer = DefaultPlayerSynchronizer())
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: CastPlayerSynchronizer.PlayerSynchronizer = DefaultPlayerSynchronizer())
Types
Link copied to clipboard
Default implementation of PlayerSynchronizer.
Link copied to clipboard
interface PlayerSynchronizer
Interface to configure the state of two players.
Link copied to clipboard
Data class representing the selection of tracks.
Properties
Link copied to clipboard
The current player, it can be either a PillarboxCastPlayer or a PillarboxExoPlayer.