- From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
- Date: Wed, 20 May 2020 14:47:39 +0000
- To: public-webrtc-logs@w3.org
> We probably need to add something to WebAudio as well. Web audio seems easy enough to work around. Instead of: ```js audioNode.connect(audioContext.destination); ``` you'd do ```js const dest = audioContext.createMediaStreamDestination(); element.srcObject = dest.stream; audioNode.connect(dest); ``` Not sure about audio worklet though. > In most cases, it seems that pages will want to output all their audio to a single device. The workaround is to collect all elements and set them: ```js async function setAllElements(sinkId) { const elements = [...doc.getElementsByTagName("audio"), ...doc.getElementsByTagName("video")]; await Promise.all(elements.map(element => element.setSinkId(sinkId))); } ``` -- GitHub Notification of comment by jan-ivar Please view or discuss this issue at https://github.com/w3c/mediacapture-output/issues/87#issuecomment-631521457 using your GitHub account
Received on Wednesday, 20 May 2020 14:47:41 UTC