|
@@ -838,16 +838,6 @@ export function toggleCamera() {
|
838
|
838
|
const localVideoTrack = getLocalVideoTrack(tracks)?.jitsiTrack;
|
839
|
839
|
const currentFacingMode = localVideoTrack.getCameraFacingMode();
|
840
|
840
|
const { localFlipX } = state['features/base/settings'];
|
841
|
|
-
|
842
|
|
- /**
|
843
|
|
- * FIXME: Ideally, we should be dispatching {@code replaceLocalTrack} here,
|
844
|
|
- * but it seems to not trigger the re-rendering of the local video on Chrome;
|
845
|
|
- * could be due to a plan B vs unified plan issue. Therefore, we use the legacy
|
846
|
|
- * method defined in conference.js that manually takes care of updating the local
|
847
|
|
- * video as well.
|
848
|
|
- */
|
849
|
|
- await APP.conference.useVideoStream(null);
|
850
|
|
-
|
851
|
841
|
const targetFacingMode = currentFacingMode === CAMERA_FACING_MODE.USER
|
852
|
842
|
? CAMERA_FACING_MODE.ENVIRONMENT
|
853
|
843
|
: CAMERA_FACING_MODE.USER;
|
|
@@ -857,7 +847,6 @@ export function toggleCamera() {
|
857
|
847
|
|
858
|
848
|
const newVideoTrack = await createLocalTrack('video', null, null, { facingMode: targetFacingMode });
|
859
|
849
|
|
860
|
|
- // FIXME: See above.
|
861
|
|
- await APP.conference.useVideoStream(newVideoTrack);
|
|
850
|
+ dispatch(replaceLocalTrack(localVideoTrack, newVideoTrack));
|
862
|
851
|
};
|
863
|
852
|
}
|