Pacchetto | org.osmf.metadata |
Classe | public class TimelineMetadata |
Ereditarietà | TimelineMetadata ![]() ![]() ![]() |
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | 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.
Proprietà | Definito da | ||
---|---|---|---|
![]() | constructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto. | Object | |
numMarkers : int [sola lettura]
The number of TimelineMarker objects contained within this object. | TimelineMetadata |
Metodo | Definito da | ||
---|---|---|---|
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra un oggetto listener di eventi con un oggetto EventDispatcher, in modo che il listener riceva la notifica di un evento. | EventDispatcher | |
Adds the specified TimelineMarker to this object. | TimelineMetadata | ||
![]() |
Invia un evento nel flusso di eventi. | EventDispatcher | |
Returns the TimelineMarker at the specified index. | TimelineMetadata | ||
![]() |
Verifica se per l'oggetto EventDispatcher sono presenti listener registrati per un tipo specifico di evento. | EventDispatcher | |
![]() |
Indica se per un oggetto è definita una proprietà specifica. | Object | |
![]() |
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro. | Object | |
![]() |
Indica se la proprietà specificata esiste ed è enumerabile. | Object | |
![]() |
Rimuove un listener dall'oggetto EventDispatcher. | EventDispatcher | |
Removes the specified TimelineMarker from this object. | TimelineMetadata | ||
![]() |
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche. | Object | |
![]() |
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate. | Object | |
![]() |
Restituisce la rappresentazione in formato stringa dell'oggetto specificato. | Object | |
![]() |
Restituisce il valore di base dell'oggetto specificato. | Object | |
![]() |
Verifica se un listener di eventi è registrato con questo oggetto EventDispatcher o qualsiasi suo antenato per il tipo di evento specificato. | EventDispatcher |
Evento | Riepilogo | Definito da | ||
---|---|---|---|---|
![]() | [evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR ottiene lo stato di attivazione del sistema operativo ed entra nello stato attivo. | EventDispatcher | ||
![]() | [evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR perde l'attivazione del sistema operativo e sta entrando nello stato inattivo. | EventDispatcher |
numMarkers | proprietà |
addMarker | () | metodo |
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.
Parametri
marker:org.osmf.metadata:TimelineMarker — The marker to add.
|
Genera
ArgumentError — If marker is null or specifies an invalid time.
|
getMarkerAt | () | metodo |
public function getMarkerAt(index:int):org.osmf.metadata:TimelineMarker
Returns the TimelineMarker at the specified index. Note that the markers are sorted by time.
Parametri
index:int — The index of the marker to return.
|
org.osmf.metadata:TimelineMarker |
removeMarker | () | metodo |
public function removeMarker(marker:org.osmf.metadata:TimelineMarker):org.osmf.metadata:TimelineMarker
Removes the specified TimelineMarker from this object.
Parametri
marker:org.osmf.metadata:TimelineMarker — The marker to remove.
|
org.osmf.metadata:TimelineMarker |
Genera
ArgumentError — If marker is null.
|
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, 02:44 PM Z