(Beta)
Package | org.osmf.metadata |
Class | public class CuePoint |
Inheritance | CuePoint TimelineMarker Object |
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | 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.
Public Properties
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
duration : Number [read-only]
The duration in seconds. | TimelineMarker | ||
name : String [read-only]
The name of the cue point. | CuePoint | ||
parameters : Object [read-only]
The parameters of the cue point. | CuePoint | ||
time : Number [read-only]
The time in seconds. | TimelineMarker | ||
type : String [read-only]
The type of cue point. | CuePoint |
Public Methods
Method | Defined By | ||
---|---|---|---|
Constructor. | CuePoint | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
Public Constants
Constant | Defined By | ||
---|---|---|---|
DYNAMIC_CUEPOINTS_NAMESPACE : String = "http://www.osmf.org/timeline/dynamicCuePoints/1.0" [static]
Namespace URL for a TimelineMetadata class that exposes
dynamic cue points. | CuePoint | ||
EMBEDDED_CUEPOINTS_NAMESPACE : String = "http://www.osmf.org/timeline/embeddedCuePoints/1.0" [static]
Namespace URL for a TimelineMetadata class that exposes
embedded cue points. | CuePoint |
Property Detail
name | property |
parameters | property |
type | property |
Constructor Detail
CuePoint | () | Constructor |
public function CuePoint(type:String, time:Number, name:String, parameters:Object, duration:Number = NaN)
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Constructor.
Parameterstype: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.
|
Constant Detail
DYNAMIC_CUEPOINTS_NAMESPACE | Constant |
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 | Constant |
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.
Examples How to use this example
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; } }
Wed Nov 21 2018, 06:34 AM -08:00