Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
1146 Discussions

Stream added two times when only one user is streaming to one ROOM



I have an express Web Application that use Intel CS MCU server v2.0 for video conference functionality. The Web Application can be used by two different type of users: conference exhibitors and conference viewers, in dependency of the credentials provided by the logged-in user I will known who's who. In each different ROOM, can exist only one exhibitor. When a conference exhibitor is logged-in, it is redirected to the exhibitor's page, and when a viewer is logged-in, it is redirected to the viewer's page. In both of this pages an input type hidden exist, which will have the token created in server side for access an specific existing room by the logged-in user, this is used by both: exhibitors(for publish to room) and viewers(to consume the video streamed by the exhibitor, the viewers doesn't publish any video, only consume it). 

My problem is that, in the page of the exhibitor, the event "stream-added" is fired two times, one when the exhibitor click a play button for join the room, and a second time when it allows the application to access the web cam, what occur after join the room, when the local stream is published to it. I think this is an error, don't you think?.

Also, in the viewer's page, when in client side logic I call conference.join (in file viewConferenceLogic.js line number 65), and inside it, the function callback passed as parameter to file viewConferenceLogic.js line number 67) is called two times for two different streams, when in reality there are only one exhibitor streaming to the ROOM. Because of this, when I render the stream in a div in the viewer's page(how it can be viewed in my source code) I get the same video to times. And I only want to show the video of the exhibitor once.

Trying to solve my problem I check the post "How to work without mixing of streams?" posted previously And as mentioned in it, I change in the file Release-v2.0/etc/.woogeen_default the value

config.erizoController.mixer = false;

but without any luck. The stream continued to be rendered two times. I'm stopping and starting the MCU Server when the change are accomplish to the file .woogeen_default, but it is as if the MCU Server ignored it.

In the post "How to work without mixing of streams?", is mentioned to make the change in the file woogeen_config.js, but when the content of the archive CS_WebRTC_Conference_Server_MCU.v2.0.tgz is extracted to the server, the mentioned configuration file doesn't exist(It only exist when the MCU Server v1.5 is used), in v2.0 only the file .woogeen_default exist. I don't want to have to modify the code in the viewer's page to determine if the stream to subscribe to is the mixed stream for then not subscribe to it, and then not render it(as noted in the mentioned forum post it must be possible to disable mixing in config).

What I'm missing? What is the configuration file required to modify to solve this?

I provided source code with the purpose that it help to detect the problem. The file impartConferenceLogic.js is loaded in the conference exhibitor's page, and the file viewConferenceLogic.js is loaded in the conference viewer's page.

Thanks in advance one more time for your valued time and regards.

0 Kudos
2 Replies
New Contributor I

All things you described are right. But you made one mistake

you changed .woogeen_default  - it is not confn oig file - that file is used only when you init mcu first time.

You should change the same property in woogeen_config.js. And the restart server. It will remove mixing stream.

Also, If you don't want to disable mixing - you only can id one "if" to check stream before conference.subscribe. if stream.from - if it is empty - it goes mixing. If it is not empty - it goes from exact publisher


0 Kudos

Good point!

You can also use "stream.isMixed()" to decide whether the stream from MCU is mixed one, or just purely forwarded.

0 Kudos