RoomClient.js inside _joinRoom function. There’s a comment that reads:
// NOTE: Stuff to play remote audios due to browsers' new autoplay policy.
//
// Just get access to the mic and DO NOT close the mic track for a while.
// Super hack!
{
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
const audioTrack = stream.getAudioTracks()[0];
audioTrack.enabled = false;
setTimeout(() => audioTrack.stop(), 120000);
}
If someone knows what the comment means that would be really great. Because as far as I know, the browser won’t let you play any audio unless the audio happens in response to a user gesture, that is basically what the autoplay policy is. I would be interested in knowing what part does getting user’s microphone play.
Thanks.