PlayerViewImaBridgeCreator

class PlayerViewImaBridgeCreator(    playerPool: PlayerPool<Player>,     mediaSourceFactory: DefaultMediaSourceFactory,     imaAdsLoaderBuilder: ImaAdsLoader.Builder? = null) : BridgeCreator<PlayerView>

A BridgeCreator that creates instance of PlayerViewImaBridge if the Media contains an ad media Uri, or fallback to a PlayerViewBridge otherwise.

Parameters

playerPool

The PlayerPool for Player instances.

mediaSourceFactory

The DefaultMediaSourceFactory that is used to create the MediaSource. If playerPool is an ExoPlayerPool, this value must be the same as ExoPlayerPool.defaultMediaSourceFactory.

imaAdsLoaderBuilder

The ImaAdsLoader.Builder to create the ImaAdsLoader. When null, the library will use a default one. When the library uses a default builder, it also sets a default AdEventListener for debugging purpose. Applications that want to use their own listeners should provide their own Builders.

Constructors

Link copied to clipboard
fun PlayerViewImaBridgeCreator(    playerPool: PlayerPool<Player>,     mediaSourceFactory: DefaultMediaSourceFactory,     imaAdsLoaderBuilder: ImaAdsLoader.Builder? = null)

Functions

Link copied to clipboard
open override fun cleanUp()
Link copied to clipboard
open override fun createBridge(context: Context, media: Media): Bridge<PlayerView>