IMAStreamManagerBridge

Represents bridging API to IMA SDK com.google.ads.interactivemedia.v3.api.StreamManager

Functions

Link copied to clipboard
abstract fun getContentTimeForStreamTimeMs(streamTimeMs: Long): Long

Converts time offset within the stream to time offset of the underlying content, excluding ads. For LIVE streams, content time is not meaningful, so there is no conversion and this will return the same value that was given.

Link copied to clipboard
abstract fun getCuePoints(): List<AdCuePoint>

Returns the collection of AdCuePoint instances for the current VOD stream. Returns empty list for live streams.

Link copied to clipboard
abstract fun getPreviousCuePointForStreamTimeMs(streamTimeMs: Long): AdCuePoint?

Returns the previous AdCuePoint for the given VOD stream time. Returns null if there is no previous cue point, or if called for a live stream. This is used to implement features like snap back (or other ad policy handling) in order to return the user to a skipped ad break.

Link copied to clipboard
abstract fun getStreamTimeForContentTimeMs(contentTimeMs: Long): Long

Converts time offset within the content to time offset of the underlying stream, including ads. For LIVE streams, content time is not meaningful, so there is no conversion and this will return the same value that was given.

Link copied to clipboard
abstract fun replaceAdTagParameters(adTagParameters: Map<String, String>)

Replaces all the ad tag parameters used for the upcoming ad requests for a live stream. Note that this call is a no-op for VOD streams.