套件 | org.osmf.metadata |
類別 | public class CuePoint |
繼承 | CuePoint ![]() ![]() |
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | 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.
公用方法
方法 | 定義自 | ||
---|---|---|---|
![]() |
指出物件是否有已定義的指定屬性。 | Object | |
![]() |
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | |
![]() |
指出指定的屬性是否存在,以及是否可列舉。 | Object | |
![]() |
為迴圈作業設定動態屬性的可用性。 | Object | |
![]() |
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | |
![]() |
會傳回指定之物件的字串形式。 | Object | |
![]() |
會傳回指定之物件的基本值。 | Object |
公用常數
常數 | 定義自 | ||
---|---|---|---|
DYNAMIC_CUEPOINTS_NAMESPACE : String = "http://www.osmf.org/timeline/dynamicCuePoints/1.0" [靜態]
Namespace URL for a TimelineMetadata class that exposes
dynamic cue points. | CuePoint | ||
EMBEDDED_CUEPOINTS_NAMESPACE : String = "http://www.osmf.org/timeline/embeddedCuePoints/1.0" [靜態]
Namespace URL for a TimelineMetadata class that exposes
embedded cue points. | CuePoint |
屬性詳細資訊
建構函式詳細資料
常數詳細資訊
DYNAMIC_CUEPOINTS_NAMESPACE | 常數 |
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 | 常數 |
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, 03:47 PM Z