Paket | org.osmf.traits |
Klass | public class AlternativeAudioTrait |
Arv | AlternativeAudioTrait MediaTraitBase EventDispatcher Object |
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.6 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Use the MediaElement.hasTrait(MediaTraitType.ALTERNATIVE_AUDIO)
method to query whether a media element has a trait of this type.
If hasTrait(MediaTraitType.ALTERNATIVE_AUDIO)
returns true
,
use the MediaElement.getTrait(MediaTraitType.ALTERNATIVE_AUDIO)
method
to get an object of this type.
Relaterade API-element
Egenskap | Definieras med | ||
---|---|---|---|
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
currentIndex : int [skrivskyddad]
Obtains a 0-based index identifying the current audio stream, or
-1 if no stream is selected. | AlternativeAudioTrait | ||
numAlternativeAudioStreams : int [skrivskyddad]
Obtains the total number of alternative audio streams. | AlternativeAudioTrait | ||
switching : Boolean [skrivskyddad]
Indicates whether an alternative audio stream switch is currently in progress. | AlternativeAudioTrait | ||
traitType : String [skrivskyddad]
The MediaTraitType for this trait. | MediaTraitBase |
Egenskap | Definieras med | ||
---|---|---|---|
_indexToSwitchTo : int = -2 | AlternativeAudioTrait |
Metod | Definieras med | ||
---|---|---|---|
AlternativeAudioTrait(numAlternativeAudioStreams:int)
Default Constructor. | AlternativeAudioTrait | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registrerar ett händelseavlyssnarobjekt för ett EventDispatcher-objekt så att avlyssnaren får meddelanden om händelser. | EventDispatcher | ||
Skickar en händelse till händelseflödet. | EventDispatcher | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
Returns the associated streaming item for the specified index. | AlternativeAudioTrait | ||
Kontrollerar om EventDispatcher-objektet har några avlyssnare registrerade för en viss typ av händelse. | EventDispatcher | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Tar bort en avlyssnare från EventDispatcher-objektet. | EventDispatcher | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
Switches the current audio stream to the alternate stream specified by the
index value. | AlternativeAudioTrait | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Returnerar det angivna objektets strängbeteckning. | Object | ||
Returnerar det angivna objektets primitiva värde. | Object | ||
Kontrollerar om en händelseavlyssnare är registrerad för det här EventDispatcher-objektet eller något av dess överordnade objekt för den angivna händelsetypen. | EventDispatcher |
Händelse | Sammanfattning | Definieras med | ||
---|---|---|---|---|
[utsändningshändelse] Skickas när Flash Player eller AIR får operativsystemfokus och blir aktivt. | EventDispatcher | |||
Dispatched when an alternative audio stream switch is requested, completed, or has failed. | AlternativeAudioTrait | |||
[utsändningshändelse] Skickas när Flash Player eller AIR förlorar operativsystemfokus och blir inaktivt. | EventDispatcher | |||
Dispatched when the total number of alternative audio streams has changed. | AlternativeAudioTrait |
Konstant | Definieras med | ||
---|---|---|---|
DEFAULT_TRANSITION_INDEX : int = -1 [statisk] | AlternativeAudioTrait | ||
INVALID_TRANSITION_INDEX : int = -2 [statisk] | AlternativeAudioTrait |
_indexToSwitchTo | egenskap |
protected var _indexToSwitchTo:int = -2
currentIndex | egenskap |
currentIndex:int
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.6 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Obtains a 0-based index identifying the current audio stream, or
-1
if no stream is selected. The returned value is
always been -1
and numAlternativeAudioStreams-1
.
Implementering
public function get currentIndex():int
numAlternativeAudioStreams | egenskap |
switching | egenskap |
switching:Boolean
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.6 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Indicates whether an alternative audio stream switch is currently in progress.
Returns true
while an audio stream switch has been requested but
not yet acknowledged and no switching failure has occurred. Returns
false
once the switch request is acknowledged or a switching
failure occurs.
Implementering
public function get switching():Boolean
AlternativeAudioTrait | () | Konstruktor |
getItemForIndex | () | metod |
public function getItemForIndex(index:int):StreamingItem
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.6 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Returns the associated streaming item for the specified index. Returns
null
if the index is -1
.
Parametrar
index:int |
StreamingItem |
Utlöser
RangeError — If the specified index is less than -1 or
greater than (numAlternativeAudioStreams - 1) .
|
switchTo | () | metod |
public function switchTo(index:int):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.6 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Switches the current audio stream to the alternate stream specified by the
index
value. Passing -1
for the index
value resets the current audio stream to the default one.
Note: If media playback is currently paused, the audio stream
switch does not occur until after play resumes.
Parametrar
index:int |
Utlöser
RangeError — If the specified index is less than -1 or
greater than numAlternativeAudioStreams-1 .
|
audioSwitchingChange | Händelse |
org.osmf.events.AlternativeAudioEvent
egenskap AlternativeAudioEvent.type =
org.osmf.events.AlternativeAudioEvent.AUDIO_SWITCHING_CHANGE
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.6 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when an alternative audio stream switch is requested, completed, or has failed.
Dispatched when the switching state of the alternative audio stream has changed. Usually for any successful switching operation, two AUDIO_SWITCHING_CHANGE events will be triggered. One when the switch operation starts ( theswitching
property will be set to true
) and one when the operation ends ( the
switching
property will be set to false
).
numAlternativeAudioStreamsChange | Händelse |
org.osmf.events.AlternativeAudioEvent
egenskap AlternativeAudioEvent.type =
org.osmf.events.AlternativeAudioEvent.NUM_ALTERNATIVE_AUDIO_STREAMS_CHANGE
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.6 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when the total number of alternative audio streams has changed.
Dispatched when the number of available alternative audio streams has changed..DEFAULT_TRANSITION_INDEX | Konstant |
protected static const DEFAULT_TRANSITION_INDEX:int = -1
INVALID_TRANSITION_INDEX | Konstant |
protected static const INVALID_TRANSITION_INDEX:int = -2
Tue Jun 12 2018, 01:40 PM Z