Cleanup private audio API |
||||||||
Issue descriptionSince 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)
,
Jan 12 2017
,
Jan 25 2017
,
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
,
Mar 1 2017
,
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
,
Mar 2 2017
,
Mar 3 2017
,
Mar 3 2017
,
Mar 7 2017
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!
,
Mar 7 2017
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.
,
Mar 7 2017
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!
,
Jan 22 2018
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by tbarzic@chromium.org
, Jan 12 2017