diff --git a/src/global-state/global-state-actions.ts b/src/global-state/global-state-actions.ts index e70d5e87..53522e7b 100644 --- a/src/global-state/global-state-actions.ts +++ b/src/global-state/global-state-actions.ts @@ -6,7 +6,7 @@ export type TGlobalStateAction = | TProductionListFetched | TUpdateDevicesAction | TUpdateJoinProductionOptions - | TMediaStreamTrack; + | TMediaStream; export type TPublishError = { type: "ERROR"; @@ -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; }; diff --git a/src/global-state/global-state-reducer.ts b/src/global-state/global-state-reducer.ts index 1b23e0ce..ed1a95e8 100644 --- a/src/global-state/global-state-reducer.ts +++ b/src/global-state/global-state-reducer.ts @@ -9,7 +9,7 @@ const initialGlobalState: TGlobalState = { reloadProductionList: true, devices: null, joinProductionOptions: null, - audioInput: null, + mediaStreamInput: null, }; const globalReducer: Reducer = ( @@ -44,10 +44,10 @@ const globalReducer: Reducer = ( ...state, joinProductionOptions: action.payload, }; - case "CONNECTED_MEDIASTREAM_TRACK": + case "CONNECTED_MEDIASTREAM": return { ...state, - audioInput: action.payload, + mediaStreamInput: action.payload, }; default: return state; diff --git a/src/global-state/types.ts b/src/global-state/types.ts index aefc66e3..8eb0b69c 100644 --- a/src/global-state/types.ts +++ b/src/global-state/types.ts @@ -9,5 +9,5 @@ export type TGlobalState = { reloadProductionList: boolean; devices: MediaDeviceInfo[] | null; joinProductionOptions: TJoinProductionOptions | null; - audioInput: MediaStreamTrack | null; + mediaStreamInput: MediaStream | null; };