Screen sharing in a videoroom

1,490 views
Skip to first unread message

William MANCON

unread,
Mar 11, 2015, 11:22:42 AM3/11/15
to meetech...@googlegroups.com
Hi,
Just wanted to know if it is possible to use the same pluginHandle, once a videoroom has been created like in the MCU demo page, in order to share screen.
I need to "merge" the MCU demo with the screensharing demo, in order to be able in a video session to share my screen in "one click".

I tried to add the attachmediastream, create offer etc in the MCU demo, but it dosen't work for now. Do i need to create another janus "object", and attach to the videoroom plugin just for the screen stream ?

Thanks for your answers :)

WM

Lorenzo Miniero

unread,
Mar 11, 2015, 11:58:39 AM3/11/15
to meetech...@googlegroups.com
Hi,

yes, you need a separate handle for publishing the screen capture, you cannot re-use the one you're using for publishing the webcam. Unless you're not actually publishing anything, and you will only alternatively publish video and screen, that is never send them at the same time: if that's the case you can re-use the same publishing handle, but you need to unpublish the previous stream first, and so create a new PeerConnection.

No need to create a new Janus object: the session remains one, you're just creating a new handle, something you already do anyway with viewers/subscribers in addition to the publisher.

L.

William MANCON

unread,
Mar 11, 2015, 12:58:00 PM3/11/15
to meetech...@googlegroups.com
Thanks Lorenzo,

Yes I need to publish both screen and video at the same time. But i can't see how to do that without creating another janus object, and janus.attach(...) ...

WM

Lorenzo Miniero

unread,
Mar 11, 2015, 12:59:13 PM3/11/15
to meetech...@googlegroups.com
Just do another attach on the object you already have, it will result in a new handle.

L.

William MANCON

unread,
Mar 11, 2015, 2:10:49 PM3/11/15
to meetech...@googlegroups.com
Okay ! I'm on it, Thanks again :)
Message has been deleted

William MANCON

unread,
Mar 11, 2015, 5:25:26 PM3/11/15
to meetech...@googlegroups.com
It works perfectly !
Another question about the framerate. I saw the constraints mechanisme in janus.js, but i'm not able to manipulate the framerate (I can modify the screen resolution). I added "minFrameRate:" but it seems to be ignored ?
Do someone know something about that ? I'm sure it is not a CPU or bandwidth limit and i'm using chrome (the up-to-date or old version, same result).

William MANCON

unread,
Mar 12, 2015, 7:58:58 AM3/12/15
to meetech...@googlegroups.com
ok, the minFrameRate constraint is working perfectly, in the case you share just a window, even if this window is in full screen (1440x...). But in the case you share the whole screen, it is very hard to get more than 5-7 fps. I think it is related to the capture process (very slow for the whole screen).

Thanks again for your answers :)
WM

Lorenzo Miniero

unread,
Mar 12, 2015, 8:45:06 AM3/12/15
to meetech...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages