Skip to content

Commit

Permalink
browser-sdk: Auto mute video cell of local participant in video grid
Browse files Browse the repository at this point in the history
  • Loading branch information
thyal committed Nov 21, 2024
1 parent 97c00c9 commit ad21973
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/khaki-humans-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@whereby.com/browser-sdk": patch
---

Auto mute video cell of local participant in video grid
1 change: 1 addition & 0 deletions packages/browser-sdk/src/lib/react/Grid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const GridVideoView = React.forwardRef<WherebyVideoElement, GridVideoViewProps>(
...(isConstrained ? { objectFit: "cover" } : {}),
...style,
}}
muted={participant.isLocalClient}
{...rest}
stream={s}
onVideoResize={handleResize}
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-sdk/src/stories/video-grid-ui.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const VideoGridStory = {
}
const [isLocalScreenshareActive, setIsLocalScreenshareActive] = React.useState(false);

const { actions } = useRoomConnection(roomUrl, { localMediaOptions: { audio: false, video: true } });
const { actions } = useRoomConnection(roomUrl, { localMediaOptions: { audio: true, video: true } });
const { toggleCamera, toggleMicrophone, startScreenshare, stopScreenshare, joinRoom, leaveRoom } = actions;

React.useEffect(() => {
Expand Down

0 comments on commit ad21973

Please sign in to comment.