many to many video streaming using WebRTC technology
npm install mindalayvideostreamnpm i mindalayvideostream --save
import { RtcConnection } from "mindalayvideostream";
`
React
`
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');
``