muaz-khan / RTCMultiConnection

RTCMultiConnection is a WebRTC JavaScript library for peer-to-peer applications (screen sharing, audio/video conferencing, file sharing, media streaming etc.)
https://muazkhan.com:9001/
MIT License
2.56k stars 1.37k forks source link

Stop screen sharing #47

Open Almarane opened 9 years ago

Almarane commented 9 years ago

Hi. I'm working on a webchat with screen sharing, but I have some problems with your API. I am using v2.2.2

When the user enters the chatroom, they have their camera and micro activated. But they can click on a button "share-screen" in order to share their screen. When they want to stop sharing, or change the screen shared, they have to click "share-screen" again. But this have to stop ONLY this user's screen stream. The shared screen is displayed on a div created when "onstream" is fired. I'd like to make the div disappear when "onstreamended" is fired.

Unfortunately, "onstreamended" is not fired when I use the ".stop()" function.

Could you please help me ?

Almarane commented 9 years ago

Since renegociation seems to not work on my program, is it possible to disable Chrome's Screen Sharing extension automatically when someone click on a button ?