Session

actual class Session : SessionCommon

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

expect class Session
actual class Session : SessionCommon

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

actual class Session : SessionCommon

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

actual class Session : SessionCommon

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

Properties

palNonce
Link copied to clipboard

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

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

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

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

playbackUrl
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.

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

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

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

trackingUrl
Link copied to clipboard

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

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

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

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

Functions

addAdObserver
Link copied to clipboard
fun addAdObserver(adObserver: AdObserver)

Add an ad observer.

fun addAdObserver(adObserver: AdObserver)

Add an ad observer.

fun addAdObserver(adObserver: AdObserver)

Add an ad observer.

fun addAdObserver(adObserver: AdObserver)

Add an ad observer.

addUiEventListener
Link copied to clipboard

Add a UI event listener.

fun addUiEventListener(event: SessionUiEvent, listener: SessionUiEventListener)

Add a UI event listener.

fun addUiEventListener(event: SessionUiEvent, listener: SessionUiEventListener)

Add a UI event listener.

fun addUiEventListener(event: SessionUiEvent, listener: SessionUiEventListener)

Add a UI event listener.

destroy
Link copied to clipboard
fun destroy()

Destroy the session object and free related resources.

fun destroy()

Destroy the session object and free related resources.

fun destroy()

Destroy the session object and free related resources.

fun destroy()

Destroy the session object and free related resources.

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

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

fun getAllAds(receiver: (ads: List<AdData>) -> Unit)

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

fun getAllAds(receiver: (ads: List<AdData>) -> Unit)

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

fun getAllAds(receiver: (ads: List<AdData>) -> Unit)

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

getAllNonLinearAds
Link copied to clipboard
fun getAllNonLinearAds(receiver: (ads: List<NonLinearAdsData>) -> Unit, includeOffTimelineAds: Boolean = false)

Get the list of all the nonlinear ads that are currently being tracked. Optionally, the returned list can include off-timeline nonlinear ads (such as pause ads).

fun getAllNonLinearAds(receiver: (ads: List<NonLinearAdsData>) -> Unit, includeOffTimelineAds: Boolean = false)

Get the list of all the nonlinear ads that are currently being tracked. Optionally, the returned list can include off-timeline nonlinear ads (such as pause ads).

fun getAllNonLinearAds(receiver: (ads: List<NonLinearAdsData>) -> Unit, includeOffTimelineAds: Boolean = false)

Get the list of all the nonlinear ads that are currently being tracked. Optionally, the returned list can include off-timeline nonlinear ads (such as pause ads).

fun getAllNonLinearAds(receiver: (ads: List<NonLinearAdsData>) -> Unit, includeOffTimelineAds: Boolean = false)

Get the list of all the nonlinear ads that are currently being tracked. Optionally, the returned list can include off-timeline nonlinear ads (such as pause ads).

getPalGestureRecognizer
Link copied to clipboard
fun getPalGestureRecognizer(): ERROR CLASS: Symbol not found for UIGestureRecognizer??

Get the UIGestureRecognizer (created by Google PAL SDK) which must be attached to the player view where the ads are displayed.

fun getPalGestureRecognizer(): UIGestureRecognizer?

Get the UIGestureRecognizer (created by Google PAL SDK) which must be attached to the player view where the ads are displayed.

fun getPalGestureRecognizer(): ERROR CLASS: Symbol not found for UIGestureRecognizer??

Get the UIGestureRecognizer (created by Google PAL SDK) which must be attached to the player view where the ads are displayed.

onAdClickthrough
Link copied to clipboard

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

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

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

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

onAdSkip
Link copied to clipboard
fun onAdSkip()

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

fun onAdSkip()

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

fun onAdSkip()

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

fun onAdSkip()

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

onPlaybackEvent
Link copied to clipboard
fun onPlaybackEvent(playbackEvent: PlaybackEvent)

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

fun onPlaybackEvent(playbackEvent: PlaybackEvent)

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

fun onPlaybackEvent(playbackEvent: PlaybackEvent)

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

fun onPlaybackEvent(playbackEvent: PlaybackEvent)

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

onPlaybackRateUpdate
Link copied to clipboard

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

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

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

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

Link copied to clipboard

For the caller to notify the session object about the player's UI control being clicked.

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

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

fun onPlayheadUpdate(playhead: Double, programDateTime: Double? = null)

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

fun onPlayheadUpdate(playhead: Double, programDateTime: Double? = null)

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

fun onPlayheadUpdate(playhead: Double, programDateTime: Double? = null)

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

onVideoClick
Link copied to clipboard

For the caller to notify the session object about the player being clicked.

For the caller to notify the session object about the player being clicked.

For the caller to notify the session object about the player being clicked.

For the caller to notify the session object about the player being clicked.

removeAdObserver
Link copied to clipboard
fun removeAdObserver(adObserver: AdObserver)

Remove an ad observer.

fun removeAdObserver(adObserver: AdObserver)

Remove an ad observer.

fun removeAdObserver(adObserver: AdObserver)

Remove an ad observer.

fun removeAdObserver(adObserver: AdObserver)

Remove an ad observer.

removeUiEventListener
Link copied to clipboard

Remove a UI event listener.

fun removeUiEventListener(event: SessionUiEvent, listener: SessionUiEventListener)

Remove a UI event listener.

fun removeUiEventListener(event: SessionUiEvent, listener: SessionUiEventListener)

Remove a UI event listener.

fun removeUiEventListener(event: SessionUiEvent, listener: SessionUiEventListener)

Remove a UI event listener.

startUpdatingAdTrackingInfo
Link copied to clipboard
fun startUpdatingAdTrackingInfo(requestInterval: Double?)

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

fun startUpdatingAdTrackingInfo(requestInterval: Double?)

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

fun startUpdatingAdTrackingInfo(requestInterval: Double?)

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

fun startUpdatingAdTrackingInfo(requestInterval: Double?)

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

stopUpdatingAdTrackingInfo
Link copied to clipboard

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

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

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

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

updateAdTrackingInfo
Link copied to clipboard

For the caller to manually update ad tracking information, by either triggering a single polling request, or by passing the data encompassing ad tracking information.

fun updateAdTrackingInfo(data: AdTrackingResponse?)

For the caller to manually update ad tracking information, by either triggering a single polling request, or by passing the data encompassing ad tracking information.

fun updateAdTrackingInfo(data: AdTrackingResponse?)

For the caller to manually update ad tracking information, by either triggering a single polling request, or by passing the data encompassing ad tracking information.

fun updateAdTrackingInfo(data: AdTrackingResponse?)

For the caller to manually update ad tracking information, by either triggering a single polling request, or by passing the data encompassing ad tracking information.