Removed autoplay and trigerred play with script
This commit is contained in:
parent
502214c1f5
commit
cebf28c568
@ -5,10 +5,11 @@ function Stream({ stream, muted }) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (audioRef.current) {
|
if (audioRef.current) {
|
||||||
audioRef.current.srcObject = stream;
|
audioRef.current.srcObject = stream;
|
||||||
|
audioRef.current.play();
|
||||||
}
|
}
|
||||||
}, [stream]);
|
}, [stream]);
|
||||||
|
|
||||||
return <audio ref={audioRef} autoPlay playsInline muted={muted} />;
|
return <audio ref={audioRef} playsInline muted={muted} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
Stream.defaultProps = {
|
Stream.defaultProps = {
|
||||||
|
Loading…
Reference in New Issue
Block a user