Fix video muted
This commit is contained in:
parent
c6e43627a2
commit
91e244772f
1 changed files with 5 additions and 1 deletions
|
@ -333,6 +333,10 @@ function ParticipantTile({ style, participant, remove, ...rest }) {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (participant.stream) {
|
if (participant.stream) {
|
||||||
|
if (participant.local) {
|
||||||
|
videoRef.current.muted = true;
|
||||||
|
}
|
||||||
|
|
||||||
videoRef.current.srcObject = participant.stream;
|
videoRef.current.srcObject = participant.stream;
|
||||||
videoRef.current.play();
|
videoRef.current.play();
|
||||||
} else {
|
} else {
|
||||||
|
@ -343,7 +347,7 @@ function ParticipantTile({ style, participant, remove, ...rest }) {
|
||||||
return (
|
return (
|
||||||
<animated.div className={styles.participantTile} style={style} {...rest}>
|
<animated.div className={styles.participantTile} style={style} {...rest}>
|
||||||
<div className={styles.participantName}>{participant.userId}</div>
|
<div className={styles.participantName}>{participant.userId}</div>
|
||||||
<video ref={videoRef} playsInline muted={participant.muted} />
|
<video ref={videoRef} playsInline />
|
||||||
</animated.div>
|
</animated.div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue