These are chat archives for andyet/SimpleWebRTC

1st
Mar 2017
Mat
@mateuszMad_twitter
Mar 01 2017 16:52
I was problem with no https connection with chrome
it*
LuckyCyborg
@LuckyCyborg
Mar 01 2017 16:53
HTTPS is a must, man! For Gods sake!
Mat
@mateuszMad_twitter
Mar 01 2017 16:58
but now I have problem with leave room and reconnect, I don't join to room, I have my video but I don't see remote video
I run:
if (webrtc !== null) {
webrtc.stopLocalVideo();
webrtc.leaveRoom();
}
and second time i don't see remote video
I've tried:
webrtc = new SimpleWebRTC(
{signalingOptions: { 'force new connection' : true },
localVideoEl: 'localVideo',
remoteVideosEl: 'remotesVideos',
autoRequestMedia: true
});
but this doesn't help
how to reconnect?
LuckyCyborg
@LuckyCyborg
Mar 01 2017 17:06

how to reconnect?

Gods know...

I'm a novice in this noble art. :D

Coding Mikesh
@amytilly
Mar 01 2017 18:57

@mateuszMad_twitter

var webrtc = new SimpleWebRTC({
    localVideo: 'localVideo',
    remoteVideosEl: 'remotesVideos',
    autoRequestMedia: false,
    media: {
        video: true,
        audio: true
    },
    url: 'your signal server'
})

// then start your local Video
webrtc.startLocalVideo();

// and join a room
webrtc.joinRoom('your room 1', function(err, message) {
    if(!error) {
        console.log(message);
    } else {
        console.log(err);
    }
}

// to leave the room
webrtc.leaveRoom();

// to join another room or the same room
webrtc.joinRoom('your room x', function ........

It's very interessting to see, what happens, when you don't start the local video and only join a room where peers exists. You can see the videos from the other peers, but your video is not shown.
And the videoAdded event is not called by the other peers, it looks like a broadcast :-)