Re: [mediacapture-output] Setting the audio output for a whole context or page (#87)

I got here while trying to get this to work now in chrome, and if something like a whole page default can simplify how changing a device is done now, it would be very nice.  I'm really just playing around, so take it with a sack of salt, but OTOH there's generally a lot of confusion on the interwebs.

The thing that tripped me is that if you `createMediaElementSource` an audio element (in my case since I want to monitor it for a visualization of a player), then it's no longer playing until you manually connect that stream to `ctx.destination`, but AFAICT this is currently (in chrome, at least) always playing the default device.  So to get the monitor to work the only way I found was to create a second `Audio`, set its `srcObject` to a fresh `createMediaStreamDestination()`'s stream, and then use `setSinkId` on *that* audio.  That's much more than @jan-ivar's loop suggests, and would be nice to simplify.  (But maybe I'm confusion too.)

-- 
GitHub Notification of comment by elibarzilay
Please view or discuss this issue at https://github.com/w3c/mediacapture-output/issues/87#issuecomment-872709104 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 2 July 2021 04:44:03 UTC