Guida di riferimento di ActionScript® 3.0 per la piattaforma Adobe® Flash®
Home  |  Nascondi elenco pacchetti e classi |  Pacchetti  |  Classi  |  Novità  |  Indice  |  Appendici  |  Perché in inglese?
Filtri: Recupero dati dal server...
Recupero dati dal server...
org.osmf.net.rtmpstreaming 

RTMPDynamicStreamingNetLoader  - AS3 OSMF

Pacchettoorg.osmf.net.rtmpstreaming
Classepublic class RTMPDynamicStreamingNetLoader
EreditarietàRTMPDynamicStreamingNetLoader Inheritance NetLoader Inheritance LoaderBase Inheritance EventDispatcher Inheritance Object
Sottoclassi DVRCastNetLoader

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 1.0
Versioni runtime: Flash Player 10, AIR 1.5

RTMPDynamicStreamingNetLoader is a NetLoader that provides dynamic stream switching functionality for RTMP streams. It does this by creating a NetStreamSwitchManager for each LoadTrait that is loaded through this object.

This class is "backwards compatible", meaning if it is not handed an RTMP DynamicStreamingResource then it will call the base class implementation for the load and unload methods.

Vedere gli esempi



Proprietà pubbliche
 ProprietàDefinito da
 Inheritedconstructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto.
Object
 InheritedreconnectTimeout : Number
The stream reconnect timeout in milliseconds.
NetLoader
Metodi pubblici
 MetodoDefinito da
  
Constructor.
RTMPDynamicStreamingNetLoader
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra un oggetto listener di eventi con un oggetto EventDispatcher, in modo che il listener riceva la notifica di un evento.
EventDispatcher
 Inherited
Indicates whether this loader is capable of handling (loading) the given MediaResourceBase.
LoaderBase
 Inherited
Invia un evento nel flusso di eventi.
EventDispatcher
 Inherited
Verifica se per l'oggetto EventDispatcher sono presenti listener registrati per un tipo specifico di evento.
EventDispatcher
 Inherited
Indica se per un oggetto è definita una proprietà specifica.
Object
 Inherited
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro.
Object
 Inherited
Loads the specified LoadTrait.
LoaderBase
 Inherited
Indica se la proprietà specificata esiste ed è enumerabile.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Rimuove un listener dall'oggetto EventDispatcher.
EventDispatcher
 Inherited
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche.
Object
 Inherited
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate.
Object
 Inherited
Restituisce la rappresentazione in formato stringa dell'oggetto specificato.
Object
 Inherited
Unloads the specified LoadTrait.
LoaderBase
 Inherited
Restituisce il valore di base dell'oggetto specificato.
Object
 Inherited
Verifica se un listener di eventi è registrato con questo oggetto EventDispatcher o qualsiasi suo antenato per il tipo di evento specificato.
EventDispatcher
Metodi protetti
 MetodoDefinito da
 Inherited
The factory function for creating a NetStream.
NetLoader
 Inherited
The factory function for creating a NetStreamSwitchManagerBase.
NetLoader
 Inherited
Executes the load of the given LoadTrait.
LoaderBase
 Inherited
Executes the unload of the given LoadTrait.
LoaderBase
 Inherited
reconnect(netConnection:NetConnection, resource:URLResource):void
Attempts to reconnect the specified NetConnection to the specified URL.
NetLoader
 Inherited
Updates the given LoadTrait with the given info, and dispatches the state change event if necessary.
LoaderBase
Eventi
 Evento Riepilogo Definito da
 Inherited[evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR ottiene lo stato di attivazione del sistema operativo ed entra nello stato attivo.EventDispatcher
 Inherited[evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR perde l'attivazione del sistema operativo e sta entrando nello stato inattivo.EventDispatcher
 InheritedDispatched when the state of a LoadTrait being loaded or unloaded by the LoaderBase has changed.LoaderBase
Descrizione della funzione di costruzione

RTMPDynamicStreamingNetLoader

()Funzione di costruzione
public function RTMPDynamicStreamingNetLoader(factory:NetConnectionFactoryBase = null)

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 1.0
Versioni runtime: Flash Player 10, AIR 1.5

Constructor.

Parametri
factory:NetConnectionFactoryBase (default = null) — the NetConnectionFactoryBase instance to use for managing NetConnections. If factory is null, a NetConnectionFactory will be created and used. Since the NetConnectionFactory class facilitates connection sharing, this is an easy way of enabling global sharing, by creating a single NetConnectionFactory instance within the player and then handing it to all RTMPDynamicStreamingNetLoader instances.
RTMPDynamicStreamingNetLoaderExample.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;
    import org.osmf.net.rtmpstreaming.RTMPDynamicStreamingNetLoader;
    
    public class RTMPDynamicStreamingNetLoaderExample extends Sprite
    {
        public function RTMPDynamicStreamingNetLoaderExample()
        {
            super();
            
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align = StageAlign.TOP_LEFT;
            
            var mediaPlayerSprite:MediaPlayerSprite = new MediaPlayerSprite();
            var netLoader:RTMPDynamicStreamingNetLoader = new RTMPDynamicStreamingNetLoader();
            var videoElement:VideoElement = new VideoElement(null, netLoader);

            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 ]Perché in inglese?
Il contenuto della Guida di riferimento di ActionScript 3.0 appare in inglese

Non tutte le parti della Guida di riferimento di ActionScript 3.0 sono tradotte in tutte le lingue. Quando un elemento del linguaggio non è tradotto, viene riportato in inglese. Ad esempio, la classe ga.controls.HelpBox non è tradotta in nessuna lingua. Pertanto, nella versione italiana della guida di riferimento, la descrizione della classe ga.controls.HelpBox è riportata in inglese.