Paket | org.osmf.metadata |
Klass | public class TimelineMetadata |
Arv | TimelineMetadata Metadata EventDispatcher Object |
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
TimelineMetadata uses the TimelineMarker class to represent both keys and values (i.e. a TimelineMarker will be stored as both key and value). A TimelineMetadata object dispatches a TimelineMetadataEvent when the currentTime property of the MediaElement's TimeTrait matches any of the time values in its collection of TimelineMarker objects.
Egenskap | Definieras med | ||
---|---|---|---|
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
keys : Vector.<String> [skrivskyddad]
The keys stored in this Metadata object. | Metadata | ||
numMarkers : int [skrivskyddad]
The number of TimelineMarker objects contained within this object. | TimelineMetadata |
Metod | Definieras med | ||
---|---|---|---|
TimelineMetadata(media:MediaElement)
Constructor. | TimelineMetadata | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registrerar ett händelseavlyssnarobjekt för ett EventDispatcher-objekt så att avlyssnaren får meddelanden om händelser. | EventDispatcher | ||
Adds the specified TimelineMarker to this object. | TimelineMetadata | ||
Stores the specified value in this Metadata object, using the specified
key. | Metadata | ||
Skickar en händelse till händelseflödet. | EventDispatcher | ||
Returns the TimelineMarker at the specified index. | TimelineMetadata | ||
Returns the value associate with the specified key. | Metadata | ||
Kontrollerar om EventDispatcher-objektet har några avlyssnare registrerade för en viss typ av händelse. | EventDispatcher | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Tar bort en avlyssnare från EventDispatcher-objektet. | EventDispatcher | ||
Removes the specified TimelineMarker from this object. | TimelineMetadata | ||
Removes the value associated with the specified key from this
Metadata object. | Metadata | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Returnerar det angivna objektets strängbeteckning. | Object | ||
Returnerar det angivna objektets primitiva värde. | Object | ||
Kontrollerar om en händelseavlyssnare är registrerad för det här EventDispatcher-objektet eller något av dess överordnade objekt för den angivna händelsetypen. | EventDispatcher |
Händelse | Sammanfattning | Definieras med | ||
---|---|---|---|---|
[utsändningshändelse] Skickas när Flash Player eller AIR får operativsystemfokus och blir aktivt. | EventDispatcher | |||
[utsändningshändelse] Skickas när Flash Player eller AIR förlorar operativsystemfokus och blir inaktivt. | EventDispatcher | |||
Dispatched when a TimelineMarker is added to this object. | TimelineMetadata | |||
Dispatched when the currentTime property of the MediaElement associated with this TimelineMetadata has reached the duration offset of one of the TimelineMarkers in this TimelineMetadata. | TimelineMetadata | |||
Dispatched when a TimelineMarker is removed from this object. | TimelineMetadata | |||
Dispatched when the currentTime property of the MediaElement associated with this TimelineMetadata has reached the time value of one of the TimelineMarkers in this TimelineMetadata. | TimelineMetadata | |||
Dispatched when a new value is added to the Metadata object. | Metadata | |||
Dispatched when a value within the Metadata object changes. | Metadata | |||
Dispatched when a value is removed from the Metadata object. | Metadata |
numMarkers | egenskap |
TimelineMetadata | () | Konstruktor |
public function TimelineMetadata(media:MediaElement)
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Constructor.
Parametrarmedia:MediaElement — The media element this timeline metadata applies to.
|
Utlöser
ArgumentError — If the media argument is null.
|
addMarker | () | metod |
public function addMarker(marker:org.osmf.metadata:TimelineMarker):void
Adds the specified TimelineMarker to this object. This class maintains the TimelineMarkers in time order. If another TimelineMarker with the same time value exists within this object, then the existing value will be overwritten.
Parametrar
marker:org.osmf.metadata:TimelineMarker — The marker to add.
|
Utlöser
ArgumentError — If marker is null or specifies an invalid time.
|
getMarkerAt | () | metod |
public function getMarkerAt(index:int):org.osmf.metadata:TimelineMarker
Returns the TimelineMarker at the specified index. Note that the markers are sorted by time.
Parametrar
index:int — The index of the marker to return.
|
org.osmf.metadata:TimelineMarker |
removeMarker | () | metod |
public function removeMarker(marker:org.osmf.metadata:TimelineMarker):org.osmf.metadata:TimelineMarker
Removes the specified TimelineMarker from this object.
Parametrar
marker:org.osmf.metadata:TimelineMarker — The marker to remove.
|
org.osmf.metadata:TimelineMarker |
Utlöser
ArgumentError — If marker is null.
|
markerAdd | Händelse |
org.osmf.events.TimelineMetadataEvent
egenskap TimelineMetadataEvent.type =
org.osmf.events.TimelineMetadataEvent.MARKER_ADD
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when a TimelineMarker is added to this object.
The TimelineMetadataEvent.MARKER_ADD constant defines the value of the type property of the event object for a markerAdd event.markerDurationReached | Händelse |
org.osmf.events.TimelineMetadataEvent
egenskap TimelineMetadataEvent.type =
org.osmf.events.TimelineMetadataEvent.MARKER_TIME_REACHED
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when the currentTime property of the MediaElement associated with this TimelineMetadata has reached the duration offset of one of the TimelineMarkers in this TimelineMetadata.
The TimelineMetadataEvent.MARKER_TIME_REACHED constant defines the value of the type property of the event object for a markerTimeReached event.markerRemove | Händelse |
org.osmf.events.TimelineMetadataEvent
egenskap TimelineMetadataEvent.type =
org.osmf.events.TimelineMetadataEvent.MARKER_REMOVE
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when a TimelineMarker is removed from this object.
The TimelineMetadataEvent.MARKER_REMOVE constant defines the value of the type property of the event object for a markerRemove event.markerTimeReached | Händelse |
org.osmf.events.TimelineMetadataEvent
egenskap TimelineMetadataEvent.type =
org.osmf.events.TimelineMetadataEvent.MARKER_TIME_REACHED
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when the currentTime property of the MediaElement associated with this TimelineMetadata has reached the time value of one of the TimelineMarkers in this TimelineMetadata.
The TimelineMetadataEvent.MARKER_TIME_REACHED constant defines the value of the type property of the event object for a markerTimeReached event.package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import org.osmf.elements.VideoElement; import org.osmf.events.MediaElementEvent; import org.osmf.events.TimelineMetadataEvent; import org.osmf.media.MediaPlayerSprite; import org.osmf.media.URLResource; import org.osmf.metadata.CuePoint; import org.osmf.metadata.TimelineMetadata; public class TimelineMetadataExample extends Sprite { public function TimelineMetadataExample() { super(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; var mediaPlayerSprite:MediaPlayerSprite = new MediaPlayerSprite(); var urlResource:URLResource = new URLResource("rtmp://cp67126.edgefcs.net/ondemand/mp4:mediapm/osmf/content/test/cuepoints/spacealonehd_sounas_640_with_nav.f4v"); videoElement= new VideoElement(); videoElement.resource = urlResource; videoElement.addEventListener(MediaElementEvent.METADATA_ADD, onMetadataAdd); addChild(mediaPlayerSprite); mediaPlayerSprite.media = videoElement; } private function onMetadataAdd(event:MediaElementEvent):void { if (event.namespaceURL == CuePoint.DYNAMIC_CUEPOINTS_NAMESPACE) { var timelineMetadata:TimelineMetadata = videoElement.getMetadata(CuePoint.DYNAMIC_CUEPOINTS_NAMESPACE) as TimelineMetadata; timelineMetadata.addEventListener(TimelineMetadataEvent.MARKER_TIME_REACHED, onCuePoint); } } private function onCuePoint(event:TimelineMetadataEvent):void { var cuePoint:CuePoint = event.marker as CuePoint; trace("Cue Point at " + cuePoint.time); } private var videoElement:VideoElement; } }
Tue Jun 12 2018, 01:40 PM Z