Skip to content

Commit 4766bbb

Browse files
committed
Add muted attribute to video player
1 parent 6ffd01f commit 4766bbb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

frontend/src/components/Contexts/MediaStreamContext.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ export const MediaStreamProvider: FC<Props> = ({ children }) => {
6161
) {
6262
addTrackToConnection(track.mediaStreamTrack, config.robotId)
6363
}
64-
if (room.state == ConnectionState.Disconnected) {
64+
if (room.state === ConnectionState.Disconnected) {
6565
room.connect(config.url, config.token)
6666
.then(() => console.log(JSON.stringify(room.state)))
67-
.catch((error) => console.log('Error connecting to LiveKit room'))
67+
.catch((error) => console.warn('Error connecting to LiveKit Room, may already be connected:', error))
6868
}
69-
console.log(JSON.stringify(room.numParticipants))
7069
}
7170

7271
const createMediaConnection = async (config: MediaStreamConfig) => {

frontend/src/components/Pages/MissionPage/VideoStream/VideoPlayerSimpleStream.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ interface IVideoPlayerProps {
66
export const VideoPlayerSimpleStream = ({ videoStream, videoStreamName }: IVideoPlayerProps) => (
77
<video
88
autoPlay
9+
muted
910
ref={(video) => {
1011
if (video) video.srcObject = videoStream
1112
}}

0 commit comments

Comments
 (0)