So typically a user will be sharing his camera and screen at the same time. I followed Micael’s suggestion here and got 2 OV instances, one for the camera, the other for the screen.
For the screenshare itself, I followed the documentation from here and did exactly as instructed.
But I’m having problems.
First of the problems is, this doesn’t work in Safari.
The other problems are that, I get “StreamManager of Stream str_SCR_GlI1_con_CUfOdOcEmr (Subscriber) did not trigger “streamPlaying” event in 4000 ms” coming from the screen stream.
The last problem is when I click a button (the button does just this “document.location.href = window.location.origin;”) to go to the home screen while the screen stream is on, I get:
OpenViduLogger.js:214 TypeError: Cannot read property ‘id’ of undefined
at Stream.disposeWebRtcPeer (Stream.js:556)
at StreamEvent.callDefaultBehavior (StreamEvent.js:93)
OpenViduLogger.error @ OpenViduLogger.js:214
(anonymous) @ Session.js:974
Session.onParticipantLeft @ Session.js:973
(anonymous) @ jsonrpcclient.js:109
emit @ events.js:146
RpcBuilder.decode @ index.js:434
transportMessage @ index.js:139
Any ideas getting past these will be appreciated.