Client: Switching between camera and screen capture

765 views
Skip to first unread message

Fabian Bernhard

unread,
Nov 27, 2013, 11:59:52 PM11/27/13
to eas...@googlegroups.com
Hi all,

If I read the current alpha client code correctly it can either send the camera output or the screen capture to the peers but not both at the same time. 

Is there an easy way to toggle between these two modes without closing the call and start a new one? Ideally I would like to place a control in my UI where the users can easily switch between streaming camera output and screen capture without interruption of the stream.

Thank you!

Fabian

Eric Davies

unread,
Nov 28, 2013, 2:06:26 AM11/28/13
to eas...@googlegroups.com
Hi Fabian,

When I first coded the logic, you could only have one media stream per peer connection. At some point, google fixed that; they now allow multiple media streams as long as only one mediam stream has an audio track (if I've things correctly). 

There is a lot of interest in screen sharing, and there will be more still after google improves it in 2014.That much we observed at the latest WebRTC tradeshow.

We should probably treat screen sharing as part of the larger case of multiple media streams being shared. Do you have any suggestions of what the API should look like?

Eric.

Eric Davies

unread,
Nov 28, 2013, 12:03:34 PM11/28/13
to eas...@googlegroups.com
In terms of toggling between two streams, my suggestion would be:
define two media streams, each with their own receiving video object.
during normal operation, only one of the media streams is enabled (at the source) and only it's video object is visible.
when you want to switch, you enable the other media stream, wait a long enough for the video to be flowing, then disable the previous enabled media stream, and toggle the visibilities of video objects.

It's not something I've tried.

Fabian Bernhard

unread,
Nov 28, 2013, 6:11:17 PM11/28/13
to eas...@googlegroups.com
Hi Eric,

Thank you for answering!

I have a suggestion for the API. Bear in mind though that I am not familiar with the WebRTC mindset. I have developed SIP clients for a number of years, the following comes from my experience there.

How about the easyrtc.call() function "returns" a session object in one of the callbacks? That session object would then hold functions such as "session.addVideo()", "session.removeVideo()", "session.addScreenCapture()", "session.removeScreenCapture()", etc. The session object can be extended with functions such as "session.muteAudio()", "session.unmuteAudio()", "session.muteVideo()", "session.hold()", "session.setPresenceStatus()", "session.sendMessage()", etc. Finally, it would also hold functions for "session.hangup()" or even "session.forward(othereasyrtc)". Since both clients in the call have a corresponding session objects, it would also accept callback functions such as "session.onVideoAdded(function(){})", etc.

To build support for conferencing into easyrtc, one could have an additional method called "easyrtc.conference()" which would then return an object "conferenceSession" with similar functionality. "conferenceSession" would then also allow to "conferenceSession.addSession(session)", etc, for fine control of the conference.

About your suggestion regarding how to toggle video and screen capture streams within a call: I fiddle around and report back if I find a nice solution.

Thanks again for your great support!

Fabian




Tolik

unread,
Jan 10, 2014, 9:55:50 AM1/10/14
to eas...@googlegroups.com
Hi Fabian and Eric,

Is there any progress on the screen sharing? Can you provide a simple few lines that would do this kind of the media streams toggling? Preferably with easyrtc.easyApp().


Sincerely,
Tolik

Eric Davies

unread,
Jan 10, 2014, 11:40:19 AM1/10/14
to eas...@googlegroups.com
Last I checked, Webrtc screen sharing is more of a curiosity item than anything useful at the moment. You get a giant video if you have multiple displays and most people report quality problems once it goes over a network (the lossy codec adapts by throwing out more stuff). Google says it's coming out with something better in 2014 (but no specifics) so we'll probably wait to see that first since it will likely involve API changes.  

a.c. tsai

unread,
Mar 4, 2014, 8:14:53 PM3/4/14
to eas...@googlegroups.com
Dear Fabian and Tolik,

Do you have any update in this issue, any information will be great. 

Thank you very much.
Albert

Fabian Bernhard

unread,
Mar 4, 2014, 10:06:49 PM3/4/14
to eas...@googlegroups.com
Hi Albert

I have not (yet). We have decided to postpone the screen sharing feature in our product until Google Chrome or any other browser officially supports a better solution. 

Regards,

Fabian

Tolik

unread,
Mar 5, 2014, 3:42:55 AM3/5/14
to eas...@googlegroups.com
Hi Albert,

Although there are some nice solutions for the switching on the net: https://appear.in, I solved the problem by changing the concept of screen sharing. You basically open new page (or reload this one) to have screen sharing from the new page (no video or audio). It is also a good solution. This way you can have any combination of screen, audio, video in your conference. Just have to make sure that users understand this concept.

I will post some videos about it on youtube soon.

Be warn, the solution is not right way to go with a presentation or online teaching. The quality is very degraded, even with a powerful computer and network. (something is not right there)

BZW: I already have a complete solution for a conference (video, screen, data sharing, rooms, chat, mobile) online and free to use. Just have to finish the alpha phase. If you need some solutions for presentations and so on, I will be glad to help you. I am looking for business partners with great ideas.

Greetings,
Ph.D. Anatoliy (Tolik)
Germany

nghe nguyen

unread,
Apr 14, 2014, 12:44:08 AM4/14/14
to eas...@googlegroups.com
hi Anatoliy (Tolik),!

I like your solution so much. Can you share your solution for us(youtube is a very good one)? Many thanks

Nghe
Reply all
Reply to author
Forward
0 new messages