An object which manages dynamic ad insertion streams. After the
StreamManager is retrieved from an AdsManagerLoadedEvent, init
should be called.
Public Method Summary
| abstract double |
getContentTimeForStreamTime(double streamTime)
This method is deprecated.
- Use
getContentTimeMsForStreamTimeMs(long) since it uses
fixed-point precision.
|
| abstract long |
getContentTimeMsForStreamTimeMs(long streamTimeMs)
Converts time offset within the stream to time offset of the underlying content, excluding ads.
|
| abstract List<CuePoint> |
getCuePoints()
Returns the
CuePoints for the current VOD stream, which are available
after CUEPOINTS_CHANGED is broadcast. |
| abstract CuePoint |
getPreviousCuePointForStreamTime(double streamTime)
This method is deprecated.
- Use
getPreviousCuePointForStreamTimeMs(long) since it uses
fixed-point precision.
|
| abstract CuePoint |
getPreviousCuePointForStreamTimeMs(long streamTimeMs)
Returns the previous cuepoint for the given VOD stream time.
|
| abstract String |
getStreamId()
Get the identifier used during server side ad insertion to uniquely identify a stream.
|
| abstract double |
getStreamTimeForContentTime(double contentTime)
This method is deprecated.
- Use
getStreamTimeMsForContentTimeMs(long) since it uses
fixed-point precision.
|
| abstract long |
getStreamTimeMsForContentTimeMs(long contentTimeMs)
Converts time offset within the content to time offset of the underlying stream, including ads.
|
| abstract void |
loadThirdPartyStream(String streamUrl, List<? extends Map<String, String>> streamSubtitles)
Requests SDK to retrieve the ad metadata and then load the provided streamManifestUrl and
streamSubtitles into player.
|
| abstract void |
replaceAdTagParameters(Map<String, String> adTagParameters)
Replaces all the ad tag parameters used for the upcoming ad requests for a live stream.
|
Inherited Method Summary
Public Methods
public abstract double getContentTimeForStreamTime (double streamTime)
This method is deprecated.
- Use getContentTimeMsForStreamTimeMs(long) since it uses
fixed-point precision.
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.
Parameters
| streamTime | the stream time with inserted ads (in seconds). |
|---|
Returns
- the content time that corresponds with the given stream time once ads are removed.
public abstract long getContentTimeMsForStreamTimeMs (long streamTimeMs)
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.
Parameters
| streamTimeMs | the stream time with inserted ads (in ms). |
|---|
Returns
- the content time that corresponds with the given stream time once ads are removed.
public abstract List<CuePoint> getCuePoints ()
Returns the CuePoints for the current VOD stream, which are available
after CUEPOINTS_CHANGED is broadcast. Returns
empty list for live streams.
public abstract CuePoint getPreviousCuePointForStreamTime (double streamTime)
This method is deprecated.
- Use getPreviousCuePointForStreamTimeMs(long) since it uses
fixed-point precision.
Returns the previous cuepoint 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 in order to return the user to a skipped ad break.
Parameters
| streamTime | the stream time (in seconds). |
|---|
Returns
- the previous
CuePointfor the given stream time.
public abstract CuePoint getPreviousCuePointForStreamTimeMs (long streamTimeMs)
Returns the previous cuepoint 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 in order to return the user to a skipped ad break.
Parameters
| streamTimeMs | the stream time (in ms). |
|---|
Returns
- the previous
CuePointfor the given stream time.
public abstract String getStreamId ()
Get the identifier used during server side ad insertion to uniquely identify a stream. Returns null if server side ad insertion was not used.
public abstract double getStreamTimeForContentTime (double contentTime)
This method is deprecated.
- Use getStreamTimeMsForContentTimeMs(long) since it uses
fixed-point precision.
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.
Parameters
| contentTime | the content time without any ads (in seconds). |
|---|
Returns
- the stream time that corresponds with the given content time once ads are inserted.
public abstract long getStreamTimeMsForContentTimeMs (long contentTimeMs)
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.
Parameters
| contentTimeMs | the content time without any ads (in ms). |
|---|
Returns
- the stream time that corresponds with the given content time once ads are inserted.
public abstract void loadThirdPartyStream (String streamUrl, List<? extends Map<String, String>> streamSubtitles)
Requests SDK to retrieve the ad metadata and then load the provided streamManifestUrl and streamSubtitles into player. This should be manually triggered once the stream manifest has been retrieved from 3rd party video stitcher. This is only used for Pod Serving VOD with 3rd party video stitcher, and is no-op for other stream request types.
Parameters
| streamUrl | the manifest url for the stream with dynamic ad insertion. |
|---|---|
| streamSubtitles | the subtitles array for the stream. Detail format see VideoStreamPlayer#loadUrl.
|
public abstract void replaceAdTagParameters (Map<String, String> adTagParameters)
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.
Parameters
| adTagParameters | the new ad tag parameters to use for the current stream. |
|---|