Skip to content

Commit

Permalink
fix: use canplaythrough
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 committed Oct 9, 2023
1 parent 7084ca9 commit d601c32
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions packages/roomkit-react/src/Prebuilt/components/ScreenshareTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export const ScreenshareTile = ({
minHeight: 0,
margin: 'auto',
maxWidth: '100%',
maxHeight: '100%',
opacity: showContent ? 1 : 0,
}}
data-testid="screenshare_tile"
Expand All @@ -107,14 +106,16 @@ export const ScreenshareTile = ({
{isFullscreen ? <ShrinkIcon /> : <ExpandIcon />}
</StyledVideoTile.FullScreenButton>
) : null}
<Video
screenShare={true}
mirror={false}
attach={!isAudioOnly}
trackId={track?.id}
css={{ minHeight: 0 }}
onLoadedData={() => setShowContent(true)}
/>
{track ? (
<Video
screenShare={true}
mirror={false}
attach={!isAudioOnly}
trackId={track?.id}
css={{ minHeight: 0, width: 'max-content', maxWidth: '100%' }}
onCanPlayThrough={() => setShowContent(true)}
/>
) : null}
<StyledVideoTile.Info css={labelStyles}>{label}</StyledVideoTile.Info>
{isMouseHovered && !peer.isLocal ? (
<TileMenu
Expand Down

0 comments on commit d601c32

Please sign in to comment.