Stay organized with collections Save and categorize content based on your preferences.
Important: This API works only on ChromeOS. DescriptionThe chrome.audio
API is provided to allow users to get information about and control the audio devices attached to the system. This API is currently only available in kiosk mode for ChromeOS.
audio
Device name.
Type of the device.
The user-friendly name (e.g. "USB Microphone").
The unique identifier of the audio device.
True if this is the current active device.
The sound level of the device, volume for output, gain for input.
stableDeviceId
string optional
The stable/persisted device id string when available.
Stream type associated with this device.
isActive
boolean optional
If set, only audio devices whose active state matches this value will satisfy the filter.
If set, only audio devices whose stream type is included in this list will satisfy the filter.
List of input devices specified by their ID.
To indicate input devices should be unaffected, leave this property unset.
List of output devices specified by their ID.
To indicate output devices should be unaffected, leave this property unset.
The audio device's desired sound level. Defaults to the device's current sound level.
If used with audio input device, represents audio device gain.
If used with audio output device, represents audio device volume.
Available audio device types.
Enum"HEADPHONE"
"MIC"
"USB"
"BLUETOOTH"
"HDMI"
"INTERNAL_SPEAKER"
"INTERNAL_MIC"
"FRONT_MIC"
"REAR_MIC"
"KEYBOARD_MIC"
"HOTWORD"
"LINEOUT"
"POST_MIX_LOOPBACK"
"POST_DSP_LOOPBACK"
"ALSA_LOOPBACK"
"OTHER"
ID of device whose sound level has changed.
The device's new sound level.
Whether or not the stream is now muted.
The type of the stream for which the mute value changed. The updated mute value applies to all devices with this stream type.
Type of stream an audio device provides.
Methods getDevices()chrome.audio.getDevices(
filter?: DeviceFilter,
): Promise<AudioDeviceInfo[]>
Gets a list of audio devices filtered based on filter
.
Device properties by which to filter the list of returned audio devices. If the filter is not set or set to {}
, returned device list will contain all available audio devices.
chrome.audio.getMute(
streamType: StreamType,
): Promise<boolean>
Gets the system-wide mute state for the specified stream type.
ParametersStream type for which mute state should be fetched.
chrome.audio.setActiveDevices(
ids: DeviceIdLists,
): Promise<void>
Sets lists of active input and/or output devices.
ParametersSpecifies IDs of devices that should be active. If either the input or output list is not set, devices in that category are unaffected.
It is an error to pass in a non-existent device ID.
chrome.audio.setMute(
streamType: StreamType,
isMuted: boolean,
): Promise<void>
Sets mute state for a stream type. The mute state will apply to all audio devices with the specified audio stream type.
ParametersStream type for which mute state should be set.
New mute value.
chrome.audio.setProperties(
id: string,
properties: DeviceProperties,
): Promise<void>
Sets the properties for the input or output device.
Events onDeviceListChangedchrome.audio.onDeviceListChanged.addListener(
callback: function,
)
Fired when audio devices change, either new devices being added, or existing devices being removed.
ParametersThe callback
parameter looks like:
(devices: AudioDeviceInfo[]) => void
chrome.audio.onLevelChanged.addListener(
callback: function,
)
Fired when sound level changes for an active audio device.
onMuteChangedchrome.audio.onMuteChanged.addListener(
callback: function,
)
Fired when the mute state of the audio input or output changes. Note that mute state is system-wide and the new value applies to every audio device with specified stream type.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-11 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-11 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4