Skip to content

Commit

Permalink
Set local media options in state
Browse files Browse the repository at this point in the history
  • Loading branch information
thyal committed Jan 4, 2024
1 parent 17d387d commit 19f730b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/lib/core/redux/slices/localMedia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ export const doStartLocalMedia = createAppAsyncThunk(

if (!(payload.audio || payload.video)) {
return { stream: new MediaStream() };
} else {
dispatch(doSetLocalMediaOptions({ options: payload }));
}

try {
Expand Down
1 change: 1 addition & 0 deletions src/lib/core/redux/tests/store/localMedia.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ describe("actions", () => {
status: "started",
stream: newStream,
devices: expect.any(Object),
options: { audio: true, video: true },
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/stories/custom-ui.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const RoomConnectionWithLocalMedia = ({ roomUrl, displayName }: { roomUrl
};

export const LocalMediaOnly = () => {
const localMedia = useLocalMedia();
const localMedia = useLocalMedia({ audio: true, video: true });

return (
<div>
Expand Down

0 comments on commit 19f730b

Please sign in to comment.