New issue
Advanced search Search tips

Issue 765549 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Stereo audio in desktop/screen capture

Reported by madlittl...@gmail.com, Sep 15 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36

Steps to reproduce the problem:
When using the Desktop Capture API, the audio seems to be always down-mixed into a single audio stream that plays in both ears. 

```
// https://developer.chrome.com/extensions/desktopCapture
chrome.desktopCapture.chooseDesktopMedia(['screen', 'audio'], function(desktopMediaRequestId) {
    navigator.webkitGetUserMedia({
        audio: {
            mandatory: {
                chromeMediaSource: 'system'
            }
        },
        video: {
            mandatory: {
                chromeMediaSourceId: desktopMediaRequestId,
                chromeMediaSource: 'desktop'
            }
        }
    }, function(mediaStream) {
        // audio tracks, [MediaStreamTrack { enabled: true, id: '4b355cb5-55bc-46e4-a28e-bb53b29d3107', kind: 'audio', label: 'System Audio' ...  }]
        console.log('audio tracks', mediaStream.getAudioTracks());
    }, function(err) {
        console.error(err);
    });
});

```

What is the expected behavior?
Two separate stereo audio tracks(`MediaStreamTrack`) should be returned.

What went wrong?
Only one `MediaStreamTrack` returned. The audio seems to be always down-mixed into a single audio stream, no matter the given options/constraints.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 61.0.3163.91  Channel: stable
OS Version: 10.0
Flash Version: 

I am not the extension author but this is used in the SoundIt extension which allows you to stream desktop audio to any other Chrome tab on your network(I connect via a mobile device for wireless audio), https://chrome.google.com/webstore/detail/soundit/jpmlghikapcebilgkglhelbdipdibmgd

I'm unfamiliar with the chromium code-base, so any pointers to relevant files or sections of code are welcome. `chromium/src/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc`, etc
 
chrome-desktop-capture-audio-test1.zip
1.6 KB Download

Comment 1 by guidou@chromium.org, Sep 15 2017

Components: -Blink>GetUserMedia Blink>GetUserMedia>Desktop
Status: Available (was: Unconfirmed)
This issue is not limited to desktop/screen capture: I am experiencing the same behavior with all stereo audio MediaStreamSource down-mixed to mono.


User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3357.0 Safari/537.36



Sign in to add a comment