Reputation: 1089
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.
Upvotes: 36
Views: 17658
Reputation: 654
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.
Upvotes: 4
Reputation: 6220
I wanted to have a permanently running server-side "Robot" where public peers could connect to and test their connection (peer-to-peer vs relay). I was successful with the headless browser Puppeteer. The "Robot" uses basically the same code as the public peers. It runs on Windows and Unix and connected to the signaling and STUN/TURN server and the individual peer without any code changes.
Upvotes: 0
Reputation: 854
I think you could use a node.js server to do so. There's a npm package bringing webrtc capabilites to nodejs : node-webrtc.
Upvotes: 3
Reputation: 2730
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.
Upvotes: 14
Reputation: 3367
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.
Upvotes: 1
Reputation: 44
If I got you right that you want to make WebRTC - aka primarily browser targeted feature to be used without browser:-)
I could imagine that "emulating" the browser behaviour can be done simply by implementing the necessary api via your own code, either directly inside the rhino or similar or by actually controlling the interface that handles the media streams in native code.
Thus what has to be done is implement the WebRTC api which controls capturing the A/V from input devices and sending it to the other side. As I understood it shall be no UI node, like embedded ethernet camera with mic that servers as capture A/V in conference room.
I am affraid that it could be a piece of work as the main part is the media a connection handling.
Upvotes: -1