[Webkit-unassigned] [Bug 237523] New: WebRTC / HTMLMediaElement - calling getDisplayMedia "unmutes" getUserMedia stream on muted video element
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 7 04:36:56 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=237523
Bug ID: 237523
Summary: WebRTC / HTMLMediaElement - calling getDisplayMedia
"unmutes" getUserMedia stream on muted video element
Product: WebKit
Version: Safari 15
Hardware: Mac (Intel)
OS: macOS 12
Status: NEW
Severity: Normal
Priority: P2
Component: WebRTC
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ajdalshov at icloud.com
CC: youennf at gmail.com
The sample code below starts a local stream with getUserMedia and adds the stream to a muted video element (muted prop set on user video element to prevent audio feedback), audio is muted as expected, but after calling getDisplayMedia (allowing the request), the video element with the user media stream will unmute and cause audio feedback. It's not even needed to add the display media stream to the other video element, calling getDisplayMedia alone is sufficient.
Note that document.getElementById("user").muted will still return true even if audio feedback is clearly present.
Tested with:
Safari Version 15.3 (17612.4.9.1.8) / macOS 12.2.1
Safari Technology Preview Release 141 (Safari 15.4, WebKit 17614.1.3.8) / macOS 12.2.1
---
<html>
<head></head>
<body>
<button onclick="startScreenSharing()">Start screen sharing</button>
<video id="user" playsinline autoplay muted></video>
<video id="display" playsinline autoplay></video>
<script>
window.onload = function() {
navigator.mediaDevices.getUserMedia({audio: true, video: true})
.then((stream) => {
document.getElementById("user").srcObject = stream;
});
};
this.startScreenSharing = () => {
navigator.mediaDevices.getDisplayMedia({video: true})
.then((stream) => {
document.getElementById("display").srcObject = stream;
});
};
</script>
</body>
</html>
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220307/1559b74c/attachment.htm>
More information about the webkit-unassigned
mailing list