BroadpeakPlayerBuilder
A PlayerBuilder implementation for constructing a BroadpeakPlayer instance.
This builder handles the specific requirements for playback with Broadpeak's server-side ad insertion (SSAI). It creates a streaming session, and retrieves the manipulated manifest URL for playback.
The builder configures the underlying player with the necessary parameters like media URL (obtained from Broadpeak), DRM information, and media type. It also sets up policies and handlers for ad playback.
Example usage:
val broadpeakPlayer = BroadpeakPlayerBuilder()
.adPlaybackPolicy(customAdPolicy)
.build(
platformContext,
contentAuthToken,
consumptionType
)
}NOTE: BroadpeakPlayer ad insertion enablement depends on successful SmartLib initialization that MUST be done prior to building the BroadpeakPlayer. The best practice is to call BroadpeakSessionManager.createInstance(broadpeakInitData) when application is starting so Android Application.onCreate() is the optimal place as a starting point for Broadpeak initialization.
Functions
Configures the AdPlaybackPolicy instance that defines the set of policy rules for Ads handling
DEVELOPER NOTE: This is overloaded version of the build function that handles clear content and should be used mainly for testing purposes.
Set custom parameters to be added to the session report.
Set broadpeak initializationUrl.
Sets the PALConfiguration instance that is used in the PALSession initialization.
Set whether broadpeak session should also work in mode.
Sets the PlaybackPolicyHandler instance that enforces the policy rules related to the content with MediaTailor ads.
Sets the PlaybackPolicyHandler.Listener instance that provides the notification for ad playback policy related events.