public abstract class APSMediaEvent extends APSMediaTrackableObject
| Modifier and Type | Class and Description |
|---|---|
static class |
APSMediaEvent.APSMediaEventState
Describes the current lifecycle state of an APSMediaEvent.
|
| Modifier and Type | Field and Description |
|---|---|
boolean |
dynamicPosition |
protected boolean |
loaded |
long |
preloadInterval
Defines the number of seconds before the scheduled start point when the event
should receive the preload call.
|
long |
preloadPoint
Set by the player to the current playback time in seconds, after the current event
begins preloading.
|
long |
repeatAfter
If this parameter is greater than 0, then the event will be retriggered by the
media player after the specific time interval (in seconds).
|
long |
timeout
Defines the maximum number of seconds the event is allowed to live once it has been
pretriggered, without setting the loaded property to true.
|
trackingURLs| Modifier | Constructor and Description |
|---|---|
|
APSMediaEvent() |
protected |
APSMediaEvent(Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustForAbsoluteDuration() |
void |
adjustRelativeToDuration(int duration)
Translates percentual values set via
setStartPoint to actual time intervals in seconds, relative to a specified total duration. |
int |
describeContents() |
int |
endPoint()
The time interval (in seconds) when the player needs to remove the overlay.
|
APSMediaEvent.APSMediaEventState |
getState()
Get the current event state
|
void |
incrementStartAndEndPointsWithInterval(float duration)
Shifts air-time for an overlay by a defined amount of time.
|
boolean |
needsToBeAdjustedRelativeToDuration()
Determines if an overlay has start points, end points or duration relative to the unit duration.
|
abstract 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.
|
abstract void |
onTrigger()
This code will be executed once the event is triggered by the player.
|
abstract void |
onUnload()
This method will be invoked by the player once the event has reached
the end point and will be deallocated.
|
abstract void |
onUpdate()
This method will be invoked by the player periodically, giving the event
the opportunity to respond to updated playback information.
|
void |
preload() |
void |
registerEventStateListener(APSMediaEventStateListener newListener)
Register a new listener for event state changes.
|
void |
registerTimeoutListener(APSMediaEventTimeoutListener newListener)
Register a new listener for event timeout notifications.
|
void |
setEndPoint(java.lang.String endPoint)
Sets the ending time point of the overlay.
|
void |
setStartPoint(java.lang.String startPoint)
Sets the starting time point of the overlay.
|
int |
startPoint()
The time interval (in seconds) when the player needs to display the overlay.
|
void |
trigger() |
void |
unload() |
void |
unregisterEventStateListener(APSMediaEventStateListener listener)
Unregister a previously registered event state listener
|
void |
unregisterEventTimeoutListener(APSMediaEventTimeoutListener listener)
Unregister a previously registered event timeout listener
|
void |
updateState(APSMediaEvent.APSMediaEventState newState)
Update the event state
|
void |
writeToParcel(Parcel dest,
int flags) |
public long preloadInterval
public long preloadPoint
public long repeatAfter
public long timeout
protected boolean loaded
public boolean dynamicPosition
public APSMediaEvent()
protected APSMediaEvent(Parcel in)
public abstract void onPreload()
public abstract void onTrigger()
public abstract void onUnload()
public abstract void onUpdate()
public void trigger()
public void preload()
public void unload()
public void setStartPoint(java.lang.String startPoint)
startPoint - A string format describing the time point when the player needs to display the overlay. Possible values are seconds (e.g.: "60") or a percentage relative to the total duration of the parent clip (e.g.: "50%").public void setEndPoint(java.lang.String endPoint)
endPoint - A string format describing the time point when the player needs to remove the overlay. Possible values are seconds (e.g.: "60") or a percentage relative to the total duration of the parent clip (e.g.: "50%").public int startPoint()
public int endPoint()
public void incrementStartAndEndPointsWithInterval(float duration)
duration - Shift duration in seconds.public void adjustRelativeToDuration(int duration)
setStartPoint to actual time intervals in seconds, relative to a specified total duration.duration - The total duration.public void adjustForAbsoluteDuration()
public boolean needsToBeAdjustedRelativeToDuration()
public void updateState(APSMediaEvent.APSMediaEventState newState)
public APSMediaEvent.APSMediaEventState getState()
public void registerEventStateListener(APSMediaEventStateListener newListener)
newListener - - an object implementing the APSMediaEventStateListener interface.public void unregisterEventStateListener(APSMediaEventStateListener listener)
listener - - an object implementing APSMediaEventStateListener
that has previously been use to subscribe to eventspublic void registerTimeoutListener(APSMediaEventTimeoutListener newListener)
newListener - - an object implementing the APSMediaEventTimeoutListener interface.public void unregisterEventTimeoutListener(APSMediaEventTimeoutListener listener)
listener - an object implementing APSMediaEventTimeoutListener
* that has previously been use to subscribe to eventspublic int describeContents()
public void writeToParcel(Parcel dest,
int flags)