PillarboxExoPlayer
Creates a PillarboxExoPlayer instance configured for the SRG SSR.
Basic usage
val srgPlayer = PillarboxExoPlayer(context)
Content copied to clipboard
This creates a player with the default SRG SSR configuration:
Automatic integration with Pillarbox Monitoring: playback events are sent to a predefined endpoint.
SRG Asset Loader: integrates an SRGAssetLoader for handling SRG-specific media resources. If not explicitly configured, a default instance is created.
Custom configuration
val customSrgPlayer = PillarboxExoPlayer(context) {
srgAssetLoader(context) {
mediaCompositionService(CustomMediaCompositionService())
}
}
Content copied to clipboard
Return
A configured PillarboxExoPlayer instance ready for playback.
Parameters
context
The Context of the application.
builder
An optional lambda with a receiver of type SRG.Builder allowing customization of the player's configuration.