Package 

Class GoogleDAIComponent

  • All Implemented Interfaces:
    com.brightcove.player.event.Component , com.google.ads.interactivemedia.v3.api.AdErrorEvent.AdErrorListener , com.google.ads.interactivemedia.v3.api.AdEvent.AdEventListener , com.google.ads.interactivemedia.v3.api.AdsLoader.AdsLoadedListener , com.google.ads.interactivemedia.v3.api.player.ContentProgressProvider

    
    public class GoogleDAIComponent
    extends BaseIMAComponent
                        
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Video fallbackVideo
    • Method Summary

      Modifier and Type Method Description
      void setFallbackVideo(Video video) Sets fallback Video in case ads stream fails.
      void requestVOD(String contentSourceID, String videoID, String apiKey) Requests a VOD to be played
      void requestVOD(String contentSourceID, String videoID, String apiKey, String networkCode) Requests a VOD to be played
      void requestLiveStream(String assetKey, String apiKey) Requests a live stream to be played
      void requestLiveStream(String assetKey, String apiKey, String networkCode) Requests a live stream to be played
      void onAdsManagerLoaded(AdsManagerLoadedEvent event)
      void skipCurrentAd()
      void onAdError(AdErrorEvent event)
      Ad getCurrentAd()
      void onAdEvent(AdEvent event)
      GoogleDAIVideoStreamPlayer getVideoAdPlayer() Returns the current GoogleDAIVideoStreamPlayer, or null if it has not been created yet.
      StreamDisplayContainer getStreamDisplayContainer() Returns the current StreamDisplayContainer, or null if it has not been created yet.
      void addCallback(GoogleDAIComponent.Listener callback)
      void removeCallback(GoogleDAIComponent.Listener callback)
      void onRelease()
      • Methods inherited from class com.brightcove.ima.BaseIMAComponent

        clean, getAdPosition, getAdPositionLong, getAdsRenderingSettings, getContentPositionLong, getContentProgress, getCurrentAdIndex, getCurrentAdsRequests, getImaSdkSettings, getSupportedProgressiveMimeTypes, isPlayingAd, setContentPosition, skipCurrentAd, skipCurrentAds, updateAdTargetingValues, useAdRules
      • Methods inherited from class com.brightcove.player.event.AbstractComponent

        addListener, addOnceListener, getEventEmitter, removeListener, removeListeners
      • Methods inherited from class com.google.ads.interactivemedia.v3.api.AdErrorEvent.AdErrorListener

        onAdError
      • Methods inherited from class com.google.ads.interactivemedia.v3.api.AdsLoader.AdsLoadedListener

        onAdsManagerLoaded
      • Methods inherited from class com.google.ads.interactivemedia.v3.api.AdEvent.AdEventListener

        onAdEvent
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setFallbackVideo

         void setFallbackVideo(Video video)

        Sets fallback Video in case ads stream fails.

      • requestVOD

         void requestVOD(String contentSourceID, String videoID, String apiKey)

        Requests a VOD to be played

        Parameters:
        contentSourceID - The content source ID for video on demand server-side ad insertion streams.
        videoID - The video ID for video on demand server-side ad insertion streams.
        apiKey - The stream request API key.
      • requestVOD

         void requestVOD(String contentSourceID, String videoID, String apiKey, String networkCode)

        Requests a VOD to be played

        Parameters:
        contentSourceID - The content source ID for video on demand server-side ad insertion streams.
        videoID - The video ID for video on demand server-side ad insertion streams.
        apiKey - The stream request API key.
        networkCode - The network code for the Ad Manager account that owns the stream.The code is recommended because it is used to apply settings selectedin the Ad Manager UI such as programmatic limited ads enablement.
      • requestLiveStream

         void requestLiveStream(String assetKey, String apiKey)

        Requests a live stream to be played

        Parameters:
        assetKey - Determines which stream you request.
        apiKey - The stream request API key.
      • requestLiveStream

         void requestLiveStream(String assetKey, String apiKey, String networkCode)

        Requests a live stream to be played

        Parameters:
        assetKey - Determines which stream you request.
        apiKey - The stream request API key.
        networkCode - The network code for the Ad Manager account that owns the stream.The code is recommended because it is used to apply settings selectedin the Ad Manager UI such as programmatic limited ads enablement.
      • onAdError

         void onAdError(AdErrorEvent event)
      • getStreamDisplayContainer

        @Nullable() StreamDisplayContainer getStreamDisplayContainer()

        Returns the current StreamDisplayContainer, or null if it has not been created yet.