Skip to content

Commit

Permalink
fix: updated global state to mediastream instead of mediastream-track
Browse files Browse the repository at this point in the history
  • Loading branch information
malmen237 committed Apr 9, 2024
1 parent d66fe8d commit 13c0008
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/global-state/global-state-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type TGlobalStateAction =
| TProductionListFetched
| TUpdateDevicesAction
| TUpdateJoinProductionOptions
| TMediaStreamTrack;
| TMediaStream;

export type TPublishError = {
type: "ERROR";
Expand All @@ -31,7 +31,7 @@ export type TUpdateJoinProductionOptions = {
payload: TJoinProductionOptions | null;
};

export type TMediaStreamTrack = {
type: "CONNECTED_MEDIASTREAM_TRACK";
payload: MediaStreamTrack | null;
export type TMediaStream = {
type: "CONNECTED_MEDIASTREAM";
payload: MediaStream | null;
};
6 changes: 3 additions & 3 deletions src/global-state/global-state-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const initialGlobalState: TGlobalState = {
reloadProductionList: true,
devices: null,
joinProductionOptions: null,
audioInput: null,
mediaStreamInput: null,
};

const globalReducer: Reducer<TGlobalState, TGlobalStateAction> = (
Expand Down Expand Up @@ -44,10 +44,10 @@ const globalReducer: Reducer<TGlobalState, TGlobalStateAction> = (
...state,
joinProductionOptions: action.payload,
};
case "CONNECTED_MEDIASTREAM_TRACK":
case "CONNECTED_MEDIASTREAM":
return {
...state,
audioInput: action.payload,
mediaStreamInput: action.payload,
};
default:
return state;
Expand Down
2 changes: 1 addition & 1 deletion src/global-state/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export type TGlobalState = {
reloadProductionList: boolean;
devices: MediaDeviceInfo[] | null;
joinProductionOptions: TJoinProductionOptions | null;
audioInput: MediaStreamTrack | null;
mediaStreamInput: MediaStream | null;
};

0 comments on commit 13c0008

Please sign in to comment.