initSession

open fun initSession(sourceManifestUrl: String): Live2SessionClient.SessionInfo

Creates an SSAI session with default timeout and empty adsParams. Must be called on a background thread.


open fun initSession(sourceManifestUrl: String, timeoutMs: Int): Live2SessionClient.SessionInfo

Creates an SSAI session with empty adsParams. Must be called on a background thread.


open fun initSession(sourceManifestUrl: String, adsParams: Map<String, String>): Live2SessionClient.SessionInfo

Creates an SSAI session with custom adsParams and default timeout. Must be called on a background thread.

Return

session info with resolved absolute URLs

Parameters

sourceManifestUrl

the manifest URL from the Playback API

adsParams

custom ad targeting parameters passed to the SSAI server for macro replacement in the ad tag URL

Throws

if the session init request fails


open fun initSession(sourceManifestUrl: String, adsParams: Map<String, String>, timeoutMs: Int): Live2SessionClient.SessionInfo

Creates an SSAI session. Must be called on a background thread.

Return

session info with resolved absolute URLs

Parameters

sourceManifestUrl

the manifest URL from the Playback API

adsParams

custom ad targeting parameters passed to the SSAI server for macro replacement in the ad tag URL

timeoutMs

connect and read timeout in milliseconds

Throws

if the session init request fails