Interface GoogleDaiIntegration

  • All Implemented Interfaces:
    com.theoplayer.android.api.Integration

    
    public interface GoogleDaiIntegration
     implements Integration
                        

    The Google DAI Integration API.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit setAdsRenderingSettings(AdsRenderingSettings adsRenderingSettings) Sets the ads rendering settings which will be used when requesting a stream.
      abstract AdsRenderingSettings getAdsRenderingSettings() The ads rendering settings which will be used when requesting a stream.
      abstract Unit requestStream(StreamRequest streamRequest, AdsRenderingSettings adsRenderingSettings) Requests a Google DAI stream with the provided StreamRequest and AdsRenderingSettings.
      abstract Double contentTimeForStreamTime(Double streamTime) Returns the content time without ads for a given stream time.
      abstract Double streamTimeForContentTime(Double contentTime) Returns the stream time with ads for a given content time.
      abstract List<CuePoint> getCuePoints() Returns a list of CuePoint where ads will be played.
      abstract Boolean getEnableSnapback() Whether snapback is enabled.
      abstract Unit setEnableSnapback(Boolean enableSnapback) Whether snapback is enabled.
      • Methods inherited from class com.theoplayer.android.api.Integration

        getType
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • setAdsRenderingSettings

         abstract Unit setAdsRenderingSettings(AdsRenderingSettings adsRenderingSettings)

        Sets the ads rendering settings which will be used when requesting a stream.

        Parameters:
        adsRenderingSettings - The AdsRenderingSettings (Nullable).
      • getAdsRenderingSettings

         abstract AdsRenderingSettings getAdsRenderingSettings()

        The ads rendering settings which will be used when requesting a stream.

        Returns:

        The AdsRenderingSettings (Nullable).

      • requestStream

         abstract Unit requestStream(StreamRequest streamRequest, AdsRenderingSettings adsRenderingSettings)

        Requests a Google DAI stream with the provided StreamRequest and AdsRenderingSettings.

        • Will not override the AdsRenderingSettings set from setAdsRenderingSettings.

        • If AdsRenderingSettings is passed, it will be used to request the Google DAI stream.

        • If AdsRenderingSettings is null, the AdsRenderingSettings from setAdsRenderingSettings will be used.

        Parameters:
        streamRequest - The StreamRequest to be used to request the Google DAI stream (NonNull).
        adsRenderingSettings - The AdsRenderingSettings to be used to request the Google DAI stream (Nullable).
      • contentTimeForStreamTime

         abstract Double contentTimeForStreamTime(Double streamTime)

        Returns the content time without ads for a given stream time. Returns the given stream time for live streams.

        • If the time entered is 15 seconds, after a pre-roll of 10 seconds, it will return 5 seconds.

        • Used to determine part of content, starting from total stream time.

        Parameters:
        streamTime - The stream time with inserted ads (in seconds).
        Returns:

        The content time.

      • streamTimeForContentTime

         abstract Double streamTimeForContentTime(Double contentTime)

        Returns the stream time with ads for a given content time. Returns the given content time for live streams.

        • If the time entered is 5 seconds, after a pre-roll of 10 seconds, it will return 15 seconds.

        • Used to determine total stream time, starting from content time only.

        Parameters:
        contentTime - The content time without any ads (in seconds).
        Returns:

        The stream time.

      • getCuePoints

         abstract List<CuePoint> getCuePoints()

        Returns a list of CuePoint where ads will be played.

        Returns:

        List of CuePoints.

      • getEnableSnapback

         abstract Boolean getEnableSnapback()

        Whether snapback is enabled. When enabled and the user seeks over multiple ad breaks, the last ad break that was seeked past will be played, if it has not been played yet.

      • setEnableSnapback

         abstract Unit setEnableSnapback(Boolean enableSnapback)

        Whether snapback is enabled. When enabled and the user seeks over multiple ad breaks, the last ad break that was seeked past will be played, if it has not been played yet.