OpenVidu Switch Camera Implementation

Hi all,

I am implementing openvidu switch camera feature with the help of Switch Camera

I have implemented the code in the following way:
OV.getDevices().then(devices => {
let videoDevices = devices.filter(device => device.kind === ‘videoinput’);
if(this.videoDeviceId == 0 || this.videoDeviceId < videoDevices.length){
this.videoDeviceId = this.videoDeviceId + 1;
}
else {
this.videoDeviceId = 0;
}

				var newPublisher = OV.initPublisher('video-StreamId', {
					videoSource: videoDevices[this.videoDeviceId].deviceId,
					publishAudio: true,
					publishVideo: true, 
				});
				this.session.unpublish(this.publisher);
	
				// Assigning the new publisher to our global variable 'publisher'
				this.publisher = newPublisher;
	
				// Publishing the new publisher
				this.session.publish(this.publisher);
                           });

The video is not shown on the side I am switching the camera but able to see it on the remote user’s end.

Need help in this.Thanks in advance
@CSantosM