Skip to content

Commit

Permalink
fix(webapp): remote enable video
Browse files Browse the repository at this point in the history
  • Loading branch information
a-wing committed Dec 21, 2024
1 parent d43bec6 commit a24822e
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions webapp/components/player/player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,17 @@ export default function Player(props: { stream: MediaStream, muted: boolean, aud
return (
<center className="flex flex-col justify-center min-h-60" style={{ width: props.width }}>
{!props.stream.getTracks().length ? <center><SvgProgress /></center> : null}
{props.video
? <video
className="rounded-xl"
playsInline={true}
autoPlay={true}
controls={true}
muted={props.muted}
ref={refVideo}
style={props.stream?.getVideoTracks().length ? { width: props.width } : { height: '0px' }}
/>
: null
}
<video
className="rounded-xl"
playsInline={true}
autoPlay={true}
controls={true}
muted={props.muted}
ref={refVideo}
style={props.stream?.getVideoTracks().length
? { width: props.width, display: props.video ? "inline" : "none"}

Check warning on line 102 in webapp/components/player/player.tsx

View workflow job for this annotation

GitHub Actions / Deploy proxy (macos-latest)

Strings must use singlequote

Check warning on line 102 in webapp/components/player/player.tsx

View workflow job for this annotation

GitHub Actions / Deploy proxy (macos-latest)

Strings must use singlequote

Check warning on line 102 in webapp/components/player/player.tsx

View workflow job for this annotation

GitHub Actions / Deploy proxy (ubuntu-latest)

Strings must use singlequote

Check warning on line 102 in webapp/components/player/player.tsx

View workflow job for this annotation

GitHub Actions / Deploy proxy (ubuntu-latest)

Strings must use singlequote

Check warning on line 102 in webapp/components/player/player.tsx

View workflow job for this annotation

GitHub Actions / Deploy proxy (windows-latest)

Strings must use singlequote

Check warning on line 102 in webapp/components/player/player.tsx

View workflow job for this annotation

GitHub Actions / Deploy proxy (windows-latest)

Strings must use singlequote
: { height: '0px' }}
/>
{!props.video || showAudio
? <AudioWave stream={props.stream} />
: null
Expand Down

0 comments on commit a24822e

Please sign in to comment.