Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/fcerini/webrtc-test

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/fcerini/webrtc-test

  • v0.0.0-20240409192643-5705e301c3f0
  • Source
  • Go
  • Socket score

Version published
Created
Source

WebRTC Broadcast

broadcast is a Pion WebRTC application that demonstrates how to broadcast a video to many peers, while only requiring the broadcaster to upload once.

This could serve as the building block to building conferencing software, and other applications where publishers are bandwidth constrained.

Based on https://github.com/pion/webrtc/tree/master/examples/broadcast

Open broadcast example page

jsfiddle.net You should see two buttons Publish a Broadcast and Join a Broadcast

Run Broadcast

Linux/macOS

Run broadcast OR run main.go in github.com/pion/webrtc/examples/broadcast

Start a publisher

  • Click Publish a Broadcast
  • Press Copy browser SDP to clipboard or copy the Browser base64 Session Description string manually
  • Run curl localhost:8080 -d "$BROWSER_OFFER". $BROWSER_OFFER is the value you copied in the last step.
  • The broadcast terminal application will respond with an answer, paste this into the second input field in your browser.
  • Press Start Session
  • The connection state will be printed in the terminal and under logs in the browser.

Join the broadcast

  • Click Join a Broadcast
  • Copy the string in the first input labelled Browser base64 Session Description
  • Run curl localhost:8080 -d "$BROWSER_OFFER". $BROWSER_OFFER is the value you copied in the last step.
  • The broadcast terminal application will respond with an answer, paste this into the second input field in your browser.
  • Press Start Session
  • The connection state will be printed in the terminal and under logs in the browser.

You can change the listening port using -port 8011

You can Join the broadcast as many times as you want. The broadcast Golang application is relaying all traffic, so your browser only has to upload once.

Congrats, you have used Pion WebRTC! Now start building something cool

FAQs

Package last updated on 09 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc