Skip to content
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

Limited number of Connections with firebase #47

Open
rmrinmoy opened this issue Jun 12, 2013 · 13 comments
Open

Limited number of Connections with firebase #47

rmrinmoy opened this issue Jun 12, 2013 · 13 comments

Comments

@rmrinmoy
Copy link

Can we host whatever you hosted on "https://webrtc-experiment.firebaseio.com/" in our own server to get rid of the limitation. I am new to Git and novice in WebRTC. Please help!

@muaz-khan
Copy link
Owner

Sure; you can host any experiment on your own web server.

However, only these two requires a node.js server:

  1. Socket.io over Node.js
  2. WebSocket over Node.js

All experiments are HTML/JS based; so just copy/paste and done!

@rmrinmoy
Copy link
Author

The Node.js server will only establish connection or will it handle the streaming of the videos too? I want develop something that doesn't involve any server for video streaming. Just peer to peer video conferencing. I know a server is must to establish a connection. What happens after that? Does that play any role in the actual conferencing?

@VGubarev
Copy link

Rmrinmoy, node.js only establish connection

@muaz-khan
Copy link
Owner

The Node.js server will only establish connection or will it handle the streaming of the videos too?

Only connection.

I want develop something that doesn't involve any server for video streaming. Just peer to peer video conferencing. I know a server is must to establish a connection. What happens after that?

In Offer/Answer model; a signaling gateway is mandatory however signaling server is not. Signaling can be done by copy/paste.

Does that play any role in the actual conferencing?

Node.js is good client for instant messaging. That's why it can be used for signaling too.

What signaling really is? — Just an exchange of session descriptions required for initial handshake.

You can use Node.js to share custom activities of the participants e.g.

  1. If someone leaves the room
  2. If someone mutes the audio/video
  3. If someone willing to share the screen i.e. renegotiation process

Etc.

@rmrinmoy
Copy link
Author

Thank you very much for your help.

@sunil28
Copy link

sunil28 commented Jul 1, 2013

Hi sir,

you have said that firebase used for signaling purpose , could you please define how to set data in firebase how actually we can use that firebase

@muaz-khan
Copy link
Owner

First of all, link firebase.js:

<script src="https://webrtc-experiment.appspot.com/firebase.js"></script>

Then start using it:

// unique for your site; however, it is optional.
var channel = 'abcdef';

// "chat" is PUBLIC firebase instance
var firebase = new Firebase('https://chat.firebaseio.com/' + channel);

// fired for each new message pushed over firebase servers
socket.on('child_added', function (snap) {
    data = snap.val();
    alert('this is your ' + data);
});

// push your own message; it never overwrites old data
firebase.push('watever');

// or overwrite existing messages
firebase.set('overwrite');

Firebase documentation available here: https://www.firebase.com/docs/javascript/firebase/index.html

@vidyadudhani
Copy link

Hello sir,
can u explain me
var firebase = new Firebase('https://chat.firebaseio.com/' + channel);

what this above line do actually...?

@muaz-khan
Copy link
Owner

  1. http://www.rtcmulticonnection.org/FAQ/
  2. https://www.webrtc-experiment.com/docs/WebRTC-Signaling-Concepts.html
  3. http://www.rtcmulticonnection.org/docs/sessionid/
  4. http://www.rtcmulticonnection.org/docs/channel-id/
  5. http://stackoverflow.com/questions/13504320/socket-io-namespaces-channels-co

It means that data transmitted/exchanged over this channel will be received only by the user using same channel. It gives us private environment that can be used to exchange sdp/ice privately between users.

Unique-channels concept allows us setup private text-chatting rooms as well.

var firebase1 = new Firebase('https://chat.firebaseio.com/channel-unique-id-1');
var firebase2 = new Firebase('https://chat.firebaseio.com/channel-unique-id-2');
var firebase3 = new Firebase('https://chat.firebaseio.com/channel-unique-id-3');

All these three firebase instances are referencing to unique session on Firebase servers; data transmitted over one channel can't be received on other.

@vivekbheda
Copy link

Hello Sir,
i copied file "http://www.rtcmulticonnection.org/latest.js" and "firebase.js" and putted in my local pc now when i try to run following example it generates errors
Example ::

<title>RTC</title> <script src="http://www.rtcmulticonnection.org/latest.js"></script>

Open New Room

<script> var connection = new RTCMultiConnection().connect(); document.getElementById('openNewSessionButton').onclick = function() { connection.open(); }; </script>

ERROR:-

edia hints: {
"audio": true,
"video": {
"mandatory": {
"minWidth": 640,
"minHeight": 360,
"maxWidth": 1280,
"maxHeight": 720,
"minAspectRatio": 1.77
},
"optional": []
}
} latest.js:2458
{
"constraintName": "",
"message": "",
"name": "PermissionDeniedError"
} latest.js:3612
connection.onMediaError latest.js:3612
_captureUserMedia.mediaConfig.onerror latest.js:398
Maybe microphone access is denied. latest.js:3612
Maybe webcam access is denied. latest.js:3612
WebSocket connection to 'wss://s-dal5-nss-16.firebaseio.com/.ws?v=5&ns=rtcweb&s=cKTcywdDFPrZoH12zYTvnNLCwrubscUH' failed: WebSocket is closed before the connection is established. firebase.js:48

Sir please help me to overcome with this

@muaz-khan
Copy link
Owner

Either another application is using your webcam (maybe Firefox) or you accidentally clicked "Deny" button. You should go to this page: chrome://settings/contentExceptions#media-stream and search for your locahost. Both audio and video MUST be Allow in the list.

@oihi08
Copy link

oihi08 commented Jun 24, 2015

Sir, we can use your firebase for all connection? I would like to implement in my project but I do not sure if it is possible.

Thank you

@rash143
Copy link

rash143 commented Feb 23, 2017

I am using RTCMulticonnection for audio video broadcasting and created custom account with xirsys and used own credentials for stun and turn connection and firebase.io for signalling. However, Xirsys states that it provides signalling server for webrtc so my concern is that how could we eliminate firebase io and use xirsys signalling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants