Support audio-only capture (without screen/window/tab video)
Reported by
madlittl...@gmail.com,
Sep 27 2017
|
||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Steps to reproduce the problem:
When using `chrome.desktopCapture.chooseDesktopMedia(['audio'], function(desktopMediaRequestId, options) { })` currently, the [`kEmptySourcesListError` -> `At least one source type must be specified.` error](https://chromium.googlesource.com/chromium/src/+/6a8d2a721d7d281dba0bb87fbd1d0e9358d6ce7d/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc#40) is thrown because `api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_AUDIO` doesn't add anything to the `source_lists` and you need to accompany with with some video capture like `['screen', 'audio']`.
Recently this area of code was updated to support audio-only capture but the `chrome.desktopCapture.chooseDesktopMedia` part of the API and UI doesn't take this into account yet. See https://bugs.chromium.org/p/chromium/issues/detail?id=662499 -> https://chromium-review.googlesource.com/c/chromium/src/+/656597
Perhaps `['screen'|'window'|'tab', 'audio']` is necessary to specify the context of audio but then when you use `getUserMedia` with only audio constraints, it shouldn't try to grab the video track or throw a `DevicesNotFoundError` error.
```
navigator.webkitGetUserMedia({
audio: {
mandatory: {
chromeMediaSource: 'system'
}
}
}, function(mediaStream) {
// ...
console.log('audio tracks', mediaStream.getAudioTracks());
})
```
What is the expected behavior?
No error is thrown and only audio is captured.
What went wrong?
The `kEmptySourcesListError` -> `At least one source type must be specified.` error is thrown.
Did this work before? No
Does this work in other browsers? N/A
Chrome version: 61.0.3163.100 Channel: stable
OS Version: 10.0
Flash Version:
This should be filed under (reference, https://bugs.chromium.org/p/chromium/issues/detail?id=662499#c17):
- Extensions>API
- Blink>GetUserMedia>Desktop
,
Sep 28 2017
krajshree@ That is a perfect reproduction :+1:!
,
Sep 28 2017
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 28 2017
Rajshree, is this a regression?
,
Sep 28 2017
ligim...@ I don't think it is a regression. Just a side-effect of how the audio stream was captured. It seems like the "Status" of this shouldn't be "Unconfirmed" given the reproduction.
,
Sep 29 2017
Able to reproduce this issue on Mac 10.12.6, Win-10 and Ubuntu 14.04 using chrome reported version #61.0.3163.100 and latest canary #63.0.3226.0. This is a non-regression issue as it is observed from M50 old builds. Note: In M50, on clicking the background.html link of the extension a different error is thrown as in the attached screen shot. Hence, marking it as untriaged to get more inputs from dev team. Thanks...!!
,
Sep 29 2017
,
Oct 6 2017
Just to make sure you get this right: If you do a chooseDesktopMedia call that includes 'audio' it should be possible to call getUserMedia with audio-only constraints, is that a correct summary?
,
Oct 6 2017
Two problems here I think: 1. chooseDesktopMedia UI doesn't work when only requesting 'audio' 2. getUserMedia doesn't allow audio only constraints for loopback audio capture. I landed a patch for #2, but it broke Hangouts screenshare and got reverted. I'll pick it up again but not until later this quarter. I don't care about #1 since Media Router has its own UI for requesting desktop capture. But the original poster would like this ability for their extension.
,
Oct 6 2017
niklase@ Yes, that is a step in the right direction. @mfo...@ brought up the both areas that ideally would be patched up. People might be scared away of shared video when the extension only needs audio.
,
Oct 8
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 8
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by krajshree@chromium.org
, Sep 28 2017Components: Platform>Extensions>API
Labels: Needs-Feedback Needs-Triage-M61
2.7 MB
2.7 MB View Download
55.9 KB
55.9 KB View Download