New issue
Advanced search Search tips

Issue 594726 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

chooseDesktopMedia audio not captured with MediaStreamRecorder

Project Member Reported by niklase@chromium.org, Mar 14 2016

Issue description

Version: 50
OS: Linux

What steps will reproduce the problem?
(1) Enable #enable-audio-support-for-desktop-share and #enable-tab-for-desktop-share
(2) Install https://github.com/niklasenbom/RecordingApp
(3) Record a tab that plays audio and enable system audio to be recorded

What is the expected output? What do you see instead?
I don't get any audio in the file. According to the console output the resulting mediaStream has an audio track.


Please use labels and text to provide additional information.

 
Status: Started (was: Assigned)
Update of my investigate:
in function onAccessApproved(id),
the GetUserMediaCall's audio constraint "audio:false" would disable audio track.

I'll verify the case after changing that constraint to one with source_id.


Status: WontFix (was: Started)
Got it to work, error in the test code
Update of my investigate:
Why
GetUserMedia({audio:true,.....})
GetUserMedia({audio:{optional:.....}......})
does not work.

The word "optional" or "mandatory" in the constraint, does not mean audio track is optional or required. It means the following part of the constraint is a good-to-satisfy or a must-be-satisfied. 

The main usage of optional constraint is like this:
{
   video: 
   {
       mandatory: {minWidth:720, minHeight: 480},
       optional: [{width:1080, height:720}]           
   }
}
This constraint will try to get a camera device with 1080*720 first, and if no HD camera available, an ordinary camera will be used as long as the definition is lower than 720*480. 

However, some constraints must be in the "mandatory" part to work. For example the media source. (For desktop capture, the media source is "desktop")
The following is the code, where audioConstraints().basic() corresponds to mandatory part, and audioConstraints().advance() corresponds to optional part. As we see, the code never parses optional part for media source.
https://code.google.com/p/chromium/codesearch#chromium/src/content/renderer/media/user_media_client_impl.cc&sq=package:chromium&l=65
It is natural to understand: there is probably no use case like this: Try to give me a screen capture stream first, if not available, give me the camera stream.

Simply setting "audio:true", the default media source is microphone, and we do not allow a combination like "screen capture video + microphone audio"
https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/renderer_host/media/media_stream_manager.cc&sq=package:chromium&l=1329

Sign in to add a comment