Skip to content

Commit

Permalink
Log play exception
Browse files Browse the repository at this point in the history
  • Loading branch information
jmattheis committed May 21, 2023
1 parent 5933a0d commit 977629a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/Room.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const Room = ({
React.useEffect(() => {
if (videoElement && stream) {
videoElement.srcObject = stream;
videoElement.play();
videoElement.play().catch((e) => console.log('Could not play main video', e));
}
}, [videoElement, stream]);

Expand Down
2 changes: 1 addition & 1 deletion ui/src/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const Video = ({src, className}: {src: MediaStream; className?: string})
React.useEffect(() => {
if (element) {
element.srcObject = src;
element.play();
element.play().catch((e) => console.log('Could not play preview video', e));
}
}, [element, src]);

Expand Down

0 comments on commit 977629a

Please sign in to comment.