패키지 | org.osmf.net |
클래스 | public class DynamicStreamingResource |
상속 | DynamicStreamingResource StreamingURLResource URLResource MediaResourceBase Object |
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
This class provides an object representation of a dynamic streaming resource without any knowledge or assumption of any file format, such as SMIL, Media RSS, F4M, etc.
공용 속성
속성 | 정의 주체 | ||
---|---|---|---|
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 | ||
host : String [읽기 전용]
A URL representing the host of the dynamic streaming resource. | DynamicStreamingResource | ||
initialIndex : int
The preferred starting index. | DynamicStreamingResource | ||
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 | ||
streamItems : Vector.<DynamicStreamingItem>
Vector of DynamicStreamingItems. | DynamicStreamingResource | ||
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 |
공용 메서드
메서드 | 정의 주체 | ||
---|---|---|---|
Constructor. | DynamicStreamingResource | ||
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 |
속성 세부 정보
host | 속성 |
initialIndex | 속성 |
initialIndex:int
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
The preferred starting index.
구현
public function get initialIndex():int
public function set initialIndex(value:int):void
오류
RangeError — If the index is out of range.
From OSMF 2.0 upwards you can set the initialIndex through a metadata as
well, using the RESOURCE_INITIAL_INDEX key. This metadata can be added to
any media resource, such as an URLResource, and it will be used to set
the initial index when the DynamicStreamingResource is created.
For example, having resource as a URLResource you can set the initialIndex
in the following way:
resource.addMetadata(MetadataNamespaces.RESOURCE_INITIAL_INDEX, 1);
The RESOURCE_INITIAL_INDEX metadata accepts integers, and will adjust the
value to fit into the streamItems range. This means that if the specified
value is negative it will be adjusted to 0, and if it is larger than the
available streamItems, then it will be adjusted to the greatest streamItem
index.
|
streamItems | 속성 |
streamItems:Vector.<DynamicStreamingItem>
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Vector of DynamicStreamingItems. Each item represents a different bitrate stream.
구현
public function get streamItems():Vector.<DynamicStreamingItem>
public function set streamItems(value:Vector.<DynamicStreamingItem>):void
생성자 세부 정보
DynamicStreamingResource | () | 생성자 |
public function DynamicStreamingResource(host:String, streamType:String = null)
언어 버전: | ActionScript 3.0 |
제품 버전: | OSMF 1.0 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Constructor.
매개 변수host:String — A URL representing the host of the dynamic streaming resource.
| |
streamType:String (default = null ) — The type of the stream. If null, defaults to StreamType.RECORDED.
|
예제 예제 사용 방법
DynamicStreamingResourceExample.as
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.DynamicStreamingItem; import org.osmf.net.DynamicStreamingResource; public class DynamicStreamingResourceExample extends Sprite { public function DynamicStreamingResourceExample() { super(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; var mediaPlayerSprite:MediaPlayerSprite = new MediaPlayerSprite(); var videoElement:VideoElement = new VideoElement(); var dynResource:DynamicStreamingResource = new DynamicStreamingResource("rtmp://cp67126.edgefcs.net/ondemand"); dynResource.streamItems = Vector.<DynamicStreamingItem>( [ new DynamicStreamingItem("mp4:mediapm/ovp/content/demo/video/elephants_dream/elephants_dream_768x428_24.0fps_408kbps.mp4", 408, 768, 428) , new DynamicStreamingItem("mp4:mediapm/ovp/content/demo/video/elephants_dream/elephants_dream_768x428_24.0fps_608kbps.mp4", 608, 768, 428) , new DynamicStreamingItem("mp4:mediapm/ovp/content/demo/video/elephants_dream/elephants_dream_1024x522_24.0fps_908kbps.mp4", 908, 1024, 522) , new DynamicStreamingItem("mp4:mediapm/ovp/content/demo/video/elephants_dream/elephants_dream_1024x522_24.0fps_1308kbps.mp4", 1308, 1024, 522) , new DynamicStreamingItem("mp4:mediapm/ovp/content/demo/video/elephants_dream/elephants_dream_1280x720_24.0fps_1708kbps.mp4", 1708, 1280, 720) ]); videoElement.resource = dynResource; addChild(mediaPlayerSprite); mediaPlayerSprite.media = videoElement; } } }
Tue Jun 12 2018, 03:17 PM Z