PlayerBuilder

PlayerBuilder

class PlayerBuilder(val context: Context)

Creates and configures a Player instance.

Note:

If you have manually configured Bitmovin Analytics using the BitmovinAnalyticsCollector, either migrate to the bundled collector or disable bundled analytics by passing AnalyticsPlayerConfig.Disabled to analyticsConfig.

Using both, the bundled and the manually configured collector will result in a crash.

Provides the same functionality as Player() with a more convenient style when used from Java.

Constructors

PlayerBuilderconstructor(context: Context)

Properties

NameSummary
contextval context: Context

Functions

NameSummary
buildfun build(): Player
Builds the Player instance with the provided configuration.
configureAnalytics@JvmOverloads
fun configureAnalytics(analyticsConfig: AnalyticsConfig, defaultMetadata: DefaultMetadata = DefaultMetadata()): PlayerBuilder
Configures analytics data collection for the Player.
disableAnalyticsfun disableAnalytics(): PlayerBuilder
Disables analytics for the Player.
setPlayerConfigfun setPlayerConfig(playerConfig: PlayerConfig): PlayerBuilder
Sets the PlayerConfig to use for the Player. Must not be modified after it was used to create a Player instance.