Package | com.myflashlab.air.extensions.volume |
Class | public class VolumeEvent |
Inheritance | VolumeEvent flash.events.Event |
Constant | Defined By | ||
---|---|---|---|
ERROR : String = onError [static]
If you are seeing AIR_SDK_BUG_ABANDON_FOCUS it means:
unfortunately there is a bug in iOS Adobe Air SDK which cannot abandon audio focus once obtained. | VolumeEvent | ||
MUTE_STATE : String = isDeviceMute [static]
Dispatches as soon as the device goes to silenced mode or returns back from it to normal mode. | VolumeEvent | ||
SOUND_LOADED : String = onSoundLoaded [static]
Dispatches when a native sound object is loaded into the app's cache and is ready to be played. | VolumeEvent | ||
VOLUME_CHANGE : String = onDeviceVolumeChanged [static]
Dispatches when volume value is changed. | VolumeEvent |
ERROR | Constant |
public static const ERROR:String = onError
If you are seeing AIR_SDK_BUG_ABANDON_FOCUS it means: unfortunately there is a bug in iOS Adobe Air SDK which cannot abandon audio focus once obtained. we have reported this bug to Adobe. If you are seeing AIR_SDK_BUG_REQUEST_FOCUS it means: Again this error is related to the former one above! but it happens only when you have played a sound in your Air app prior to calling the Volume.requestFocus() method. Let me put it this way: When your app starts, you MUST obtain focus by calling Volume.requestFocus() before you start playing ANY sound. Once any sound is played in your Air app, due to the Air SDK bug explained above, you will never again be able to obtain the audio focus unless your app starts again. So, always make sure to request for audio focus before playing any sound in your app. On the Android side though, everything works with no problem. you can simply request focus and abandon it anytime you wish no matter if you are playing any sound or music in your app.
MUTE_STATE | Constant |
public static const MUTE_STATE:String = isDeviceMute
Dispatches as soon as the device goes to silenced mode or returns back from it to normal mode.
SOUND_LOADED | Constant |
public static const SOUND_LOADED:String = onSoundLoaded
Dispatches when a native sound object is loaded into the app's cache and is ready to be played.
VOLUME_CHANGE | Constant |
public static const VOLUME_CHANGE:String = onDeviceVolumeChanged
Dispatches when volume value is changed.