0.0.25 • Published 5 years ago

wowza-webrtc-client-react v0.0.25

Weekly downloads
31
License
ISC
Repository
github
Last release
5 years ago

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)
  }}/>
0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago