Default stream mute on play
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user