diff --git a/src/components/Nickname.js b/src/components/Nickname.js index f91c895..4f3faec 100644 --- a/src/components/Nickname.js +++ b/src/components/Nickname.js @@ -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]);