SessionCommon

open class SessionCommon

The session object which represents a successfully initialized MediaTailor session. This object exposes the methods/properties to manage or monitor the MediaTailor session.

Inheritors

Properties

Link copied to clipboard

The nonce generated by Google PAL SDK for this session, or null if unavailable.

Link copied to clipboard

The URL to be used by a player for content stream playback, with inserted ads, or null if the MediaTailor session was initialized elsewhere.

Link copied to clipboard

The URL to be used to retrieve information for ad tracking.

Functions

Link copied to clipboard
fun addAdObserver(adObserver: AdObserver)

Add an ad observer.

Link copied to clipboard

Add a UI event listener.

Link copied to clipboard
fun destroy()

Destroy the session object and free related resources.

Link copied to clipboard
fun getAllAds(receiver: (ads: List<AdData>) -> Unit)

Get the list of all the ads that are currently being tracked.

Link copied to clipboard
fun getAllNonLinearAds(receiver: (ads: List<NonLinearAdsData>) -> Unit)

Get the list of all the nonlinear ads that are currently being tracked.

Link copied to clipboard

For the caller to notify the session object about the click-through of the current ad.

Link copied to clipboard
fun onAdSkip()

For the caller to notify the session object about the current ad being skipped.

Link copied to clipboard
fun onPlaybackEvent(playbackEvent: PlaybackEvent)

For the caller to notify the session object about a playback event.

Link copied to clipboard

For the caller to notify the session object about the current playback rate.

Link copied to clipboard
fun onPlayheadUpdate(playhead: Double, programDateTime: Double? = null)

For the caller to notify the session object about the current playhead position.

Link copied to clipboard
fun removeAdObserver(adObserver: AdObserver)

Remove an ad observer.

Link copied to clipboard

Remove a UI event listener.

Link copied to clipboard
fun startUpdatingAdTrackingInfo(requestInterval: Double)

For the caller to manually start/restart periodic ad tracking info requests.

Link copied to clipboard

For the caller to manually stop periodic ad tracking info requests.

Link copied to clipboard

For the caller to manually trigger a single request to update ad tracking information.