New issue
Advanced search Search tips

Issue 647801 link

Starred by 4 users

Issue metadata

Status: Started
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Task
Launch-M-Target: 55-Dev , 55-Stable
Launch-UI: NA



Sign in to add a comment

Use Constraint To Control Whether Mute or Unmute Local Playback during Audio Sharing

Project Member Reported by qiangchen@chromium.org, Sep 16 2016

Issue description

When doing desktop share (either full screen or tab), do we need to mute the local playback?

The answer depends on the use case actually. 
For example, for Google Cast, in general the sharing sender is near the receiver, and thus we expect during the Casting, the sender side no longer plays out the audio.

However, for video chat, like Hangouts, we will expect both peers can hear the sound.

Our current solution is to hard the mute/unmute in different code paths:
1. For code path chooseDesktopMedia-->getUserMedia({video:desktop, audio:desktop}), we unmute the local playback. (As we'd expect this pair of APIs are more likely to be used by WebRTC app, like Hangouts.)

2. For code path getUserMedia({video:screen, audio:system}), and tabCapture(), we mute the local playback. (As we'd expect these APIs are more likely to be used by Cast)


But technically, there may not be a relation between the use case and which APIs to call. This setting would bring inconvenience to app developer.

Thus to resolve it, we need to add one entry for audio constraint, so that the app developer can specify in the getUserMedia or tabCapture API call whether his app would mute or unmute local playback during capturing.
 
Labels: -Type-Feature Type-Launch-OWP
Labels: Launch-M-Target-55-Dev Launch-M-Target-55-Stable Launch-UI-NA
Cc: niklase@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 13 2016

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

commit f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd
Author: qiangchen <qiangchen@chromium.org>
Date: Thu Oct 13 22:25:00 2016

Let Contraints Controll Mute/Unmute Audio Local Playback For Desktop Sharing

In this CL, we did the following things:
1. Add an entry for audio constraints of getUserMedia API, namely
googDisableLocalEcho.

2. The constraint works for the case of desktop sharing.

3. If set googDisableLocalEcho = true, then we will mute the
local playback of the sharing audio. Namely for full screen share
we will mute the system audio, and for tab share, we will mute
the corresponding tab. Vice versa.

BUG=647801

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

[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/android_webview/native/permission/media_access_permission_request_unittest.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/chrome/browser/media/webrtc/desktop_capture_access_handler.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/browser/media/capture/web_contents_audio_input_stream.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/browser/media/capture/web_contents_audio_input_stream.h
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/browser/media/capture/web_contents_video_capture_device.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/browser/media/capture/web_contents_video_capture_device.h
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/browser/media/capture/web_contents_video_capture_device_unittest.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/browser/renderer_host/media/audio_input_renderer_host.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/browser/renderer_host/media/media_stream_manager.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/browser/renderer_host/media/media_stream_manager.h
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/browser/renderer_host/media/video_capture_manager.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/browser/webrtc/webrtc_getusermedia_browsertest.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/common/media/media_stream_messages.h
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/common/media/media_stream_options.h
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/public/browser/desktop_media_id.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/public/browser/web_contents_media_capture_id.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/public/browser/web_contents_media_capture_id.h
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/public/common/media_stream_request.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/public/common/media_stream_request.h
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/renderer/media/user_media_client_impl.cc
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/content/test/data/media/getusermedia.html
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
[modify] https://crrev.com/f6ca1ed1a2d80ce5f22c10a2a5cda30b1c44bccd/third_party/WebKit/public/platform/WebMediaConstraints.h

Comment 5 by owe...@chromium.org, Sep 12 2017

Labels: migrated-launch-owp Type-Task
This issue has been automatically relabelled type=task because type=launch-owp issues are now officially deprecated. The deprecation is because they were creating confusion about how to get launch approvals, which should be instead done via type=launch issues.

We recommend this issue be used for implementation tracking (for public visibility), but if you already have an issue for that, you may mark this as duplicate.

For more details see here: https://docs.google.com/document/d/1JA6RohjtZQc26bTrGoIE_bSXGXUDQz8vc6G0n_sZJ2o/edit

For any questions, please contact owencm, sshruthi, larforge

Sign in to add a comment