Pacchetto | org.osmf.metadata |
Classe | public class CuePoint |
Ereditarietà | CuePoint ![]() ![]() |
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
A cue point is a media time value that has an associated action or piece of information. Typically, cue points are associated with video timelines to represent navigation points or event triggers.
The CuePoint class extends TimelineMarker, and as such can be added to a TimelineMetadata object.
Proprietà pubbliche
Proprietà | Definito da | ||
---|---|---|---|
![]() | constructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto. | Object |
Metodi pubblici
Metodo | Definito da | ||
---|---|---|---|
![]() |
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 | |
![]() |
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 |
Costanti pubbliche
Costante | Definito da | ||
---|---|---|---|
DYNAMIC_CUEPOINTS_NAMESPACE : String = "http://www.osmf.org/timeline/dynamicCuePoints/1.0" [statico]
Namespace URL for a TimelineMetadata class that exposes
dynamic cue points. | CuePoint | ||
EMBEDDED_CUEPOINTS_NAMESPACE : String = "http://www.osmf.org/timeline/embeddedCuePoints/1.0" [statico]
Namespace URL for a TimelineMetadata class that exposes
embedded cue points. | CuePoint |
Descrizione delle proprietà
Descrizione della funzione di costruzione
Descrizione delle costanti
DYNAMIC_CUEPOINTS_NAMESPACE | Costante |
public static const DYNAMIC_CUEPOINTS_NAMESPACE:String = "http://www.osmf.org/timeline/dynamicCuePoints/1.0"
Namespace URL for a TimelineMetadata class that exposes dynamic cue points.
EMBEDDED_CUEPOINTS_NAMESPACE | Costante |
public static const EMBEDDED_CUEPOINTS_NAMESPACE:String = "http://www.osmf.org/timeline/embeddedCuePoints/1.0"
Namespace URL for a TimelineMetadata class that exposes embedded cue points.
CuePointExample.as
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 CuePointExample extends Sprite { public function CuePointExample() { 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