mindalayvideostream

1.7.6 • Public • Published

What is this?

many to many video streaming

Instolation

npm i mindalayvideostream --save

inital

import { RtcConnection } from "mindalayvideostream";

React

<VideoConnection 
    roomId='roomid_123'
    videoContainer= {document.getElementById("container")}
    isAudio= {true}
    isVideo ={true}
    videoWidth= {1920}
    videoHeight= {1080}
    frameRate= {30}
    videoControls={[ 'mute-audio', 'mute-video', 'full-screen'] } 
/>
  • videoConnection component
const connection = new RtcConnection({
    roomId, videoContainer, isAudio, isVideo, videoWidth, videoHeight, frameRate, videoControls
});


create any button and take the id

useEffect(()=>{
    connection.openOrJoin("open-or-join-room")
},[connection])

JavaScript

var connectin = new RtcConnection({
    roomId: 'roomid_123',
    videoContainer: document.getElementById('container'),
    isAudio: true,
    isVideo: true,
    videoWidth: 1920,
    videoHeight: 1080,
    frameRate: 30,
    videoControls: [
        'mute-audio', 'mute-video', 'full-screen'
    ]
});

connectin.openOrJoin('open-or-join-room');

Options

  • roomId - any unique id (typeof string)
  • videoContainer - take the HTML element | document.getElementById('elementId')
  • isAudio - true | false
  • isVideo - true | false
  • videoControls - 'mute-audio','mute-video','full-screen', 'take-snapshot','record-audio','record-video', 'volume-slider','stop'

Readme

Keywords

Package Sidebar

Install

npm i mindalayvideostream

Weekly Downloads

1

Version

1.7.6

License

ISC

Unpacked Size

175 kB

Total Files

9

Last publish

Collaborators

  • tigran1205