Search code examples
javascriptnode.jswebrtc

Use Node.js as WebRTC peer - Decode frames on server


I would like to:

  1. Setup Node.js as a WebRTC peer (ex. that web browser can connect to)

  2. Decode video frames in real-time on server side (ex. streamed from browser's webcam)

What is the easiest way to accomplish this? I have seen many similar questions, but have not encountered any obvious answers.

Is this possible with just Node, or must one use a gateway such as Janus as well?

Thanks!


Solution

  • Finally, the answer was to run a Janus server alongside Node. A custom plugin was written for Janus to handle the WebRTC frames and pass them to my node server as needed.