Interface GoogleDaiIntegration
-
- All Implemented Interfaces:
-
com.theoplayer.android.api.Integration
public interface GoogleDaiIntegration implements Integration
The Google DAI Integration API.
-
-
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 Unit
focus()
Moves the focus on the skip button if present. abstract Boolean
getEnableSnapback()
Whether snapback is enabled. abstract Unit
setEnableSnapback(Boolean enableSnapback)
Whether snapback is enabled. -
-
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.
-
focus
abstract Unit focus()
Moves the focus on the skip button if present. If not present, focus is put on interactive elements, including icons or interactive creatives.
-
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.
-
-
-
-