public class APSMediaUnit extends APSMediaEvent
APSMediaOverlay objects, defining the overlays connected to the unit.| Modifier and Type | Class and Description |
|---|---|
static class |
APSMediaUnit.APSHandleSeekEvent
Specifies how the unit should handle seeking through multiple ad breaks.
|
static class |
APSMediaUnit.APSMediaControlsDisplay
Specifies how the controls bar should be displayed for a media unit.
|
APSMediaEvent.APSMediaEventState| Modifier and Type | Field and Description |
|---|---|
boolean |
_positionedDynamicEvents |
java.util.ArrayList<APSMediaUnit> |
buffet
An array of other media units to be played instead of the current one, should an error be encountered.
|
boolean |
canReplay
Defines whether the player can replay the current unit or not after it has ended in the playlist.
|
APSMediaUnit.APSMediaControlsDisplay |
controlsDisplay
Defines how the controls bar will be displayed for the unit.
|
java.util.HashMap<java.lang.String,java.lang.Object> |
controlsParameters
The configuration for the controls bar overlay.
|
static <any> |
CREATOR |
boolean |
debug
Toggle to enable logs.
|
int |
initialPlaybackTime
Initial video playback time in seconds.
|
java.lang.String |
manager
The associated registered unit manager of this unit (for example the Marlin Unit Manager for DRM encoding.
|
java.util.HashMap<java.lang.String,java.lang.Object> |
metadata
A HashMap containing the metadata associated with the unit.
|
int |
midcontentAdMinimumFinalOffset
For ad breaks assigned to this unit without an ad offset (breaks that should be auto-positioned within the content), this parameter defines the minimum time interval in seconds (relative to the end of the video) that should be ad-free.
|
int |
midcontentAdMinimumInitialOffset
For ad breaks assigned to this unit without an ad offset (breaks that should be auto-positioned within the content), this parameter defines the minimum time interval in seconds to wait before displaying the first ad batch.
|
int |
midcontentAdMinimumSpacing
For ad breaks assigned to this unit without an ad offset (breaks that should be auto-positioned within the content), this parameter defines the minimum time interval in seconds to wait between ad batches.
|
boolean |
pinchToFullscreen
Defines if pinch-to-fullscreen should be allowed.
|
boolean |
played |
java.lang.String |
renderer
The renderer associated with this unit.
|
APSMediaUnit.APSHandleSeekEvent |
seekHandling
Defines how mid content ads should be handled when the user has skipped over several batches.
|
boolean |
shouldAutoplay
Defines if the unit should start playing as soon as it loads or wait for a play command.
|
APSVastAdBreak |
sourceAdBreak |
java.lang.String |
subtitlesUrl
The URL of an SubRip subtitles file to be sideloaded
|
java.lang.String |
url
The video clip URL.
|
dynamicPosition, loaded, preloadInterval, preloadPoint, repeatAfter, timeouttrackingURLs| Modifier | Constructor and Description |
|---|---|
|
APSMediaUnit() |
protected |
APSMediaUnit(Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEvent(APSMediaEvent event) |
void |
addOverlay(APSMediaOverlay overlay)
Adds an
APSMediaOverlay object to the unit, to be rendered together. |
void |
clearOverlays()
Removes all currently connected overlays.
|
APSMediaUnit |
copyWithZone() |
int |
describeContents() |
java.util.ArrayList<APSMediaEvent> |
dynamicEvents() |
java.util.ArrayList<APSMediaEvent> |
events() |
void |
initWithURL(java.lang.String url) |
void |
onPreload()
This method will be invoked on a different thread by the player,
before the event start point, as set by the preTriggerInterval field.
|
void |
onTrigger()
This code will be executed once the event is triggered by the player.
|
void |
onUnload()
This method will be invoked by the player once the event has reached
the end point and will be deallocated.
|
void |
onUpdate()
This method will be invoked by the player periodically, giving the event
the opportunity to respond to updated playback information.
|
java.util.ArrayList<APSMediaOverlay> |
overlays()
Returns an array containing all
APSMediaOverlay objects currently connected to the unit. |
void |
setEvents(java.util.ArrayList<java.lang.Object> events)
Connects an array of APSMediaEvent objects to the current unit (for example APSVastAdBreak objects)
|
void |
setOverlays(java.util.ArrayList<java.lang.Object> overlays)
Connects an array of
APSMediaOverlay objects to the current unit. |
void |
writeToParcel(Parcel dest,
int flags) |
adjustForAbsoluteDuration, adjustRelativeToDuration, endPoint, getState, incrementStartAndEndPointsWithInterval, needsToBeAdjustedRelativeToDuration, preload, registerEventStateListener, registerTimeoutListener, setEndPoint, setStartPoint, startPoint, trigger, unload, unregisterEventStateListener, unregisterEventTimeoutListener, updateStatepublic java.lang.String url
public java.lang.String subtitlesUrl
public int initialPlaybackTime
public APSMediaUnit.APSMediaControlsDisplay controlsDisplay
APSMediaControlsDisplay for possible values.public java.util.HashMap<java.lang.String,java.lang.Object> controlsParameters
APSMediaPlayerControlsOverlayController.public java.util.ArrayList<APSMediaUnit> buffet
public java.util.HashMap<java.lang.String,java.lang.Object> metadata
A HashMap containing the metadata associated with the unit.
public boolean pinchToFullscreen
public boolean debug
public boolean shouldAutoplay
public boolean played
public boolean canReplay
public java.lang.String manager
public APSMediaUnit.APSHandleSeekEvent seekHandling
public int midcontentAdMinimumInitialOffset
public int midcontentAdMinimumFinalOffset
public int midcontentAdMinimumSpacing
public java.lang.String renderer
public boolean _positionedDynamicEvents
public APSVastAdBreak sourceAdBreak
public static final <any> CREATOR
public APSMediaUnit()
protected APSMediaUnit(Parcel in)
public void initWithURL(java.lang.String url)
public void addOverlay(APSMediaOverlay overlay)
APSMediaOverlay object to the unit, to be rendered together.overlay - The APSMediaPlayer object to be connected to the unit.public void addEvent(APSMediaEvent event)
public void setOverlays(java.util.ArrayList<java.lang.Object> overlays)
APSMediaOverlay objects to the current unit.overlays - An array of APSMediaOverlay objects to be connected to the unit.public void setEvents(java.util.ArrayList<java.lang.Object> events)
public void clearOverlays()
public java.util.ArrayList<APSMediaOverlay> overlays()
APSMediaOverlay objects currently connected to the unit.APSMediaOverlay objects.public java.util.ArrayList<APSMediaEvent> events()
public java.util.ArrayList<APSMediaEvent> dynamicEvents()
public APSMediaUnit copyWithZone()
public void onPreload()
APSMediaEventonPreload in class APSMediaEventpublic void onTrigger()
APSMediaEventonTrigger in class APSMediaEventpublic void onUnload()
APSMediaEventonUnload in class APSMediaEventpublic void onUpdate()
APSMediaEventonUpdate in class APSMediaEventpublic int describeContents()
describeContents in class APSMediaEventpublic void writeToParcel(Parcel dest,
int flags)
writeToParcel in class APSMediaEvent