Pakket | org.osmf.traits |
Klasse | public class DynamicStreamTrait |
Overerving | DynamicStreamTrait MediaTraitBase EventDispatcher Object |
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Use the MediaElement.hasTrait(MediaTraitType.DYNAMIC_STREAM)
method to query
whether a media element has a trait of this type.
If hasTrait(MediaTraitType.DYNAMIC_STREAM)
returns true
,
use the MediaElement.getTrait(MediaTraitType.DYNAMIC_STREAM)
method
to get an object of this type.
Verwante API-elementen
Eigenschap | Gedefinieerd door | ||
---|---|---|---|
autoSwitch : Boolean
Defines whether or not the trait should be in manual
or auto-switch mode. | DynamicStreamTrait | ||
constructor : Object
Verwijzing naar het klasseobject of de constructorfunctie van een bepaalde objectinstantie. | Object | ||
currentIndex : int [alleen-lezen]
The index of the current dynamic stream. | DynamicStreamTrait | ||
maxAllowedIndex : int
The maximum allowed index. | DynamicStreamTrait | ||
numDynamicStreams : int [alleen-lezen]
The total number of dynamic streams. | DynamicStreamTrait | ||
switching : Boolean [alleen-lezen]
Indicates whether or not a switch is currently in progress. | DynamicStreamTrait | ||
traitType : String [alleen-lezen]
The MediaTraitType for this trait. | MediaTraitBase |
Methode | Gedefinieerd door | ||
---|---|---|---|
Constructor. | DynamicStreamTrait | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registreert een gebeurtenislistenerobject bij een object EventDispatcher, zodat de listener een melding van een gebeurtenis ontvangt. | EventDispatcher | ||
Verzendt een gebeurtenis naar de gebeurtenisstroom. | EventDispatcher | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
Returns the associated bitrate, in kilobits per second, for the specified index. | DynamicStreamTrait | ||
Controleert of het object EventDispatcher listeners heeft geregistreerd voor een specifiek type gebeurtenis. | EventDispatcher | ||
Geeft aan of voor een object een opgegeven eigenschap is gedefinieerd. | Object | ||
Geeft aan of een instantie van de klasse Object zich in de prototypeketen van het object bevindt dat als parameter is opgegeven. | Object | ||
Geeft aan of de opgegeven eigenschap bestaat en kan worden opgesomd. | Object | ||
Verwijdert een listener uit het object EventDispatcher. | EventDispatcher | ||
Stelt de beschikbaarheid van een dynamische eigenschap voor lusbewerkingen in. | Object | ||
Switch to a specific index. | DynamicStreamTrait | ||
Geeft de tekenreeksweergave van dit object weer, geformatteerd volgens de locatiespecifieke conventies. | Object | ||
Retourneert een tekenreeksrepresentatie van het opgegeven object. | Object | ||
Retourneert de primitieve waarde van het opgegeven object. | Object | ||
Controleert of een gebeurtenislistener is geregistreerd bij dit object EventDispatcher of een van de voorouders voor het opgegeven type gebeurtenis. | EventDispatcher |
Methode | Gedefinieerd door | ||
---|---|---|---|
Called just after the autoSwitch property has changed. | DynamicStreamTrait | ||
Called immediately before the autoSwitch property is changed. | DynamicStreamTrait | ||
Called just after the maxAllowedIndex property has changed. | DynamicStreamTrait | ||
Called immediately before the maxAllowedIndex property is changed. | DynamicStreamTrait | ||
Invoking this setter will result in the trait's currentIndex
property changing. | DynamicStreamTrait | ||
Invoking this setter will result in the trait's numDynamicStreams
property changing. | DynamicStreamTrait | ||
Must be called by the implementing media on completing a switch. | DynamicStreamTrait | ||
Called just after the switching property has changed. | DynamicStreamTrait | ||
Called immediately before the switching property is changed. | DynamicStreamTrait |
Gebeurtenis | Overzicht | Gedefinieerd door | ||
---|---|---|---|---|
[uitgezonden gebeurtenis] Wordt verzonden wanneer Flash Player of de AIR-toepassing de besturingssysteemfocus krijgt en actief wordt. | EventDispatcher | |||
Dispatched when the autoSwitch property changed. | DynamicStreamTrait | |||
[uitgezonden gebeurtenis] Wordt verzonden wanneer Flash Player of de AIR-toepassing de systeemfocus verliest en inactief wordt. | EventDispatcher | |||
Dispatched when the number of dynamic streams has changed. | DynamicStreamTrait | |||
Dispatched when a stream switch is requested, completed, or failed. | DynamicStreamTrait |
autoSwitch | eigenschap |
autoSwitch:Boolean
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Defines whether or not the trait should be in manual
or auto-switch mode. If in manual mode the switchTo
method can be used to manually switch to a specific stream.
Implementatie
public function get autoSwitch():Boolean
public function set autoSwitch(value:Boolean):void
currentIndex | eigenschap |
maxAllowedIndex | eigenschap |
maxAllowedIndex:int
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
The maximum allowed index. This can be set at run-time to provide a ceiling for the switching profile, for example, to keep from switching up to a higher quality stream when the current video is too small to handle a higher quality stream. The default is the highest stream index.
Implementatie
public function get maxAllowedIndex():int
public function set maxAllowedIndex(value:int):void
Gegenereerde uitzondering
RangeError — If the specified index is less than zero or
greater than the total number of dynamic streams.
|
numDynamicStreams | eigenschap |
switching | eigenschap |
switching:Boolean
[alleen-lezen] Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Indicates whether or not a switch is currently in progress.
This property will return true
while a switch has been
requested and the switch has not yet been acknowledged and no switch failure
has occurred. Once the switch request has been acknowledged or a
failure occurs, the property will return false
.
Implementatie
public function get switching():Boolean
DynamicStreamTrait | () | Constructor |
public function DynamicStreamTrait(autoSwitch:Boolean = true, currentIndex:int = 0, numDynamicStreams:int = 1)
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Constructor.
ParametersautoSwitch:Boolean (default = true ) — The initial autoSwitch state for the trait. The default is true.
| |
currentIndex:int (default = 0 ) — The initial stream index for the trait. The default is zero.
| |
numDynamicStreams:int (default = 1 ) — The total number of dynamic streams.
|
autoSwitchChangeEnd | () | methode |
protected function autoSwitchChangeEnd():void
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Called just after the autoSwitch
property has changed.
Dispatches the change event.
Subclasses that override should call this method to dispatch the change event.
autoSwitchChangeStart | () | methode |
protected function autoSwitchChangeStart(value:Boolean):void
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Called immediately before the autoSwitch
property is changed.
Subclasses can override this method to communicate the change to the media.
Parameters
value:Boolean — New value for the autoSwitch property.
|
getBitrateForIndex | () | methode |
public function getBitrateForIndex(index:int):Number
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Returns the associated bitrate, in kilobits per second, for the specified index.
Parameters
index:int |
Number |
Gegenereerde uitzondering
RangeError — If the specified index is less than zero or
greater than the highest index available.
|
maxAllowedIndexChangeEnd | () | methode |
protected function maxAllowedIndexChangeEnd():void
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Called just after the maxAllowedIndex
property has changed.
maxAllowedIndexChangeStart | () | methode |
protected function maxAllowedIndexChangeStart(newIndex:int):void
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Called immediately before the maxAllowedIndex
property is changed.
Subclasses can override this method to communicate the change to the media.
Parameters
newIndex:int — New value for the maxAllowedIndex property.
|
setCurrentIndex | () | methode |
setNumDynamicStreams | () | methode |
setSwitching | () | methode |
protected final function setSwitching(newSwitching:Boolean, index:int):void
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Must be called by the implementing media on completing a switch.
Calls the switchingChangeStart()
and switchingChangeEnd()
methods.
Parameters
newSwitching:Boolean — New switching value for the trait.
| |
index:int — The index to which the switch shall (or did) occur.
|
switchingChangeEnd | () | methode |
protected function switchingChangeEnd(index:int):void
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Called just after the switching
property has changed.
Dispatches the change event.
Subclasses that override should call this method to dispatch the change event.
Parameters
index:int — The index of the switched-to stream.
|
switchingChangeStart | () | methode |
protected function switchingChangeStart(newSwitching:Boolean, index:int):void
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Called immediately before the switching
property is changed.
Subclasses can override this method to communicate the change to the media.
Parameters
newSwitching:Boolean — New value for the switching property.
| |
index:int — The index of the stream to switch to.
|
switchTo | () | methode |
public function switchTo(index:int):void
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Switch to a specific index. To switch up, use the currentIndex
property, such as:
obj.switchTo(obj.currentIndex + 1);
Parameters
index:int |
Gegenereerde uitzondering
RangeError — If the specified index is less than zero or
greater than maxAllowedIndex .
Note: If the media is paused, switching will not take place until after play resumes.
| |
IllegalOperationError — If the stream is not in manual switch mode.
|
Verwante API-elementen
autoSwitchChange | Gebeurtenis |
org.osmf.events.DynamicStreamEvent
eigenschap DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.AUTO_SWITCH_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the autoSwitch property changed.
The DynamicStreamEvent.AUTO_SWITCH_CHANGE constant defines the value of the type property of the event object for an autoSwitchChange event.numDynamicStreamsChange | Gebeurtenis |
org.osmf.events.DynamicStreamEvent
eigenschap DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.NUM_DYNAMIC_STREAMS_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when the number of dynamic streams has changed.
The DynamicStreamEvent.NUM_DYNAMIC_STREAMS_CHANGE constant defines the value of the type property of the event object for a numDynamicStreamsChange event.switchingChange | Gebeurtenis |
org.osmf.events.DynamicStreamEvent
eigenschap DynamicStreamEvent.type =
org.osmf.events.DynamicStreamEvent.SWITCHING_CHANGE
Taalversie: | ActionScript 3.0 |
Productversie: | OSMF 1.0 |
Runtimeversies: | Flash Player 10, AIR 1.5 |
Dispatched when a stream switch is requested, completed, or failed.
The DynamicStreamEvent.SWITCHING_CHANGE constant defines the value of the type property of the event object for a switchingChange event.Wed Jun 13 2018, 11:42 AM Z