Copy link to clipboard
Copied
Welcome to the updated Flash Runtime version 27 beta! We've been working on new features and fixing important bugs for Flash Player and we're looking forward to receiving feedback from our Flash Player community.
This beta release includes enhancements and bug fixes related to security, stability, performance, and device compatibility for Flash Player 27. For full details, please see our release notes.
Note:
With the release of Flash Player 27, developers can now select the audio output from ActionScript using the new ActionScript API - “AudioDeviceManager”. It is in sync with Flash Player's audio output settings. A UIA (User Invoked Action) restriction is applied to this API keeping in view user privacy concerns. The API can only be invoked by a user invoked action. If it is not invoked by user action, Flash Player throws a runtime error "IllegalOperationError" with error code 2176.
Use the AudioDeviceManager class to list down the audio output devices attached to a system using the property, deviceNames(). This returns an array of the attached devices. The index of the selected device from that array can then be retrieved using the selectedDeviceIndex() property. A new event introduced with this API, named AudioOutputChangeEvent.AUDIO_OUTPUT_CHANGE is dispatched to ActionScript listeners when the audio output changes. It is dispatched when the user selects a different audio device from Flash Player's setting UI (Audio Output), content setting (AudioDeviceManager.selectedDeviceIndex), or when adding/ removing the device from the system. The ActionScript client can check how the audio output change is triggered through “AudioOutputChangeEvent.reason” class.
The two reason codes are "AudioOutputChangeReason.USER_SELECTION" and "AudioOutputChangeReason.DEVICE_CHANGE".
Here is the general workflow of the API:
Audio device selection made by Flash via AudioDeviceManager API is only valid within the current browser session when the browser is closed, the selection will be lost. This is because user selected audio device is not stored in persistent storage. Also, if user plugins other default device, ie USB headset, Flash content audio will automatically switch to this default device.
Known Issues:
1. On Linux, Flash and Non-Flash audio player cannot play audio using the same device at the same time. If audio is switched to a device which is currently
playing non Flash content, Flash audio will stop.
2. Flash Player does not handle switch between devices with same name properly.
var audio_device_manager:AudioDeviceManager = AudioDeviceManager.audioDeviceManager;
|
Select an audio output device
var audio_device_manager:AudioDeviceManager = AudioDeviceManager.audioDeviceManager;
audio_device_manager.selectedDeviceIndex = desired_audio_output_index;
Monitor audio output change
function audioOutputChangeHandler(evt:AudioOutputChangeEvent):
void
{
if
(evt.reason == AudioOutputChangeReason.USER_SELECTION) {
[
do
something]
}
else
if
(evt.reason == AudioOutputChangeReason.DEVICE_CHANGE) {
[
do
something]
}
}
Known Issues
Authoring for Flash Player 27 and AIR 27
For system requirements of the current release of Flash Player in production, please visithttp://www.adobe.com/products/flashplayer/systemreqs/
To get the latest Beta build of Flash Player visit Adobe labs