套件 | org.osmf.net |
類別 | public class StreamingURLResource |
繼承 | StreamingURLResource URLResource MediaResourceBase Object |
子類別 | DynamicStreamingResource, MulticastResource |
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Note that it is possible for live and recorded streams to have identical URLs. In such a case, the streamType property should be used to disambiguate live and recorded streams.
屬性 | 定義自 | ||
---|---|---|---|
alternativeAudioStreamItems : Vector.<StreamingItem>
Vector containing all alternative audio items associated with
the current streaming resource. | StreamingURLResource | ||
clipEndTime : Number
Optional end time of the streaming resource. | StreamingURLResource | ||
clipStartTime : Number
Optional start time of the streaming resource. | StreamingURLResource | ||
connectionArguments : Vector.<Object>
Optional set of arguments that will be supplied when making a
connection to the source of the stream. | StreamingURLResource | ||
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
drmContentData : ByteArray
Content metadata for DRM-encrypted content. | StreamingURLResource | ||
mediaType : String
The MediaType, if any, of this resource. | MediaResourceBase | ||
metadataNamespaceURLs : Vector.<String> [唯讀]
A Vector containing the namespace URLs for all Metadata
objects within this resource. | MediaResourceBase | ||
mimeType : String
The MIME type, if any, of this resource. | MediaResourceBase | ||
streamType : String
The StreamType for this resource. | StreamingURLResource | ||
url : String [唯讀]
The URL of the resource. | URLResource | ||
urlIncludesFMSApplicationInstance : Boolean
Indicates, for RTMP streaming URLs, whether the URL includes the FMS
application instance or not. | StreamingURLResource |
方法 | 定義自 | ||
---|---|---|---|
StreamingURLResource(url:String, streamType:String = null, clipStartTime:Number = NaN, clipEndTime:Number = NaN, connectionArguments:Vector.<Object> = null, urlIncludesFMSApplicationInstance:Boolean = false, drmContentData:ByteArray = null)
Constructor. | StreamingURLResource | ||
Adds a metadata value to this resource. | MediaResourceBase | ||
Retrieves a metadata value from this resource. | MediaResourceBase | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
Removes a metadata value from this resource. | MediaResourceBase | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object |
alternativeAudioStreamItems | 屬性 |
alternativeAudioStreamItems:Vector.<StreamingItem>
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.6 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Vector containing all alternative audio items associated with the current streaming resource.
實作
public function get alternativeAudioStreamItems():Vector.<StreamingItem>
public function set alternativeAudioStreamItems(value:Vector.<StreamingItem>):void
clipEndTime | 屬性 |
clipEndTime:Number
Optional end time of the streaming resource. When specified, the stream will be presented as a subclip, with playback ending at the specified end time. Note that clipEndTime is not currently supported for progressive videos. The default is NaN, which is to play to the end.
實作
public function get clipEndTime():Number
public function set clipEndTime(value:Number):void
clipStartTime | 屬性 |
clipStartTime:Number
Optional start time of the streaming resource. When specified, the stream will be presented as a subclip, with playback beginning at the specified start time. Note that clipStartTime is not currently supported for progressive videos. The default is NaN, which is to start at the beginning.
實作
public function get clipStartTime():Number
public function set clipStartTime(value:Number):void
connectionArguments | 屬性 |
drmContentData | 屬性 |
streamType | 屬性 |
streamType:String
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
The StreamType for this resource. The default value is StreamType.RECORDED
.
The StreamType class enumerates the valid stream types.
This property may return the following string values:
String value | Description |
---|---|
StreamType.LIVE_OR_RECORDED | The StreamingURLResource represents either a live or a recorded stream. |
StreamType.LIVE | The StreamingURLResource represents a live stream. |
StreamType.RECORDED | The StreamingURLResource represents a recorded stream. |
StreamType.DVR | The StreamingURLResource represents a DVR stream. |
實作
public function get streamType():String
public function set streamType(value:String):void
相關 API 元素
urlIncludesFMSApplicationInstance | 屬性 |
urlIncludesFMSApplicationInstance:Boolean
Indicates, for RTMP streaming URLs, whether the URL includes the FMS
application instance or not. If true, then the second part of the URL
path is considered the instance name, such as rtmp://host/app/foo/bar/stream
.
In this case the instance name would be 'foo' and the stream would be 'bar/stream'.
If false, then the second part of the URL path is considered to be the
stream name, such as rtmp://host/app/foo/bar/stream
. In this
case there is no instance name and the stream would be 'foo/bar/stream'.
The default is false.
實作
public function get urlIncludesFMSApplicationInstance():Boolean
public function set urlIncludesFMSApplicationInstance(value:Boolean):void
StreamingURLResource | () | 建構函式 |
public function StreamingURLResource(url:String, streamType:String = null, clipStartTime:Number = NaN, clipEndTime:Number = NaN, connectionArguments:Vector.<Object> = null, urlIncludesFMSApplicationInstance:Boolean = false, drmContentData:ByteArray = null)
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Constructor.
參數url:String — The URL of the resource. For details about how to format this
URL for flv, mp4, and other file formats, see the Adobe® Flash® Media Server
documentation link below.
| |
streamType:String (default = null ) — The type of the stream. If null, defaults to
StreamType.RECORDED.
| |
clipStartTime:Number (default = NaN ) — Optional start time of the streaming
resource. When specified, the stream will be presented as a
subclip, with playback beginning at the specified start time.
| |
clipEndTime:Number (default = NaN ) — Optional end time of the streaming resource.
When specified, the stream will be presented as a subclip, with
playback ending at the specified end time.
| |
connectionArguments:Vector.<Object> (default = null ) — Optional set of arguments that will be
supplied to NetConnection.connect when establishing a connection
to the source of the stream.
| |
urlIncludesFMSApplicationInstance:Boolean (default = false ) — Indicates, for RTMP streaming
URLs, whether the URL includes the FMS application instance or not. If
true, then the second part of the URL path is considered the instance
name, such as rtmp://host/app/foo/bar/stream . In this case
the instance name would be 'foo' and the stream would be 'bar/stream'.
If false, then the second part of the URL path is considered to be the
stream name, such as rtmp://host/app/foo/bar/stream . In this
case there is no instance name and the stream would be 'foo/bar/stream'.
The default is false.
| |
drmContentData:ByteArray (default = null ) — Content metadata for DRM-encrypted content.
|
詳細資訊
package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import org.osmf.elements.VideoElement; import org.osmf.media.MediaPlayerSprite; import org.osmf.net.StreamType; import org.osmf.net.StreamingURLResource; public class StreamingURLResourceExample extends Sprite { public function StreamingURLResourceExample() { super(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; var mediaPlayerSprite:MediaPlayerSprite = new MediaPlayerSprite(); var videoElement:VideoElement = new VideoElement(); videoElement.resource = new StreamingURLResource("rtmp://cp34973.live.edgefcs.net/live/Flash_Live_Benchmark@632", StreamType.LIVE); addChild(mediaPlayerSprite); mediaPlayerSprite.media = videoElement; } } }
Tue Jun 12 2018, 03:47 PM Z