File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ import {
3939import { startCallService , stopCallService } from './callservice/CallService' ;
4040import Toast from 'react-native-toast-message' ;
4141
42- import { LocalVideoTrack , Track } from 'livekit-client' ;
42+ import { Track } from 'livekit-client' ;
4343
4444export const RoomPage = ( {
4545 navigation,
@@ -219,13 +219,7 @@ const RoomView = ({ navigation, e2ee }: RoomViewProps) => {
219219 return ;
220220 }
221221
222- const localCameraTrack = cameraTrack . videoTrack ;
223- if ( localCameraTrack instanceof LocalVideoTrack ) {
224- localCameraTrack . restartTrack ( {
225- deviceId : newDevice . deviceId ,
226- facingMode : facingModeStr ,
227- } ) ;
228- }
222+ await room . switchActiveDevice ( 'videoinput' , newDevice . deviceId ) ;
229223 } }
230224 screenShareEnabled = { isScreenShareEnabled }
231225 setScreenShareEnabled = { ( enabled : boolean ) => {
You can’t perform that action at this time.
0 commit comments