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
| PlayerBuilder | constructor(context: Context) |
Properties
| Name | Summary |
|---|---|
| context | val context: Context |
Functions
| Name | Summary |
|---|---|
| build | fun 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. |
| disableAnalytics | fun disableAnalytics(): PlayerBuilder Disables analytics for the Player. |
| setPlayerConfig | fun 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. |