Skip to content

tech-dojo/react-simplewebrtc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React webRTC component built with SimpleWebRTC

The webRTC component takes a roomname for the room to join and the signal server url.

  1. Include the script "https://simplewebrtc.com/latest-v2.js" in the header of the html
  2. Put the webRTC component in the render function
  3. Pass options = {infoObject} as props

Example Use Case


import WebRtc from 'react-simplewebrtc';

class WebRtcDemo extends React.Component {

  constructor(props) {
    super(props);
  }

  render() {
      var infoObject = {
        roomname : "test33333",
        /*provide a valid url for signalmaster otherwise this won't work*/
        signalmasterUrl : "www.example.com"
      }
      return (
            < div >
              <WebRtc options = {infoObject}/>
            </div>
      );
  };
}

Jsfiddle example https://jsfiddle.net/shoque/7jwg7etm/

About

React webRTC component built with SimpleWebRTC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published