@roadzen/videostream-web

0.0.3 • Public • Published

videostream-web

NPM JavaScript Style Guide

Install

npm install --save @roadzen/videostream-web

Usage

Add the following to your index.html Div tag to mount the videostream modal <div id="video-root"></div>

Script tag to include webrtc adapter <script src="https://webrtc.github.io/adapter/adapter-latest.js" crossorigin="anonymous"></script>

Import and include the component in your component Example.jsx

import React, { Component } from 'react'

import VideoStream from '@roadzen/videostream-web'

class Example extends Component {
  state = {
    openModal: false,
  }

  render () {
    return (
      <VideoStream
        token='xxxxx'
        isModalOpen={openModal}
        handleToggleModal={(value) => this.setState({ openModal: value })}
        socketURL='xxxxx'
        apiURL='xxxxx'
        turnServerDetails={{
          url:'xxxxx',
          username:'xxxxx',
          credential:'xxxxx',
        }}
      />
    )
  }
}

License

MIT © iamsaksham

Package Sidebar

Install

npm i @roadzen/videostream-web

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

1.73 MB

Total Files

6

Last publish

Collaborators

  • roadzen-tech
  • prakhar-saxena
  • abg676
  • roadzen-admin
  • iamsaksham
  • mayank2103
  • nikhilkbansal