-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close/leave room #131
Comments
try webrtc.leaveRoom(); |
webrtc.leaveRoom() just disconnects the remote video. Is there a way to stop the localVideoStream. It seems like leaveRoom should do it but the code that calls stopScreenShare doesn't work. Any suggestions? |
I'm currently using the following code to achieve that. function hangUp() {
webrtc.stopLocalVideo();
webrtc.leaveRoom();
} |
how can i make a specific viewer to leave a room ? |
If I use the 'basic' SimpleWebRTC example I cannot work out how to 'leave/disconnect' from a room. My 'needs' are actually very simple the room is actually the page automatically e.g. the page has an automatic session variable rather than page.html#abc or page.html?id=abc - so from what I see/understand (newbie here ;)) (and to suit my purposes) the 'basic' code should surfice, however, I don't want the video to auto start and or auto request permission. I want that from a button 'Start Video' - get that to work, but then I cannot close/leave the room. (p.s. not very good with JS) - simple code: looks like (know cannot) what I cannot do is access webrtc inside closeVideo, but cannot fathom a way to get webrtc from startVideo() to closeVideo()
HTML
Start Video
Stop Video
JS
function startVideo(){
var webrtc = new SimpleWebRTC({
localVideoEl: 'localVideo',
remoteVideosEl: 'remoteVideos',
autoRequestMedia: false
});
webrtc.once('readyToCall', function () {
webrtc.joinRoom('your awesome room name');
});
}
function closeVideo(){
webrtc.connection.disconnect();
}
The text was updated successfully, but these errors were encountered: