Default stream mute on play
This commit is contained in:
parent
5b2f097248
commit
4b0336fa9d
@ -8,7 +8,9 @@ function Nickname({ nickname, stream }) {
|
||||
useEffect(() => {
|
||||
if (audioRef.current) {
|
||||
audioRef.current.srcObject = stream;
|
||||
setStreamMuted(audioRef.current.defaultMuted);
|
||||
audioRef.current.onplay = () => {
|
||||
setStreamMuted(audioRef.current.defaultMuted);
|
||||
};
|
||||
}
|
||||
}, [stream]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user