Paket | org.osmf.metadata |
Klass | public class CuePoint |
Arv | CuePoint TimelineMarker Object |
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | 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.
Publika egenskaper
Egenskap | Definieras med | ||
---|---|---|---|
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
duration : Number [skrivskyddad]
The duration in seconds. | TimelineMarker | ||
name : String [skrivskyddad]
The name of the cue point. | CuePoint | ||
parameters : Object [skrivskyddad]
The parameters of the cue point. | CuePoint | ||
time : Number [skrivskyddad]
The time in seconds. | TimelineMarker | ||
type : String [skrivskyddad]
The type of cue point. | CuePoint |
Publika metoder
Metod | Definieras med | ||
---|---|---|---|
Constructor. | CuePoint | ||
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 | ||
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 |
Publika konstanter
Konstant | Definieras med | ||
---|---|---|---|
DYNAMIC_CUEPOINTS_NAMESPACE : String = "http://www.osmf.org/timeline/dynamicCuePoints/1.0" [statisk]
Namespace URL for a TimelineMetadata class that exposes
dynamic cue points. | CuePoint | ||
EMBEDDED_CUEPOINTS_NAMESPACE : String = "http://www.osmf.org/timeline/embeddedCuePoints/1.0" [statisk]
Namespace URL for a TimelineMetadata class that exposes
embedded cue points. | CuePoint |
Egenskapsdetaljer
name | egenskap |
parameters | egenskap |
type | egenskap |
Konstruktordetaljer
CuePoint | () | Konstruktor |
public function CuePoint(type:String, time:Number, name:String, parameters:Object, duration:Number = NaN)
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Constructor.
Parametrartype:String — The type of cue point specified by one of the const values in CuePointType.
| |
time:Number — The time value of the cue point in seconds.
| |
name:String — The name of the cue point.
| |
parameters:Object — Custom name/value data for the cue point.
| |
duration:Number (default = NaN ) — The duration value for the cue point in seconds.
|
Konstantdetaljer
DYNAMIC_CUEPOINTS_NAMESPACE | Konstant |
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 | Konstant |
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.
Exempel Så här använder du exemplet
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, 01:40 PM Z