- From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
- Date: Tue, 28 Sep 2021 17:54:55 +0000
- To: public-webrtc-logs@w3.org
I think you're confusing simplicity with strictness. Developers expect to be allowed to split code into sub-functions and add logging statements. Some devs even seem to like to structure their code this way for no reason at all. I personally don't, but it MUST continue to work: ```js // My first screen sharing app! // The screen sharing function. I'm excited to learn this! I hope it works... async function getDisplayMedia(constraints) { try { const stream = await navigator.mediaDevices.getDisplayMedia(constraints); console.log(`Debug: screen-share succeeded. Got ${stream.getTracks().length} track(s)`); return stream; } catch (e) { console.log(`Debug: screen-share failed ${e.message}`); throw e; } } button1.onclick = async () => { try { video.srcObject = await getDisplayMedia({video: true}); navigator.mediaDevices.displayMediaFocusMode = "no-focus"; // why no worky?? } catch(e) { console.log(e); } }; ``` Your proposal breaks this fundamental expectation. https://jsfiddle.net/jib1/y5rz3hpm/ -- GitHub Notification of comment by jan-ivar Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/190#issuecomment-929491274 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 28 September 2021 17:54:57 UTC