Naslaggids voor Adobe ActionScript® 3.0 voor het Adobe® Flash®-platform
Startpagina  |  Lijst met pakketten en klassen verbergen |  Pakketten  |  Klassen  |  Nieuw  |  Index  |  Bijlagen  |  Waarom in het Engels?
Filters: Gegevens ophalen van server...
Gegevens ophalen van server...
org.osmf.net 

DynamicStreamingResource  - AS3 OSMF

Pakketorg.osmf.net
Klassepublic class DynamicStreamingResource
OverervingDynamicStreamingResource Inheritance StreamingURLResource Inheritance URLResource Inheritance MediaResourceBase Inheritance Object

Taalversie: ActionScript 3.0
Productversie: OSMF 1.0
Runtimeversies: Flash Player 10, AIR 1.5

DynamicStreamingResource encapsulates multiple representations of a piece of media, such that the player application can dynamically switch from one representation to another. Typically (though not always), each representation is encoded at a different bitrate, and the player application switches between representations based on changes to the client's available bandwidth.

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.

Bekijk de voorbeelden



Openbare eigenschappen
 EigenschapGedefinieerd door
 InheritedalternativeAudioStreamItems : Vector.<StreamingItem>
Vector containing all alternative audio items associated with the current streaming resource.
StreamingURLResource
 InheritedclipEndTime : Number
Optional end time of the streaming resource.
StreamingURLResource
 InheritedclipStartTime : Number
Optional start time of the streaming resource.
StreamingURLResource
 InheritedconnectionArguments : Vector.<Object>
Optional set of arguments that will be supplied when making a connection to the source of the stream.
StreamingURLResource
 Inheritedconstructor : Object
Verwijzing naar het klasseobject of de constructorfunctie van een bepaalde objectinstantie.
Object
 InheriteddrmContentData : ByteArray
Content metadata for DRM-encrypted content.
StreamingURLResource
  host : String
[alleen-lezen] A URL representing the host of the dynamic streaming resource.
DynamicStreamingResource
  initialIndex : int
The preferred starting index.
DynamicStreamingResource
 InheritedmediaType : String
The MediaType, if any, of this resource.
MediaResourceBase
 InheritedmetadataNamespaceURLs : Vector.<String>
[alleen-lezen] A Vector containing the namespace URLs for all Metadata objects within this resource.
MediaResourceBase
 InheritedmimeType : String
The MIME type, if any, of this resource.
MediaResourceBase
  streamItems : Vector.<DynamicStreamingItem>
Vector of DynamicStreamingItems.
DynamicStreamingResource
 InheritedstreamType : String
The StreamType for this resource.
StreamingURLResource
 Inheritedurl : String
[alleen-lezen] The URL of the resource.
URLResource
 InheritedurlIncludesFMSApplicationInstance : Boolean
Indicates, for RTMP streaming URLs, whether the URL includes the FMS application instance or not.
StreamingURLResource
Openbare methoden
 MethodeGedefinieerd door
  
DynamicStreamingResource(host:String, streamType:String = null)
Constructor.
DynamicStreamingResource
 Inherited
addMetadataValue(namespaceURL:String, value:Object):void
Adds a metadata value to this resource.
MediaResourceBase
 Inherited
Retrieves a metadata value from this resource.
MediaResourceBase
 Inherited
Geeft aan of voor een object een opgegeven eigenschap is gedefinieerd.
Object
 Inherited
Geeft aan of een instantie van de klasse Object zich in de prototypeketen van het object bevindt dat als parameter is opgegeven.
Object
 Inherited
Geeft aan of de opgegeven eigenschap bestaat en kan worden opgesomd.
Object
 Inherited
Removes a metadata value from this resource.
MediaResourceBase
 Inherited
Stelt de beschikbaarheid van een dynamische eigenschap voor lusbewerkingen in.
Object
 Inherited
Geeft de tekenreeksweergave van dit object weer, geformatteerd volgens de locatiespecifieke conventies.
Object
 Inherited
Retourneert een tekenreeksrepresentatie van het opgegeven object.
Object
 Inherited
Retourneert de primitieve waarde van het opgegeven object.
Object
Eigenschapdetails

host

eigenschap
host:String  [alleen-lezen]

Taalversie: ActionScript 3.0
Productversie: OSMF 1.0
Runtimeversies: Flash Player 10, AIR 1.5

A URL representing the host of the dynamic streaming resource.



Implementatie
    public function get host():String

initialIndex

eigenschap 
initialIndex:int

Taalversie: ActionScript 3.0
Productversie: OSMF 1.0
Runtimeversies: Flash Player 10, AIR 1.5

The preferred starting index.



Implementatie
    public function get initialIndex():int
    public function set initialIndex(value:int):void

Gegenereerde uitzondering
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

eigenschap 
streamItems:Vector.<DynamicStreamingItem>

Taalversie: ActionScript 3.0
Productversie: OSMF 1.0
Runtimeversies: Flash Player 10, AIR 1.5

Vector of DynamicStreamingItems. Each item represents a different bitrate stream.



Implementatie
    public function get streamItems():Vector.<DynamicStreamingItem>
    public function set streamItems(value:Vector.<DynamicStreamingItem>):void
Constructordetails

DynamicStreamingResource

()Constructor
public function DynamicStreamingResource(host:String, streamType:String = null)

Taalversie: ActionScript 3.0
Productversie: OSMF 1.0
Runtimeversies: Flash Player 10, AIR 1.5

Constructor.

Parameters
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;    
        }    
    }
} 




[ X ]Waarom in het Engels?
Sommige inhoud van de Naslaggids voor ActionScript 3.0 staat in het Engels

Niet alle onderdelen van de Naslaggids voor ActionScript 3.0 zijn in alle talen vertaald. Wanneer een taalelement niet is vertaald, wordt het in het Engels weergegeven. Zo is de klasse ga.controls.HelpBox niet in elke taal vertaald. In de Nederlandse versie van de naslaggids wordt de klasse ga.controls.HelpBox bijvoorbeeld in het Engels weergegeven.