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

simplewebrtc

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simplewebrtc

World's easiest webrtc

  • 0.7.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
301
decreased by-21.61%
Maintainers
1
Weekly downloads
 
Created
Source

SimpleWebRTC - World's easiest WebRTC lib

Check out the demo: https://talky.io

It's so easy:

1. Some basic html

<!DOCTYPE html>
<html>
    <head>
        <script src="http://simplewebrtc.com/latest.js"></script> 
    </head>
    <body>
        <div id="localVideo"></div>
        <div id="remotesVideos"></div>
    </body>
</html>

1. Create our WebRTC object

var webrtc = new WebRTC({
    // the id/element dom element that will hold "our" video
    localVideoEl: 'localVideo',
    // the id/element dom element that will hold remote videos
    remoteVideosEl: 'remotesVideos',
    // immediately ask for camera access
    autoRequestMedia: true
});

2. Tell it to join a room when ready

// we have to wait until it's ready
webrtc.on('readyToCall', function () {
    // you can name it anything
    webrtc.joinRoom('your awesome room name');
});

Available Options

peerConnectionConfig - Set this to specify your own STUN and TURN servers. SimpleWebRTC uses Google's public STUN server by default: stun.l.google.com:19302. It's intended for public use according to: https://twitter.com/HenrikJoreteg/status/354105684591251456

FAQs

Package last updated on 02 Aug 2013

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