Can't change camera before publishing with getMediaAccess()

Michael

Member
Hello,

We recently started receiving complaints from our publishers that they can't switch cameras before starting the publish stream.

We noticed that when the stream is publishing, the stream.switchCam(deviceId) method works normally.

However, we give publishers the option to configure the stream and select the camera and microphone before starting the stream. In this case, we perform the switch with the Flashphoner.getMediaDevices() method.

We see in the JavaScript console logs that the constraints change with the deviceId of the selected camera, but the local video doesn't update with the selected camera.

I couldn't find a good example of this issue in the Flashphoner demo, but I was able to reproduce the problem in the Media Devices example.

I clicked in the "Test" button, and my local video is displayed before connecting to the server and publishing as expected. I can see my two cam options and current constraints with UVC Camera device ID in the console:
Screenshot from 2025-09-18 12-56-52.png


Then I click in the "Release" button, select the other camera from the menu, and click "Test" again. I see the constraints changing in the console, with the device ID of the other camera, but the local video continues to display the same one:
Screenshot from 2025-09-18 12-57-32.png


I don't remember seeing this issue before, so I'm guessing some Chrome update caused this issue.

I've had complaints about Chrome on Windows. In the test I sent screenshots above, it was reproduced on a Linux Ubuntu 24 and Google Chrome 140.

We're using WebSDK 2.0.258.

Any tips?

Regards
 
Top