Problem when switching to screen share second time

Azhar Ali

Member
Hi,
I am having following issues:
1) If you start the stream using camera and and switch to screen using the switchToScreen('screen') function, it works. If user decides to change and share a different screen, calling switchToScreen('screen') does not allow to pick another screen.

2) If you start the stream using screen share, it works. If user decides to change and share a different screen, calling switchToScreen('screen') does not allow to pick another screen. This time it gives an error on the frameRate.max is undefined inside getScreenDeviceId function.
Any workaround for this or fix?

Regards
Azhar
 

Max

Administrator
Staff member
Hello.
To choose a different screen when you already started a screen sharing stream you should stop this stream and create a new one.
Note that browser will request you to choose a screen when you switch to different screen so this is another device from browsers point.
 

Azhar Ali

Member
To choose a different screen when you already started a screen sharing stream you should stop this stream and create a new one.
I don't think its correct to suggest you have to close the stream and start again, you don't have to do that when you start the stream with camera and switch to screen and switch back to camera and then switch again to screen. Looking at the source code its clearly a bug.

You suggestion to close stream and start again will cause other issues like recordings will be not in one file and viewers will also see blank screen until its reconnects etc

When constraints are cloned, here. It does not use the same format and JSON is different to what original constraints were set, hence the JS error. It brings the video.mandatory section where the frame rate is set. Error occurs on line

Note that browser will request you to choose a screen when you switch to different screen so this is another device from browsers point.
This is completely acceptable behaviour and should be like that.
 

Max

Administrator
Staff member
Hello.
You can switch from camera to screen anb back again. But you can not switch from one screen to another screen bypassing camera stream. call flow should be switchToScreen -> switchToCam -> switchToScreen.
If you want to bypass switchToCam, the only choice is to restart the stream.
 

Azhar Ali

Member
When constraints are cloned, here. It does not use the same format and JSON is different to what original constraints were set, hence the JS error. It brings the video.mandatory section where the frame rate is set. Error occurs on line
Hi Max,

Could please check why the constraints aren't the same when they are cloned? It seems thats the only problem with switch screens and if that can be added to the roadmap to fix in future versions.
 

Max

Administrator
Staff member
Internal ticket WCS-1837 has been created for the issue. Will inform in the thread when there is an update.
 
Top