Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: render video always #1872

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 17 additions & 24 deletions packages/roomkit-react/src/Prebuilt/components/VideoTile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ const Tile = ({
return 'large';
}, [width, height]);

// if there is no audio and video don't render. this can happen when native devices join with audio/video muted
if (!audioTrack && !track) {
return null;
}

return (
<StyledVideoTile.Root
css={{
Expand All @@ -108,25 +103,23 @@ const Tile = ({
<VideoTileStats audioTrackID={audioTrack?.id} videoTrackID={track?.id} peerID={peerId} isLocal={isLocal} />
) : null}

{track ? (
<Video
trackId={track?.id}
attach={isLocal ? undefined : !isAudioOnly}
mirror={
mirrorLocalVideo &&
peerId === localPeerID &&
track?.source === 'regular' &&
track?.facingMode !== 'environment'
}
noRadius={!roundedVideoTile}
data-testid="participant_video_tile"
css={{
objectFit,
filter: isVideoDegraded ? 'blur($space$2)' : undefined,
bg: 'transparent',
}}
/>
) : null}
<Video
trackId={track?.id}
attach={isLocal ? undefined : !isAudioOnly}
mirror={
mirrorLocalVideo &&
peerId === localPeerID &&
track?.source === 'regular' &&
track?.facingMode !== 'environment'
}
noRadius={!roundedVideoTile}
data-testid="participant_video_tile"
css={{
objectFit,
filter: isVideoDegraded ? 'blur($space$2)' : undefined,
bg: 'transparent',
}}
/>

{isVideoMuted || (!isLocal && isAudioOnly) ? (
<StyledVideoTile.AvatarContainer>
Expand Down
Loading