chrome.audio
Description: |
The 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 implemented for ChromeOS.
|
Availability: |
Dev channel only.
|
Permissions: |
"audio"
|
Summary
Methods | |
---|---|
getInfo −
chrome.audio.getInfo(function callback)
| |
setActiveDevices −
chrome.audio.setActiveDevices(array of string ids, function callback)
| |
setProperties −
chrome.audio.setProperties(string id, object properties, function callback)
| |
Events | |
onDeviceChanged |
Methods
getInfo
chrome.audio.getInfo(function callback)
Get the information of all audio output and input devices.
Parameters | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
function | callback |
The callback parameter should be a function that looks like this: function(array of object outputInfo, array of object inputInfo) {...};
|
setActiveDevices
chrome.audio.setActiveDevices(array of string ids, function callback)
Select a subset of audio devices as active.
Parameters | ||
---|---|---|
array of string | ids | |
function | callback |
The callback parameter should be a function that looks like this: function() {...};
|
setProperties
chrome.audio.setProperties(string id, object properties, function callback)
Sets the properties for the input or output device.
Parameters | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
string | id | ||||||||||
object | properties |
|
|||||||||
function | callback |
The callback parameter should be a function that looks like this: function() {...};
|
Events
onDeviceChanged
Fired when anything changes to the audio device configuration.
addListener
chrome.audio.onDeviceChanged.addListener(function callback)
Parameters | ||
---|---|---|
function | callback |
The callback parameter should be a function that looks like this: function() {...};
|