@whereby.com/core 1.31.0 → 1.31.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +13 -5
- package/dist/index.mjs +13 -5
- package/dist/legacy-esm.js +13 -5
- package/dist/redux/index.cjs +13 -5
- package/dist/redux/index.js +13 -5
- package/dist/redux/index.mjs +13 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1314,7 +1314,7 @@ const createReactor = (selectors, callback) => {
|
|
|
1314
1314
|
});
|
|
1315
1315
|
};
|
|
1316
1316
|
|
|
1317
|
-
const coreVersion = "1.31.
|
|
1317
|
+
const coreVersion = "1.31.2";
|
|
1318
1318
|
|
|
1319
1319
|
function decodeRoomName(roomName) {
|
|
1320
1320
|
if (!roomName) {
|
|
@@ -1863,6 +1863,9 @@ const localMediaSlice = toolkit.createSlice({
|
|
|
1863
1863
|
builder.addCase(doToggleCamera.fulfilled, (state) => {
|
|
1864
1864
|
return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
|
|
1865
1865
|
});
|
|
1866
|
+
builder.addCase(doToggleCamera.rejected, (state) => {
|
|
1867
|
+
return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
|
|
1868
|
+
});
|
|
1866
1869
|
builder.addCase(doUpdateDeviceList.fulfilled, (state, action) => {
|
|
1867
1870
|
return Object.assign(Object.assign({}, state), { devices: action.payload.devices });
|
|
1868
1871
|
});
|
|
@@ -2277,18 +2280,22 @@ startAppListening({
|
|
|
2277
2280
|
},
|
|
2278
2281
|
});
|
|
2279
2282
|
startAppListening({
|
|
2280
|
-
predicate: (
|
|
2283
|
+
predicate: (action, currentState, previousState) => {
|
|
2284
|
+
if (!setCurrentCameraDeviceId.match(action))
|
|
2285
|
+
return false;
|
|
2281
2286
|
const oldValue = selectCurrentCameraDeviceId(previousState);
|
|
2282
2287
|
const newValue = selectCurrentCameraDeviceId(currentState);
|
|
2283
2288
|
const isReady = selectLocalMediaStatus(previousState) === "started";
|
|
2284
|
-
return isReady &&
|
|
2289
|
+
return isReady && selectIsCameraEnabled(currentState) && oldValue !== newValue;
|
|
2285
2290
|
},
|
|
2286
2291
|
effect: (_action, { dispatch }) => {
|
|
2287
2292
|
dispatch(doSetDevice({ audio: false, video: true }));
|
|
2288
2293
|
},
|
|
2289
2294
|
});
|
|
2290
2295
|
startAppListening({
|
|
2291
|
-
predicate: (
|
|
2296
|
+
predicate: (action, currentState, previousState) => {
|
|
2297
|
+
if (!setCurrentMicrophoneDeviceId.match(action))
|
|
2298
|
+
return false;
|
|
2292
2299
|
const oldValue = selectCurrentMicrophoneDeviceId(previousState);
|
|
2293
2300
|
const newValue = selectCurrentMicrophoneDeviceId(currentState);
|
|
2294
2301
|
const isReady = selectLocalMediaStatus(previousState) === "started";
|
|
@@ -2299,7 +2306,7 @@ startAppListening({
|
|
|
2299
2306
|
},
|
|
2300
2307
|
});
|
|
2301
2308
|
startAppListening({
|
|
2302
|
-
matcher: toolkit.isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled),
|
|
2309
|
+
matcher: toolkit.isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled, doToggleCamera.fulfilled),
|
|
2303
2310
|
effect: (_action, { dispatch, getState }) => {
|
|
2304
2311
|
const state = getState();
|
|
2305
2312
|
const stream = selectLocalMediaStream(state);
|
|
@@ -2311,6 +2318,7 @@ startAppListening({
|
|
|
2311
2318
|
audioTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.audio) || stream.getAudioTracks()[0],
|
|
2312
2319
|
videoTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.video) || stream.getVideoTracks()[0],
|
|
2313
2320
|
devices,
|
|
2321
|
+
lastVideoId: selectIsCameraEnabled(state) ? undefined : selectCurrentCameraDeviceId(state),
|
|
2314
2322
|
});
|
|
2315
2323
|
dispatch(localStreamMetadataUpdated(deviceData));
|
|
2316
2324
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -1312,7 +1312,7 @@ const createReactor = (selectors, callback) => {
|
|
|
1312
1312
|
});
|
|
1313
1313
|
};
|
|
1314
1314
|
|
|
1315
|
-
const coreVersion = "1.31.
|
|
1315
|
+
const coreVersion = "1.31.2";
|
|
1316
1316
|
|
|
1317
1317
|
function decodeRoomName(roomName) {
|
|
1318
1318
|
if (!roomName) {
|
|
@@ -1861,6 +1861,9 @@ const localMediaSlice = createSlice({
|
|
|
1861
1861
|
builder.addCase(doToggleCamera.fulfilled, (state) => {
|
|
1862
1862
|
return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
|
|
1863
1863
|
});
|
|
1864
|
+
builder.addCase(doToggleCamera.rejected, (state) => {
|
|
1865
|
+
return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
|
|
1866
|
+
});
|
|
1864
1867
|
builder.addCase(doUpdateDeviceList.fulfilled, (state, action) => {
|
|
1865
1868
|
return Object.assign(Object.assign({}, state), { devices: action.payload.devices });
|
|
1866
1869
|
});
|
|
@@ -2275,18 +2278,22 @@ startAppListening({
|
|
|
2275
2278
|
},
|
|
2276
2279
|
});
|
|
2277
2280
|
startAppListening({
|
|
2278
|
-
predicate: (
|
|
2281
|
+
predicate: (action, currentState, previousState) => {
|
|
2282
|
+
if (!setCurrentCameraDeviceId.match(action))
|
|
2283
|
+
return false;
|
|
2279
2284
|
const oldValue = selectCurrentCameraDeviceId(previousState);
|
|
2280
2285
|
const newValue = selectCurrentCameraDeviceId(currentState);
|
|
2281
2286
|
const isReady = selectLocalMediaStatus(previousState) === "started";
|
|
2282
|
-
return isReady &&
|
|
2287
|
+
return isReady && selectIsCameraEnabled(currentState) && oldValue !== newValue;
|
|
2283
2288
|
},
|
|
2284
2289
|
effect: (_action, { dispatch }) => {
|
|
2285
2290
|
dispatch(doSetDevice({ audio: false, video: true }));
|
|
2286
2291
|
},
|
|
2287
2292
|
});
|
|
2288
2293
|
startAppListening({
|
|
2289
|
-
predicate: (
|
|
2294
|
+
predicate: (action, currentState, previousState) => {
|
|
2295
|
+
if (!setCurrentMicrophoneDeviceId.match(action))
|
|
2296
|
+
return false;
|
|
2290
2297
|
const oldValue = selectCurrentMicrophoneDeviceId(previousState);
|
|
2291
2298
|
const newValue = selectCurrentMicrophoneDeviceId(currentState);
|
|
2292
2299
|
const isReady = selectLocalMediaStatus(previousState) === "started";
|
|
@@ -2297,7 +2304,7 @@ startAppListening({
|
|
|
2297
2304
|
},
|
|
2298
2305
|
});
|
|
2299
2306
|
startAppListening({
|
|
2300
|
-
matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled),
|
|
2307
|
+
matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled, doToggleCamera.fulfilled),
|
|
2301
2308
|
effect: (_action, { dispatch, getState }) => {
|
|
2302
2309
|
const state = getState();
|
|
2303
2310
|
const stream = selectLocalMediaStream(state);
|
|
@@ -2309,6 +2316,7 @@ startAppListening({
|
|
|
2309
2316
|
audioTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.audio) || stream.getAudioTracks()[0],
|
|
2310
2317
|
videoTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.video) || stream.getVideoTracks()[0],
|
|
2311
2318
|
devices,
|
|
2319
|
+
lastVideoId: selectIsCameraEnabled(state) ? undefined : selectCurrentCameraDeviceId(state),
|
|
2312
2320
|
});
|
|
2313
2321
|
dispatch(localStreamMetadataUpdated(deviceData));
|
|
2314
2322
|
},
|
package/dist/legacy-esm.js
CHANGED
|
@@ -1312,7 +1312,7 @@ const createReactor = (selectors, callback) => {
|
|
|
1312
1312
|
});
|
|
1313
1313
|
};
|
|
1314
1314
|
|
|
1315
|
-
const coreVersion = "1.31.
|
|
1315
|
+
const coreVersion = "1.31.2";
|
|
1316
1316
|
|
|
1317
1317
|
function decodeRoomName(roomName) {
|
|
1318
1318
|
if (!roomName) {
|
|
@@ -1861,6 +1861,9 @@ const localMediaSlice = createSlice({
|
|
|
1861
1861
|
builder.addCase(doToggleCamera.fulfilled, (state) => {
|
|
1862
1862
|
return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
|
|
1863
1863
|
});
|
|
1864
|
+
builder.addCase(doToggleCamera.rejected, (state) => {
|
|
1865
|
+
return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
|
|
1866
|
+
});
|
|
1864
1867
|
builder.addCase(doUpdateDeviceList.fulfilled, (state, action) => {
|
|
1865
1868
|
return Object.assign(Object.assign({}, state), { devices: action.payload.devices });
|
|
1866
1869
|
});
|
|
@@ -2275,18 +2278,22 @@ startAppListening({
|
|
|
2275
2278
|
},
|
|
2276
2279
|
});
|
|
2277
2280
|
startAppListening({
|
|
2278
|
-
predicate: (
|
|
2281
|
+
predicate: (action, currentState, previousState) => {
|
|
2282
|
+
if (!setCurrentCameraDeviceId.match(action))
|
|
2283
|
+
return false;
|
|
2279
2284
|
const oldValue = selectCurrentCameraDeviceId(previousState);
|
|
2280
2285
|
const newValue = selectCurrentCameraDeviceId(currentState);
|
|
2281
2286
|
const isReady = selectLocalMediaStatus(previousState) === "started";
|
|
2282
|
-
return isReady &&
|
|
2287
|
+
return isReady && selectIsCameraEnabled(currentState) && oldValue !== newValue;
|
|
2283
2288
|
},
|
|
2284
2289
|
effect: (_action, { dispatch }) => {
|
|
2285
2290
|
dispatch(doSetDevice({ audio: false, video: true }));
|
|
2286
2291
|
},
|
|
2287
2292
|
});
|
|
2288
2293
|
startAppListening({
|
|
2289
|
-
predicate: (
|
|
2294
|
+
predicate: (action, currentState, previousState) => {
|
|
2295
|
+
if (!setCurrentMicrophoneDeviceId.match(action))
|
|
2296
|
+
return false;
|
|
2290
2297
|
const oldValue = selectCurrentMicrophoneDeviceId(previousState);
|
|
2291
2298
|
const newValue = selectCurrentMicrophoneDeviceId(currentState);
|
|
2292
2299
|
const isReady = selectLocalMediaStatus(previousState) === "started";
|
|
@@ -2297,7 +2304,7 @@ startAppListening({
|
|
|
2297
2304
|
},
|
|
2298
2305
|
});
|
|
2299
2306
|
startAppListening({
|
|
2300
|
-
matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled),
|
|
2307
|
+
matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled, doToggleCamera.fulfilled),
|
|
2301
2308
|
effect: (_action, { dispatch, getState }) => {
|
|
2302
2309
|
const state = getState();
|
|
2303
2310
|
const stream = selectLocalMediaStream(state);
|
|
@@ -2309,6 +2316,7 @@ startAppListening({
|
|
|
2309
2316
|
audioTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.audio) || stream.getAudioTracks()[0],
|
|
2310
2317
|
videoTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.video) || stream.getVideoTracks()[0],
|
|
2311
2318
|
devices,
|
|
2319
|
+
lastVideoId: selectIsCameraEnabled(state) ? undefined : selectCurrentCameraDeviceId(state),
|
|
2312
2320
|
});
|
|
2313
2321
|
dispatch(localStreamMetadataUpdated(deviceData));
|
|
2314
2322
|
},
|
package/dist/redux/index.cjs
CHANGED
|
@@ -76,7 +76,7 @@ const createReactor = (selectors, callback) => {
|
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
const coreVersion = "1.31.
|
|
79
|
+
const coreVersion = "1.31.2";
|
|
80
80
|
|
|
81
81
|
function decodeRoomName(roomName) {
|
|
82
82
|
if (!roomName) {
|
|
@@ -644,6 +644,9 @@ const localMediaSlice = toolkit.createSlice({
|
|
|
644
644
|
builder.addCase(doToggleCamera.fulfilled, (state) => {
|
|
645
645
|
return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
|
|
646
646
|
});
|
|
647
|
+
builder.addCase(doToggleCamera.rejected, (state) => {
|
|
648
|
+
return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
|
|
649
|
+
});
|
|
647
650
|
builder.addCase(doUpdateDeviceList.fulfilled, (state, action) => {
|
|
648
651
|
return Object.assign(Object.assign({}, state), { devices: action.payload.devices });
|
|
649
652
|
});
|
|
@@ -1058,18 +1061,22 @@ startAppListening({
|
|
|
1058
1061
|
},
|
|
1059
1062
|
});
|
|
1060
1063
|
startAppListening({
|
|
1061
|
-
predicate: (
|
|
1064
|
+
predicate: (action, currentState, previousState) => {
|
|
1065
|
+
if (!setCurrentCameraDeviceId.match(action))
|
|
1066
|
+
return false;
|
|
1062
1067
|
const oldValue = selectCurrentCameraDeviceId(previousState);
|
|
1063
1068
|
const newValue = selectCurrentCameraDeviceId(currentState);
|
|
1064
1069
|
const isReady = selectLocalMediaStatus(previousState) === "started";
|
|
1065
|
-
return isReady &&
|
|
1070
|
+
return isReady && selectIsCameraEnabled(currentState) && oldValue !== newValue;
|
|
1066
1071
|
},
|
|
1067
1072
|
effect: (_action, { dispatch }) => {
|
|
1068
1073
|
dispatch(doSetDevice({ audio: false, video: true }));
|
|
1069
1074
|
},
|
|
1070
1075
|
});
|
|
1071
1076
|
startAppListening({
|
|
1072
|
-
predicate: (
|
|
1077
|
+
predicate: (action, currentState, previousState) => {
|
|
1078
|
+
if (!setCurrentMicrophoneDeviceId.match(action))
|
|
1079
|
+
return false;
|
|
1073
1080
|
const oldValue = selectCurrentMicrophoneDeviceId(previousState);
|
|
1074
1081
|
const newValue = selectCurrentMicrophoneDeviceId(currentState);
|
|
1075
1082
|
const isReady = selectLocalMediaStatus(previousState) === "started";
|
|
@@ -1080,7 +1087,7 @@ startAppListening({
|
|
|
1080
1087
|
},
|
|
1081
1088
|
});
|
|
1082
1089
|
startAppListening({
|
|
1083
|
-
matcher: toolkit.isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled),
|
|
1090
|
+
matcher: toolkit.isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled, doToggleCamera.fulfilled),
|
|
1084
1091
|
effect: (_action, { dispatch, getState }) => {
|
|
1085
1092
|
const state = getState();
|
|
1086
1093
|
const stream = selectLocalMediaStream(state);
|
|
@@ -1092,6 +1099,7 @@ startAppListening({
|
|
|
1092
1099
|
audioTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.audio) || stream.getAudioTracks()[0],
|
|
1093
1100
|
videoTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.video) || stream.getVideoTracks()[0],
|
|
1094
1101
|
devices,
|
|
1102
|
+
lastVideoId: selectIsCameraEnabled(state) ? undefined : selectCurrentCameraDeviceId(state),
|
|
1095
1103
|
});
|
|
1096
1104
|
dispatch(localStreamMetadataUpdated(deviceData));
|
|
1097
1105
|
},
|
package/dist/redux/index.js
CHANGED
|
@@ -74,7 +74,7 @@ const createReactor = (selectors, callback) => {
|
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
const coreVersion = "1.31.
|
|
77
|
+
const coreVersion = "1.31.2";
|
|
78
78
|
|
|
79
79
|
function decodeRoomName(roomName) {
|
|
80
80
|
if (!roomName) {
|
|
@@ -642,6 +642,9 @@ const localMediaSlice = createSlice({
|
|
|
642
642
|
builder.addCase(doToggleCamera.fulfilled, (state) => {
|
|
643
643
|
return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
|
|
644
644
|
});
|
|
645
|
+
builder.addCase(doToggleCamera.rejected, (state) => {
|
|
646
|
+
return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
|
|
647
|
+
});
|
|
645
648
|
builder.addCase(doUpdateDeviceList.fulfilled, (state, action) => {
|
|
646
649
|
return Object.assign(Object.assign({}, state), { devices: action.payload.devices });
|
|
647
650
|
});
|
|
@@ -1056,18 +1059,22 @@ startAppListening({
|
|
|
1056
1059
|
},
|
|
1057
1060
|
});
|
|
1058
1061
|
startAppListening({
|
|
1059
|
-
predicate: (
|
|
1062
|
+
predicate: (action, currentState, previousState) => {
|
|
1063
|
+
if (!setCurrentCameraDeviceId.match(action))
|
|
1064
|
+
return false;
|
|
1060
1065
|
const oldValue = selectCurrentCameraDeviceId(previousState);
|
|
1061
1066
|
const newValue = selectCurrentCameraDeviceId(currentState);
|
|
1062
1067
|
const isReady = selectLocalMediaStatus(previousState) === "started";
|
|
1063
|
-
return isReady &&
|
|
1068
|
+
return isReady && selectIsCameraEnabled(currentState) && oldValue !== newValue;
|
|
1064
1069
|
},
|
|
1065
1070
|
effect: (_action, { dispatch }) => {
|
|
1066
1071
|
dispatch(doSetDevice({ audio: false, video: true }));
|
|
1067
1072
|
},
|
|
1068
1073
|
});
|
|
1069
1074
|
startAppListening({
|
|
1070
|
-
predicate: (
|
|
1075
|
+
predicate: (action, currentState, previousState) => {
|
|
1076
|
+
if (!setCurrentMicrophoneDeviceId.match(action))
|
|
1077
|
+
return false;
|
|
1071
1078
|
const oldValue = selectCurrentMicrophoneDeviceId(previousState);
|
|
1072
1079
|
const newValue = selectCurrentMicrophoneDeviceId(currentState);
|
|
1073
1080
|
const isReady = selectLocalMediaStatus(previousState) === "started";
|
|
@@ -1078,7 +1085,7 @@ startAppListening({
|
|
|
1078
1085
|
},
|
|
1079
1086
|
});
|
|
1080
1087
|
startAppListening({
|
|
1081
|
-
matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled),
|
|
1088
|
+
matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled, doToggleCamera.fulfilled),
|
|
1082
1089
|
effect: (_action, { dispatch, getState }) => {
|
|
1083
1090
|
const state = getState();
|
|
1084
1091
|
const stream = selectLocalMediaStream(state);
|
|
@@ -1090,6 +1097,7 @@ startAppListening({
|
|
|
1090
1097
|
audioTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.audio) || stream.getAudioTracks()[0],
|
|
1091
1098
|
videoTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.video) || stream.getVideoTracks()[0],
|
|
1092
1099
|
devices,
|
|
1100
|
+
lastVideoId: selectIsCameraEnabled(state) ? undefined : selectCurrentCameraDeviceId(state),
|
|
1093
1101
|
});
|
|
1094
1102
|
dispatch(localStreamMetadataUpdated(deviceData));
|
|
1095
1103
|
},
|
package/dist/redux/index.mjs
CHANGED
|
@@ -74,7 +74,7 @@ const createReactor = (selectors, callback) => {
|
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
const coreVersion = "1.31.
|
|
77
|
+
const coreVersion = "1.31.2";
|
|
78
78
|
|
|
79
79
|
function decodeRoomName(roomName) {
|
|
80
80
|
if (!roomName) {
|
|
@@ -642,6 +642,9 @@ const localMediaSlice = createSlice({
|
|
|
642
642
|
builder.addCase(doToggleCamera.fulfilled, (state) => {
|
|
643
643
|
return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
|
|
644
644
|
});
|
|
645
|
+
builder.addCase(doToggleCamera.rejected, (state) => {
|
|
646
|
+
return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
|
|
647
|
+
});
|
|
645
648
|
builder.addCase(doUpdateDeviceList.fulfilled, (state, action) => {
|
|
646
649
|
return Object.assign(Object.assign({}, state), { devices: action.payload.devices });
|
|
647
650
|
});
|
|
@@ -1056,18 +1059,22 @@ startAppListening({
|
|
|
1056
1059
|
},
|
|
1057
1060
|
});
|
|
1058
1061
|
startAppListening({
|
|
1059
|
-
predicate: (
|
|
1062
|
+
predicate: (action, currentState, previousState) => {
|
|
1063
|
+
if (!setCurrentCameraDeviceId.match(action))
|
|
1064
|
+
return false;
|
|
1060
1065
|
const oldValue = selectCurrentCameraDeviceId(previousState);
|
|
1061
1066
|
const newValue = selectCurrentCameraDeviceId(currentState);
|
|
1062
1067
|
const isReady = selectLocalMediaStatus(previousState) === "started";
|
|
1063
|
-
return isReady &&
|
|
1068
|
+
return isReady && selectIsCameraEnabled(currentState) && oldValue !== newValue;
|
|
1064
1069
|
},
|
|
1065
1070
|
effect: (_action, { dispatch }) => {
|
|
1066
1071
|
dispatch(doSetDevice({ audio: false, video: true }));
|
|
1067
1072
|
},
|
|
1068
1073
|
});
|
|
1069
1074
|
startAppListening({
|
|
1070
|
-
predicate: (
|
|
1075
|
+
predicate: (action, currentState, previousState) => {
|
|
1076
|
+
if (!setCurrentMicrophoneDeviceId.match(action))
|
|
1077
|
+
return false;
|
|
1071
1078
|
const oldValue = selectCurrentMicrophoneDeviceId(previousState);
|
|
1072
1079
|
const newValue = selectCurrentMicrophoneDeviceId(currentState);
|
|
1073
1080
|
const isReady = selectLocalMediaStatus(previousState) === "started";
|
|
@@ -1078,7 +1085,7 @@ startAppListening({
|
|
|
1078
1085
|
},
|
|
1079
1086
|
});
|
|
1080
1087
|
startAppListening({
|
|
1081
|
-
matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled),
|
|
1088
|
+
matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled, doToggleCamera.fulfilled),
|
|
1082
1089
|
effect: (_action, { dispatch, getState }) => {
|
|
1083
1090
|
const state = getState();
|
|
1084
1091
|
const stream = selectLocalMediaStream(state);
|
|
@@ -1090,6 +1097,7 @@ startAppListening({
|
|
|
1090
1097
|
audioTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.audio) || stream.getAudioTracks()[0],
|
|
1091
1098
|
videoTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.video) || stream.getVideoTracks()[0],
|
|
1092
1099
|
devices,
|
|
1100
|
+
lastVideoId: selectIsCameraEnabled(state) ? undefined : selectCurrentCameraDeviceId(state),
|
|
1093
1101
|
});
|
|
1094
1102
|
dispatch(localStreamMetadataUpdated(deviceData));
|
|
1095
1103
|
},
|