Live video on the AT Protocol
79
fork

Configure Feed

Select the types of activity you want to include in your feed.

set wasMuted only when muted

+8 -5
+8 -5
js/components/src/components/mobile-player/player.tsx
··· 38 38 39 39 // if we set muted, set it and restore after 40 40 useEffect(() => { 41 - let wasMuted = muted; 42 - if (props.muted) { 43 - setMuted(props.muted); 44 - } 41 + let wasMuted: null | boolean = null; 42 + setTimeout(() => { 43 + if (props.muted != undefined) { 44 + wasMuted = muted; 45 + setMuted(props.muted); 46 + } 47 + }, 200); 45 48 return () => { 46 - setMuted(wasMuted); 49 + wasMuted !== null && setMuted(wasMuted); 47 50 }; 48 51 }, [props.muted]); 49 52