New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 673392 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Feature

Blocked on:
issue 661861
issue 680358
issue 680361
issue 685382

Blocking:
issue 655444
issue 697592



Sign in to add a comment

Cleanup private audio API

Project Member Reported by tbarzic@chromium.org, Dec 12 2016

Issue description

Since we plan to enable the API in kiosk (and thus make it available to non-whitelisted apps), the API should be cleaned up based on the feedback from current users:
* make stable device ID able to distinguish between USB audio devices with the same vendor and product IDs
* mute flag is currently exposed as device specific property, even though it's actually system wide - this makes setting mute value unintuitive
* chrome.audio.setActiveDevices logic should be made more intuitive; currently setActiveDevices does not support disabling *all* input/output devices
* consider providing parsed device name through the API (in particular, card/interface index would be useful for matching corresponding input and output nodes)
 
Blockedon: 680358
Blockedon: 680361
Blockedon: 685382
Project Member

Comment 4 by bugdroid1@chromium.org, Feb 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/de70284d458bdca36d42eabeba7971c7087e2492

commit de70284d458bdca36d42eabeba7971c7087e2492
Author: tbarzic <tbarzic@chromium.org>
Date: Wed Feb 15 21:15:18 2017

Final cleanup pass over audio device API

* Makes sure event names are not capitalized (old names are
  not kept, as events in question do not seem to be used)
* Renames onDevicesChanged to onDeviceListChanged to make it
  clearer that it's triggered only when list of devices change,
  not when properties of a present device changes
* Add getDevices method
  - replacement for getInfo method
  - returns device info using AudioDeviceInfo (unified class for both
    input and output devices), which is in line with properties
    returned by recomended onDeviceListChanged event
  - add support for filering returned device by stream type (input
    vs. outptu devices) and device active state.
* Unify |volume| and |gain| property as |level| property in
  setProperties method argument (consistent with usage of
  AudioDeviceInfo to describe audio devices).

BUG= 673392 

Review-Url: https://codereview.chromium.org/2635983006
Cr-Commit-Position: refs/heads/master@{#450797}

[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/extensions/browser/api/audio/audio_api.cc
[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/extensions/browser/api/audio/audio_api.h
[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/extensions/browser/api/audio/audio_apitest.cc
[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/extensions/browser/api/audio/audio_service.cc
[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/extensions/browser/api/audio/audio_service.h
[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/extensions/browser/api/audio/audio_service_chromeos.cc
[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/extensions/browser/extension_function_histogram_value.h
[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/extensions/common/api/audio.idl
[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/extensions/test/data/api_test/audio/add_nodes/background.js
[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/extensions/test/data/api_test/audio/remove_nodes/background.js
[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/extensions/test/data/api_test/audio/test.js
[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/extensions/test/data/api_test/audio/volume_change/background.js
[modify] https://crrev.com/de70284d458bdca36d42eabeba7971c7087e2492/tools/metrics/histograms/histograms.xml

Blocking: 697592
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7c6ba299357a5780218eb7a7fd00a35b9cbecc96

commit 7c6ba299357a5780218eb7a7fd00a35b9cbecc96
Author: tbarzic <tbarzic@chromium.org>
Date: Thu Mar 02 07:38:16 2017

Restrict deprecated parts of audio API usage to whitelisted apps

Removes two deprecated properties from AudioDeviceInfo, which should
be safe to do at this point, as the object is not currently used by
the apps whitelisted for audio API.

BUG= 673392 

Review-Url: https://codereview.chromium.org/2688773002
Cr-Commit-Position: refs/heads/master@{#454204}

[modify] https://crrev.com/7c6ba299357a5780218eb7a7fd00a35b9cbecc96/extensions/browser/api/audio/audio_api.cc
[modify] https://crrev.com/7c6ba299357a5780218eb7a7fd00a35b9cbecc96/extensions/browser/api/audio/audio_apitest.cc
[modify] https://crrev.com/7c6ba299357a5780218eb7a7fd00a35b9cbecc96/extensions/browser/api/audio/audio_service_chromeos.cc
[modify] https://crrev.com/7c6ba299357a5780218eb7a7fd00a35b9cbecc96/extensions/common/api/_behavior_features.json
[modify] https://crrev.com/7c6ba299357a5780218eb7a7fd00a35b9cbecc96/extensions/common/api/audio.idl
[modify] https://crrev.com/7c6ba299357a5780218eb7a7fd00a35b9cbecc96/extensions/common/features/behavior_feature.cc
[modify] https://crrev.com/7c6ba299357a5780218eb7a7fd00a35b9cbecc96/extensions/common/features/behavior_feature.h
[modify] https://crrev.com/7c6ba299357a5780218eb7a7fd00a35b9cbecc96/extensions/test/data/api_test/audio/add_nodes/background.js
[add] https://crrev.com/7c6ba299357a5780218eb7a7fd00a35b9cbecc96/extensions/test/data/api_test/audio/deprecated_api/manifest.json
[add] https://crrev.com/7c6ba299357a5780218eb7a7fd00a35b9cbecc96/extensions/test/data/api_test/audio/deprecated_api/test.js
[modify] https://crrev.com/7c6ba299357a5780218eb7a7fd00a35b9cbecc96/extensions/test/data/api_test/audio/remove_nodes/background.js
[modify] https://crrev.com/7c6ba299357a5780218eb7a7fd00a35b9cbecc96/extensions/test/data/api_test/audio/test.js

Labels: -M-57 M-58
Status: Fixed (was: Started)

Comment 8 by st...@chromium.org, Mar 3 2017

Cc: r...@chromium.org

Comment 9 by st...@chromium.org, Mar 3 2017

Cc: -st...@chromium.org
Hi tbarzic@, currently ChromeOS audio autotest relies on audio API to control audio nodes and volumes.
I checked that I still can access chrome.audio API (but I need to replace getInfo with getDevice for my usage). Is that expected that our multimedia test extension can still access chrome.audio API while it is not whitelisted?

Thanks!

It should be able to access chrome.audio API (since the API is enabled on dev channel), but deprecated methods (like getInfo) should be failing if the app is not white-listed.

Though, I plan to restrict non-whitelisted access to the API to kiosk session, so it might be a good idea to white-list the test app before that happens.
Thanks for the explanation, I got it now.
I created an issue https://bugs.chromium.org/p/chromium/issues/detail?id=699005 to remind you when restricting the non-whitelisted access.
Thanks a lot for the help!

Comment 13 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment