YandexAdsLoader

class YandexAdsLoader(context: Context, requestConfiguration: InstreamAdRequestConfiguration)

Deprecated

This AdsLoader version is deprecated, use YandexAdsLoader from com.yandex.mobile.ads.instream.media3 package

Replace with

import com.yandex.mobile.ads.instream.media3.YandexMedia3AdsLoader
YandexMedia3AdsLoader

This class is implementation of ExoPlayer's AdsLoader interface. It can be used for simplified integration of Yandex Instream Ads to Exoplayer. Note that all methods of this class must be called on main thread.

Constructors

Link copied to clipboard
constructor(context: Context, requestConfiguration: InstreamAdRequestConfiguration)

Types

Link copied to clipboard
object a

Functions

Link copied to clipboard
open fun getInstreamAdsLoaderManager(): <Error class: unknown class>
Link copied to clipboard
open fun handlePrepareComplete(adsMediaSource: AdsMediaSource, adGroupIndex: Int, adIndexInAdGroup: Int)
Link copied to clipboard
open fun handlePrepareError(adsMediaSource: AdsMediaSource, adGroupIndex: Int, adIndexInAdGroup: Int, exception: IOException)
Link copied to clipboard
open fun release()
Link copied to clipboard
fun requestAds(adViewGroup: ViewGroup?)

Requests ads, if they have not already been requested. Ads will be requested automatically when the player is prepared if this method has not been called, so it is only necessary to call this method if you want to request ads before preparing the player.

Link copied to clipboard
open fun setPlayer(player: Player?)
Link copied to clipboard
open fun setSupportedContentTypes(vararg contentTypes: Int)
Link copied to clipboard

Sets listener for single video ad creative playback events.

Link copied to clipboard
open fun start(adsMediaSource: AdsMediaSource, adTagDataSpec: DataSpec, adPlaybackId: Any, adViewProvider: AdViewProvider, eventListener: AdsLoader.EventListener)
Link copied to clipboard
open fun stop(adsMediaSource: AdsMediaSource, eventListener: AdsLoader.EventListener)