Builder

class Builder

Builds instances of MuxPlayer. To configure the underlying ExoPlayer, you can use plusExoConfig, and provide a function to update an ExoPlayer.Builder. Note that configuring or overriding certain objects with plusExoConfig may degrade the player's behavior

Mux provides some specially-configured media3 factories such as MuxMediaSourceFactory that you should prefer to use with this SDK.

Customizing ExoPlayer

If you need to customize the underlying exoplayer, you can use applyExoConfig. Note that this may interfere with Mux Player's features. See MuxMediaSourceFactory for more details on what we do to configure exoplayer if you are having issues

See also

Constructors

Link copied to clipboard
constructor(context: Context)

Types

Link copied to clipboard
fun interface PlusExoBuilder

Use with plusExoConfig to configure MuxPlayer's underlying ExoPlayer

Functions

Link copied to clipboard
fun addExoPlayerBinding(binding: ExoPlayerBinding): MuxPlayer.Builder
Link copied to clipboard
fun addMonitoringData(customerData: CustomerData): MuxPlayer.Builder

Adds the given Mux Data metadata to this player. Previously-added data will not be cleared, but can be overridden with other values

Link copied to clipboard
fun addNetwork(network: INetworkRequest): MuxPlayer.Builder
Link copied to clipboard

Allows you to configure the underlying ExoPlayer by adding your own ExoPlayer.Builder parameters to it. Note that some of your configuration may be overwritten

Link copied to clipboard

Creates a new MuxPlayer.

Link copied to clipboard

Enables logcat from Mux's custom player components. ExoPlayer's logging cannot be turned off

Link copied to clipboard

Enable or disable Mux Player's smart cache for this player.

Link copied to clipboard

Allows you to configure the underlying ExoPlayer by adding your own ExoPlayer.Builder parameters to it. Note that some of your configuration may be overwritten

Link copied to clipboard

Sets a custom Mux Data Env Key for this player. If you're playing videos hosted on Mux Video, this can be inferred to be the env key associated with the video asset's org and environment.