muaz-khan / WebRTC-Experiment

WebRTC, WebRTC and WebRTC. Everything here is all about WebRTC!!
https://www.webrtc-experiment.com/
MIT License
11.77k stars 3.95k forks source link

Doing things without using firebase ... #459

Open sayjeyhi opened 8 years ago

sayjeyhi commented 8 years ago

hello every one ,

I am working on a project , and we need to use WebRTC to vedio confrence , record vedio , and desktop sharing .

openSocket: function(config) {
        // https://github.com/muaz-khan/WebRTC-Experiment/blob/master/Signaling.md
        // This method "openSocket" can be defined in HTML page
        // to use any signaling gateway either XHR-Long-Polling or SIP/XMPP or WebSockets/Socket.io
        // or WebSync/SignalR or existing implementations like signalmaster/peerserver or sockjs etc.

        var channel = config.channel || location.href.replace( /\/|:|#|%|\.|\[|\]/g , '');
        var socket = new Firebase('https://webrtc.firebaseIO.com/' + channel);
        socket.channel = channel;
        socket.on('child_added', function(data) {
            config.onmessage(data.val());
        });
        socket.send = function(data) {
            this.push(data);
        };
        config.onopen && setTimeout(config.onopen, 1);
        socket.onDisconnect().remove();
        return socket;
    }

I realized that this project use fireBase.js to create socket . can I use this project with my own server socket ?

sayjeyhi commented 7 years ago

fireBase is not allowed in Iran and I can not use it . (Should use anti filter ) how can I use this with out firebase...

javadmohammadis commented 7 years ago

سلام شما تونستید این مشکل رو حل کنید؟