Rooms and screensharing easyrtc

368 views
Skip to first unread message

nelson gomez

unread,
Jun 30, 2015, 1:20:55 PM6/30/15
to eas...@googlegroups.com
Good afternoon everyone, I hope you can guide me.

Currently through this demo "demo_instant_messaging_rooms.html" I can do in specific chat rooms. "VERY GOOD" :)

Modalida I want to use desktop sharing, but not how to do that for rooms in specific, that is, for example:

Living Room 1:
It has 4 students here and only desktop is shared those 4 see what is being shared.

Salon 2:
It has 2 students, here desktop sharing and only those 2 see what is being shared.

Nothing can be linked.

As I can do that? Can guide me please?
He says goodbye,

Nelson

---------------------------------------------------------------------------

Muy buenas tardes a todos, espero puedan orientarme.

Actualmente a traves de esta demo "demo_instant_messaging_rooms.html" puedo hacer chat en salones en especifico. "MUY BIEN" :)

Quiero utilizar la modalida de compartir escritorio, pero no se como hacer eso para salones en especifico, es decir, por ejemplo:

Salon 1:
Tiene 4 alumnos, aqui se comparte escritorio y solo esos 4 ven lo que se esta compartiendo.

Salon 2:
Tiene 2 alumnos, aqui se comparte escritorio y solo esos 2 ven lo que se esta compartiendo.

Nada se puede ligar.

Como puedo hacer eso? Me pueden orientar por favor?
Se despide,

Nelson

Eric Davies

unread,
Jun 30, 2015, 2:10:19 PM6/30/15
to eas...@googlegroups.com
Rooms are really about discovery of other people's easyrtcids.
Desktop sharing is about getting a local media stream for your desktop sharing.
Once you have those, it's just a matter of calling the desired people with the local media stream for your desktop.

nelson gomez

unread,
Jun 30, 2015, 3:02:28 PM6/30/15
to eas...@googlegroups.com
Eric, thank you very much for your answer.
Eric, really am new to easyrtc and WebRTC, I've been reading a lot of easyrtc.

Can you please oruientarme more about your answers.

*Rooms are really about discovery of other people's easyrtcids.
*Desktop sharing is about getting a local media stream for your desktop sharing.
*Once you have those, it's just a matter of calling the desired people with the local media stream for your desktop.

Some example?

Sorry, I really am new to this, but as far as I have read, easyrtc, it helps to achieve what you want.

nelson gomez

unread,
Jul 1, 2015, 10:34:50 AM7/1/15
to eas...@googlegroups.com
Eric, good morning, sorry for the inconvenience.
Can you please tell me or guide me how I can do this that you explain me.

*Rooms are really about discovery of other people's easyrtcids.
*Desktop sharing is about getting a local media stream for your desktop sharing.
*Once you have those, it's just a matter of calling the desired people with the local media stream for your desktop.

Waiting for your valuable response please.
I thank you,
Nelson Gomez

Eric Davies

unread,
Jul 2, 2015, 1:18:07 AM7/2/15
to eas...@googlegroups.com
1) In order to initiate a p2p dialog with another client, you need to know the client's easyrtcid. How do you find that id? You join the same room as the other client so that when your room occupant listener gets a list of the occupants of that room, the other guy is in that list. If you don't explicitly join a room before connecting to the server, you are in room "default".
2&3) See the code for the multistream calls demo. 

Chrome requires that you install a screensharing extension for the site before screensharing works. It also requires that the site be hosted https. Google requires this for reasons of security, but it's still a pain in the butt. The extension we supply in the  api/labs directory is Muaz Khan's (might be slightly modified). See Muaz Khan's instructions for setting up the extension loader. https://www.webrtc-experiment.com/screen-sharing/


nelson gomez

unread,
Jul 2, 2015, 7:42:25 PM7/2/15
to eas...@googlegroups.com
Eric, thank you very much for your answers, I tell you:

1) In order to initiate a p2p dialog with another client, you need to know the client's easyrtcid. How do you find that id? You join the same room as the other client so that when your room occupant listener gets a list of the occupants of that room, the other guy is in that list. If you don't explicitly join a room before connecting to the server, you are in room "default".
2&3) See the code for the multistream calls demo.

R = currently writing a name room, in fact I do it as follows:

In terms of code, I use a function in javascript to capture the value of the parameter example: "demoroom" to thereby use it as a room.
Easyrtc learning of how to get the easyrtcid, for example in the function "function addToConversation (who, MsgType, content, targeting) {"
I get it with:

targeting.targetEasyrtcid or easyrtc.targetEasyrtcid

* And now?
* What could be next?
* Level some example code to get carried away?

Chrome requires that you install a screensharing extension for the site before screensharing works. It also requires that the site be hosted https. Google requires this for reasons of security, but it's still a pain in the butt. The extension we supply in the  api/labs directory is Muaz Khan's (might be slightly modified). See Muaz Khan's instructions for setting up the extension loader. https://www.webrtc-experiment.com/screen-sharing/

R= I have installed the extension desktop sharing (share desktop!) And am currently running the demo on a domain that is under https.

Note: The Truth Eric excuse me, I'm a little lost, help for code level where I start

I appreciate your further collaboration...

Regards
Nelson

Eric Davies

unread,
Jul 3, 2015, 10:35:28 AM7/3/15
to eas...@googlegroups.com
You can take a look at the demos directory that comes with easyrtc, either in your own distribution, or on the site demos.easyrtc.com .
Beyond that, I don't have much to suggest unless you have very specific questions related to easyrtc. 

nelson gomez

unread,
Jul 3, 2015, 7:06:14 PM7/3/15
to eas...@googlegroups.com
Eric thanks so much for your answers.

I want to be well focused and located.

Eric with this url "https://...../demos/demo_multistream_iframe.html"

I can make users in different rooms, you can see differently each shared desktop?

So whether up by another computer the same page, https://.... /demo_multistream_iframe.html" and another user desktop share those users, everyone will see it differently?

Waiting for your valuable response.

Nelson

Eric Davies

unread,
Jul 4, 2015, 12:09:39 PM7/4/15
to eas...@googlegroups.com
I'll try to be very clear about this.

Peer 2 Peer connections are established by one client making a call (invoking easyrtc.call) and the other client accepting the call. You could have 50 people in the same room and client X in that room would not be receiving client Y's video if client X hadn't called client Y and person Y hadn't called client X. No call, no video sharing. It's that simple.

By default, if you call somebody, or accept a call, you will implicit share a local media stream named "default". However,  easyrtc.call takes an optional 5th argument, which is an array of the names of local media streams. If this argument is an array of length 0, you won't send any media streams. If the client has defined media streams named "xx", "yy', "zz" and uses ["xx","yy", "zz"] as the fifth argument, then the call will share those media streams.

On the other side of the call your accept checker function gets passed an acceptor function when your client receives a call. The second argument to the acceptor function is an array of names of local media streams with the same behaviour.

There is also a facility to add media streams to an existing call.

In short, clients have complete control over what media streams these choose to share.

The demo_multistream_iframe.html demo demonstrates how to use this functionality.

This only works in Chrome currently.

Before asking any more questions, give it a try and examine the source code.


nelson gomez

unread,
Jul 6, 2015, 2:07:12 AM7/6/15
to eas...@googlegroups.com
Good morning Eric, thank you very much for your answer.
Excellent, your explanation helped me 100% to what I had imagined to do. (room + chat + comparitr desktop). Your orientation has led me to do.

I have 2 questions:

1. How do I make when sharing desktop, attendees in the room listen achieve what the primary user is speaking (microphone).?

2. what are the limitations of easyrtc when the application is in production?

Waiting for your valuable response,

Nelson

Eric Davies

unread,
Jul 6, 2015, 10:20:31 AM7/6/15
to eas...@googlegroups.com
1) Your question is not understandable. Suggest you get a native english speaker to translate it for you.
2) Limitations of Easyrtc
   don't have more than 50 people in a room
   its full mesh networking so every additional person you share your media to means extra bandwidth consumed. You'll have to experiment to see how many you can support.
   poor quality networks will result in a poor experience (dropped connections, freezes, etc)
   some networks are blocked beyond reachability.

Message has been deleted

nelson gomez

unread,
Jul 9, 2015, 2:57:24 PM7/9/15
to eas...@googlegroups.com
Good afternoon Eric hope you are fine.

Eric, I need your help or guidance.

I am using this demo "https://midominio.com:3000/demos/demo_multistream_iframe.html" in my project but has a strange behavior:

When local and remote trigger your cameras and starts running around, there is great intereferncia nuna, extremely bad noise, which does not allow for good communication when talking.

As I can fix that?

Eric Davies

unread,
Jul 9, 2015, 7:45:47 PM7/9/15
to eas...@googlegroups.com
I'm guessing that you are running two or more instances of the app in the same physical room. Two browser tabs or two computers. The solution is simple: mute your speakers or don't run two instances close physical proximity.

If you run two instances in close proximity, the sound from instance gets picked by the other instance and you get a feedback loop. WebRTC does have echo cancellation, but that only applies to the sound emitted by one stance being picked up by itself. 

When we test applications, we tend to have our speakers muted for that reason.

nelson gomez

unread,
Jul 9, 2015, 8:00:02 PM7/9/15
to eas...@googlegroups.com
Eric, good evening, thank you very much for responding.

Eric, I'm not using 2 tabs on the same computer, or roughly devices.

Eric, the proof that I'm doing at the moment is through this demo:

My scenario is as follows:
1. I have my webcam connected to my laptop, the webcam is built into the microphone when the asset begins the strange noise.

2. I have my Android phone, enter the same demo, but when active the front camera phone, start the noise.

-------------------

I try the demo with the same devices:
And it works perfectly, no noise.

Eric Davies

unread,
Jul 9, 2015, 8:51:33 PM7/9/15
to eas...@googlegroups.com
Ahh. A useful point.

When you write a webrtc app, if you display a local media stream in a video object, you always want to mute that video object. Most of the demo apps do this (the easyapp function does this automatically for the self video) or again you'll get feedback squask, but the multistream demo wasn't. I've just pushed some changes to the beta branch that fix this.

Eric.

nelson gomez

unread,
Jul 9, 2015, 8:56:51 PM7/9/15
to eas...@googlegroups.com
Understand Eric. very good...

Eric, what should I do to fix the problem?
I edit or add code?
Reply all
Reply to author
Forward
0 new messages