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.
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. * available since Chrome 59 * https://developer.chrome.com/apps/audio
(get-devices)
(get-devices filter)
Gets a list of audio devices filtered based on |filter|.
|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.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [devices] where:
|devices| - https://developer.chrome.com/apps/audio#property-callback-devices.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Gets a list of audio devices filtered based on |filter|. |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. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [devices] where: |devices| - https://developer.chrome.com/apps/audio#property-callback-devices. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/audio#method-getDevices.
(get-mute stream-type)
Gets the system-wide mute state for the specified stream type.
|stream-type| - Stream type for which mute state should be fetched.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [value] where:
|value| - https://developer.chrome.com/apps/audio#property-callback-value.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Gets the system-wide mute state for the specified stream type. |stream-type| - Stream type for which mute state should be fetched. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [value] where: |value| - https://developer.chrome.com/apps/audio#property-callback-value. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/audio#method-getMute.
(set-active-devices ids)
Sets lists of active input and/or output devices.
|ids| - Specifies 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. NOTE: While the method signature allows device IDs to be passed as a list of strings, this method of setting active devices is deprecated and should not be relied upon to work. Please use 'DeviceIdLists' instead.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/audio#method-setActiveDevices.
Sets lists of active input and/or output devices. |ids| - Specifies 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. NOTE: While the method signature allows device IDs to be passed as a list of strings, this method of setting active devices is deprecated and should not be relied upon to work. Please use 'DeviceIdLists' instead. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/audio#method-setActiveDevices.
(set-mute stream-type is-muted)
Sets mute state for a stream type. The mute state will apply to all audio devices with the specified audio stream type.
|stream-type| - Stream type for which mute state should be set. |is-muted| - New mute value.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Sets mute state for a stream type. The mute state will apply to all audio devices with the specified audio stream type. |stream-type| - Stream type for which mute state should be set. |is-muted| - New mute value. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/audio#method-setMute.
(set-properties id properties)
Sets the properties for the input or output device.
|id| - https://developer.chrome.com/apps/audio#property-setProperties-id. |properties| - https://developer.chrome.com/apps/audio#property-setProperties-properties.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/audio#method-setProperties.
Sets the properties for the input or output device. |id| - https://developer.chrome.com/apps/audio#property-setProperties-id. |properties| - https://developer.chrome.com/apps/audio#property-setProperties-properties. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/audio#method-setProperties.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.audio namespace.
Taps all valid non-deprecated events in chromex.app.audio namespace.
(tap-on-device-list-changed-events channel & args)
Fired when audio devices change, either new devices being added, or existing devices being removed.
Events will be put on the |channel| with signature [::on-device-list-changed [devices]] where:
|devices| - List of all present audio devices after the change.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/audio#event-onDeviceListChanged.
Fired when audio devices change, either new devices being added, or existing devices being removed. Events will be put on the |channel| with signature [::on-device-list-changed [devices]] where: |devices| - List of all present audio devices after the change. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/audio#event-onDeviceListChanged.
(tap-on-level-changed-events channel & args)
Fired when sound level changes for an active audio device.
Events will be put on the |channel| with signature [::on-level-changed [event]] where:
|event| - https://developer.chrome.com/apps/audio#property-onLevelChanged-event.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/audio#event-onLevelChanged.
Fired when sound level changes for an active audio device. Events will be put on the |channel| with signature [::on-level-changed [event]] where: |event| - https://developer.chrome.com/apps/audio#property-onLevelChanged-event. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/audio#event-onLevelChanged.
(tap-on-mute-changed-events channel & args)
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.
Events will be put on the |channel| with signature [::on-mute-changed [event]] where:
|event| - https://developer.chrome.com/apps/audio#property-onMuteChanged-event.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/audio#event-onMuteChanged.
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. Events will be put on the |channel| with signature [::on-mute-changed [event]] where: |event| - https://developer.chrome.com/apps/audio#property-onMuteChanged-event. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/audio#event-onMuteChanged.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close