Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a webRTC peer *without* a browser, with just a JavaScript interpreter

I want to create a WebRTC peer that's a simple listener/recorder with no "presentation" component (i.e., no HTML/CSS).

If this is possible, (with the WebRTC JavaScript APIs), please tell me what standalone JavaScript engine I can use (I'm thinking of installing a standalone V8 engine).

Thank you.

like image 577
auro Avatar asked May 07 '13 22:05

auro


People also ask

How does WebRTC peer-to-peer work?

In webRTC, communication happens to be in P2P connection, rather than the client-server connection. The connection is equally distributed among the two communicating agents through their transport addresses.

Does WebRTC use JavaScript?

WebRTC uses JavaScript, APIs and Hypertext Markup Language to embed communications technologies within web browsers. It is designed to make audio, video and data communication between browsers user-friendly and easy to implement. WebRTC works with most major web browsers.

Can I use WebRTC without browser?

If you want to create any webrtc -based client application without using a browser , the native libraries are the way to go. No silly standalone javascript engine necessary.

Is WebRTC only peer-to-peer?

WebRTC is designed to work peer-to-peer, so users can connect by the most direct route possible. However, WebRTC is built to cope with real-world networking: client applications need to traverse NAT gateways and firewalls, and peer to peer networking needs fallbacks in case direct connection fails.


4 Answers

Very late answer, but I think it's good to re-evaluate this question, because a lot has changed since this question was asked.

I assume this question was asked because there was no native support for webrtc yet at the time. But there is now. Android, iOS, Windows, Linux and OSX all support native webrtc libraries now.

The native libraries can be used to create a peerconnection and setup a stream to another client (cross-platform). If you want to create any webrtc-based client application without using a browser, the native libraries are the way to go. No silly standalone javascript engine necessary.

Read more here

like image 77
Kevin Avatar answered Sep 22 '22 10:09

Kevin


I think you could use a node.js server to do so. There's a npm package bringing webrtc capabilites to nodejs : node-webrtc.

like image 30
Hugo Avatar answered Sep 19 '22 10:09

Hugo


You could do this with headless chrome. Chrome of course has full WebRTC support, but can be started in "headless" mode, and then interacted with via the command line or their control interface.

like image 42
Eric Hanson Avatar answered Sep 22 '22 10:09

Eric Hanson


The best way to do this right now is to create a node-webkit application. The unified node + browser context gives you the best of all worlds.

like image 29
ZECTBynmo Avatar answered Sep 19 '22 10:09

ZECTBynmo