Socket
Socket
Sign inDemoInstall

wowza-webrtc-client-react

Package Overview
Dependencies
2
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    wowza-webrtc-client-react

WoWza WebRTC Player/Client (React Component).


Version published
Weekly downloads
154
increased by196.15%
Maintainers
1
Install size
1.53 MB
Created
Weekly downloads
 

Readme

Source

WoWZA WebRTC Client React Components

To install

Using NPM

npm i wowza-webrtc-client-react

or yarn

yarn add wowza-webrtc-client-react

Usage

Prepare Configuration

import { WebRTCConfiguration } from 'wowza-webrtc-client'

const config: WebRTCConfiguration =  {
  WEBRTC_SDP_URL: 'wss://my-domain.streamlock.net/webrtc-session.json',
  WEBRTC_APPLICATION_NAME: 'myWebRTCApp',
  WEBRTC_FRAME_RATE: 29,
  WEBRTC_AUDIO_BIT_RATE: 64,
  WEBRTC_VIDEO_BIT_RATE: 360,
}

For Publishing

import { WebRTCPublisher as Publisher } from 'wowza-webrtc-client-react'

<Publisher id="publisher-test"
  ref="publisher"
  className="d-block"
  streamName="my-stream-name"
  style={{ width: '100%', height: '100%'}}
  config={ config }
  onVideoStateChanged={(state) => {
    console.log('Publisher state has changed', state)
  }}
/>

For Playing

import { WebRTCPlayer as Player } from 'wowza-webrtc-client-react'

<Player
  id="player-test"
  ref="player"
  streamName="my-stream-name"
  style={{ width: '100%', height: '100vh'}}
  rotate="cw"   // 'cw'|'none'|'ccw'
  config={ config }
  autoPlay={false}
  onPlayerStateChanged={(status) => {
    console.log('Player state has changed', status)
  }}/>

FAQs

Last updated on 30 Dec 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc