Unable to change camera device

Video SDK Type and Version
@zoom/videosdk 2.1.5

Description
When trying to switch camera device on mobile, it shows “Could not start video source”. Then the video element turns to black and stops working.

Error?
“Could not start video source”

How To Reproduce
Can provide small sample project in a zip file if necessary. The error happens in this function where the selectedCamera is the deviceId.

      attachLocalVideoTrack() {
        if (!this.selectedCamera) return;
        const promise = this.lvt.isVideoStarted ? this.lvt.stop() : Promise.resolve();

        promise
          .then(() => this.lvt.switchCamera(this.selectedCamera))
          .then(() => this.lvt.start(this.$refs.videoRef))
          .catch(alert);
      },

Hey @Ton

Thanks for your feedback.

Could you share the Video SDK function call behind the code snippet you provided?

Or does the lvt variable refer to localVideoTrack?

If so, there’s no need to stop the video track manually; the switchCamera method will handle it.

Thanks
Vic