EricssonResearch / openwebrtc-examples

Examples apps showing how to use OpenWebRTC
BSD 2-Clause "Simplified" License
336 stars 209 forks source link

Question regarding Channel_Server.js #98

Open dranz3r opened 9 years ago

dranz3r commented 9 years ago

I'm working on implementing openwebRTC in an android app and I'm using a Tomcat server instead of node js for connections and everything else for the app. Is it possible to implement channel_server.js on Tomcat instead of node.js and still get the same results? I'm pretty new to all this and just want to know if it is even worth a try. Any suggestions are welcome. Thanks!

It is highly possible that I'm not really sure what I'm asking...and hence any ideas on actually completing the question itself would be welcome.

Basially, I'm trying to implement an app that will be able to connect two android phones and have a video session going by using a Tomcat server for implementing the same signalling concept that is being implemented by channel_Server.js. But I want to utilize the openwebRTC jar files that have been included in the releases for android to actually build the app. So no changes to the jar files themselves but a completely different server side code on a different server than node js. Does this make sense? Again, I've been up for quite a bit thinking about this. :-/

dranz3r commented 9 years ago

@superdump @PerBoussard you know what they say: "help someone once...they'll come back to you again". :)

stefanalund commented 9 years ago

The signalling is completely separate from the OpenWebRTC code and jar. I would recommend looking at our Native Android example. Your Tomcat server should pass the messages between the 2 clients. Our server uses HTTP and EventSource, but other mechanisms are possible, such as HTTP long polling. The important thing is that the server has an open connection with both clients. I hope this helps.

dranz3r commented 9 years ago

@stefanalund I think I got it. Previously, I was looking at it from a perspective that accessing the camera resources and generating data to be sent over network and the action of sending it over the network are all done by the same openwebRTC libraries...but sending it over the network is separate and any other mechanism, including HTTP long polling, websockets, etc, can be utilized for that. Correct?

dranz3r commented 9 years ago

and when I say sending it over the network, I mean the entire concept of signalling, establishing a connection b/w two clients and the server dropping off of that connection once the clients are connected.

stefanalund commented 9 years ago

Yes. You need a server for sending the initial messages (setup) but after that, OpenWebRTC handles both ICE and delivery of audio/video data.

This article goes in to the details: http://www.html5rocks.com/en/tutorials/webrtc/infrastructure/

dranz3r commented 9 years ago

That article. Wow! Thanks much!!