Class APSMediaOverlay
java.lang.Object
com.appscend.media.APSMediaTrackableObject
com.appscend.media.events.APSMediaEvent
com.appscend.media.events.APSMediaOverlay
- All Implemented Interfaces:
android.os.Parcelable, Cloneable
APSMediaOverlay describes any overlay that the
APSMediaPlayer instance needs to render during playback.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDescribes the position the overlay should take when placed on-screen by the player.Nested classes/interfaces inherited from class APSMediaEvent
APSMediaEvent.APSMediaEventStateModifier and TypeClassDescriptionstatic enumDescribes the current lifecycle state of an APSMediaEvent.Nested classes/interfaces inherited from interface android.os.Parcelable
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionThe overlay's absolute horizontal offset in pixels, relative to the current origin.The overlay's absolute vertical offset in pixels, relative to the current origin.A refence to the overlay controller object.static final android.os.Parcelable.Creator<APSMediaOverlay> floatThe duration (in seconds) for the fade in effect of the overlay, when it is placed on and taken off screen.The height of the overlay.static final StringA HashMap containing the metadata associated with the overlaystatic final StringOverlay parameters.After being added to aAPSMediaUnitobject, a reference to this parent can be found here.Describes the position the overlay should take when placed on-screen by the player.floatIf this parameter is greater than 0, then the overlay will be reshown by the media player after the specific time interval (in seconds).The width of the overlay.intThe order of the overlay in the current view stack.Fields inherited from class APSMediaEvent
dynamicPosition, loaded, preloadInterval, preloadPoint, timeoutModifier and TypeFieldDescriptionbooleanprotected booleanlongDefines the number of seconds before the scheduled start point when the event should receive the preload call.longSet by the player to the current playback time in seconds, after the current event begins preloading.longDefines the maximum number of seconds the event is allowed to live once it has been pretriggered, without setting the loaded property to true.Fields inherited from class APSMediaTrackableObject
trackingURLsModifier and TypeFieldDescriptionThis dictionary defines all URLs that need to be notified of specific events from the object's lifecycle.Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a clone of the APSMediaOverlay objectintvoidThis method will be invoked on a different thread by the player, before the event start point, as set by the preTriggerInterval field.voidThis code will be executed once the event is triggered by the player.voidonUnload()This method will be invoked by the player once the event has reached the end point and will be deallocated.voidonUpdate()This method will be invoked by the player periodically, giving the event the opportunity to respond to updated playback information.voidwriteToParcel(android.os.Parcel dest, int flags) Methods inherited from class APSMediaEvent
adjustForAbsoluteDuration, adjustRelativeToDuration, claimPreload, endPoint, getState, incrementStartAndEndPointsWithInterval, needsToBeAdjustedRelativeToDuration, preload, preloadFor, registerEventStateListener, registerTimeoutListener, releaseClaim, releaseListeners, setEndPoint, setStartPoint, startPoint, trigger, unload, unregisterEventStateListener, unregisterEventTimeoutListener, updateStateModifier and TypeMethodDescriptionvoidvoidadjustRelativeToDuration(int duration) Translates percentual values set viasetStartPointto actual time intervals in seconds, relative to a specified total duration.booleanAtomically moves an unloaded event to preloading; only the caller that gets true may preload it.intendPoint()The time interval (in seconds) when the player needs to remove the overlay.getState()Get the current event statevoidincrementStartAndEndPointsWithInterval(float duration) Shifts air-time for an overlay by a defined amount of time.booleanDetermines if an overlay has start points, end points or duration relative to the unit duration.voidpreload()voidpreloadFor(APSMediaPlayer poster) Preloads the event for the player that scheduled it; onPreload stops if that player has finished.voidregisterEventStateListener(APSMediaEventStateListener newListener) Register a new listener for event state changes.voidregisterTimeoutListener(APSMediaEventTimeoutListener newListener) Register a new listener for event timeout notifications.booleanReturns a claim whose preload never started to the unloaded state; false if the event is not preloading.booleanreleaseListeners(Object listener) Unregisters both listeners; true only for the one caller that removed the state listener.voidsetEndPoint(String endPoint) Sets the ending time point of the overlay.voidsetStartPoint(String startPoint) Sets the starting time point of the overlay.intThe time interval (in seconds) when the player needs to display the overlay.voidtrigger()voidunload()voidUnregister a previously registered event state listenervoidUnregister a previously registered event timeout listenervoidupdateState(APSMediaEvent.APSMediaEventState newState) Update the event state
-
Field Details
-
kAPSMetadataType
- See Also:
-
MetadataClickPosition
- See Also:
-
type
-
parameters
-
position
Describes the position the overlay should take when placed on-screen by the player.
APSMediaOverlayPositionfor available values. -
controller
A refence to the overlay controller object. This is set by the player, on the overlay's initial render. -
zIndex
public int zIndexThe order of the overlay in the current view stack. -
width
The width of the overlay. Supports pixels (e.g.: "320") or percentages, relative to the total width (e.g.: "50%"). -
height
The height of the overlay. Supports pixels (e.g.: "320") or percentages, relative to the total height (e.g.: "50%"). -
absoluteOffsetX
The overlay's absolute horizontal offset in pixels, relative to the current origin. The current origin is determined by the overlay'spositionparameter, while the positive direction is always toward the center of the player surface. -
absoluteOffsetY
The overlay's absolute vertical offset in pixels, relative to the current origin. The current origin is determined by the overlay'spositionparameter, while the positive direction is always toward the center of the player surface. -
fadeInDuration
public float fadeInDurationThe duration (in seconds) for the fade in effect of the overlay, when it is placed on and taken off screen. -
repeatAfter
public float repeatAfterIf this parameter is greater than 0, then the overlay will be reshown by the media player after the specific time interval (in seconds). -
parentUnit
After being added to a
APSMediaUnitobject, a reference to this parent can be found here. -
metadata
-
CREATOR
-
-
Constructor Details
-
APSMediaOverlay
public APSMediaOverlay() -
APSMediaOverlay
protected APSMediaOverlay(android.os.Parcel in)
-
-
Method Details
-
cloneOverlay
Creates a clone of the APSMediaOverlay object- Returns:
- A clone of the APSMediaOverlay object
-
onPreload
public void onPreload()Description copied from class:APSMediaEventThis method will be invoked on a different thread by the player, before the event start point, as set by the preTriggerInterval field.- Specified by:
onPreloadin classAPSMediaEvent
-
onTrigger
public void onTrigger()Description copied from class:APSMediaEventThis code will be executed once the event is triggered by the player.- Specified by:
onTriggerin classAPSMediaEvent
-
onUnload
public void onUnload()Description copied from class:APSMediaEventThis method will be invoked by the player once the event has reached the end point and will be deallocated.- Specified by:
onUnloadin classAPSMediaEvent
-
onUpdate
public void onUpdate()Description copied from class:APSMediaEventThis method will be invoked by the player periodically, giving the event the opportunity to respond to updated playback information.- Specified by:
onUpdatein classAPSMediaEvent
-
describeContents
public int describeContents()- Specified by:
describeContentsin interfaceandroid.os.Parcelable- Overrides:
describeContentsin classAPSMediaEvent
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags) - Specified by:
writeToParcelin interfaceandroid.os.Parcelable- Overrides:
writeToParcelin classAPSMediaEvent
-