Skip to content

Commit

Permalink
fix: @typescript-eslint/no-unused-expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
n-hidaka committed Aug 30, 2024
1 parent 7389e37 commit 4f11c21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/conference/components/video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function Video({ stream, isReverse = false, isVideoOnly = false }: Props) {
}

log("useEffect(): assign and play stream for video");
$video.srcObject !== stream && ($video.srcObject = stream);
$video.paused && $video.play();
if ($video.srcObject !== stream) $video.srcObject = stream;
if ($video.paused) $video.play();
}, [isNoVideo, videoRef, log, stream]);
useEffect(() => {
const $audio = audioRef.current;
Expand All @@ -33,8 +33,8 @@ function Video({ stream, isReverse = false, isVideoOnly = false }: Props) {
}

log("useEffect(): assign and play stream for audio");
$audio.srcObject !== stream && ($audio.srcObject = stream);
$audio.paused && $audio.play();
if ($audio.srcObject !== stream) $audio.srcObject = stream;
if ($audio.paused) $audio.play();
}, [isNoAudio, isVideoOnly, audioRef, log, stream]);

log("render()", [...stream.getTracks()]);
Expand Down

0 comments on commit 4f11c21

Please sign in to comment.