getStreamURLOverride

suspend fun getStreamURLOverride(rawPlayer: Any, contentURL: String, params: Map<String, Any>? = null): String

Obtains a Broadpeak-wrapped streaming URL for ad insertion and session tracking.

This function handles the initialization of a Broadpeak StreamingSession, activates advertising capabilities, and attaches the underlying player instance. If the Broadpeak session is successfully established, it returns a modified URL; otherwise, it falls back to the original contentURL.

The result of the session creation (success or failure) is posted to BroadpeakAdsPlayerHelper.broadpeakSessionResult.

Parameters

rawPlayer

The underlying player instance (e.g., ExoPlayer) to attach to the session.

contentURL

The original source URL of the content.

params

Additional parameters for the session.