Removed autoplay and trigerred play with script

This commit is contained in:
Mitchell McCaffrey 2020-04-09 11:48:15 +10:00
parent 502214c1f5
commit cebf28c568

View File

@ -5,10 +5,11 @@ function Stream({ stream, muted }) {
useEffect(() => {
if (audioRef.current) {
audioRef.current.srcObject = stream;
audioRef.current.play();
}
}, [stream]);
return <audio ref={audioRef} autoPlay playsInline muted={muted} />;
return <audio ref={audioRef} playsInline muted={muted} />;
}
Stream.defaultProps = {