vdalex25 / WebRtcPlayer

example player for RTSPtoWebRTC project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebRtcPlayer

example player for RTSPtoWebRTC

Getting Started

install and run RTSPtoWebRTC server

<script src="webrtcplayer.js"></script>

<video id="videoelement" autoplay controls muted style="width:600px;"></video>

<script>
WebRtcPlayer.setServer('localhost:8083');
let player = new WebRtcPlayer('videoelement','H264_PCMALAW');
</script>

the first step is to specify the server on which RTSPtoWebRTC is running

WebRtcPlayer.setServer('localhost:8083');

next step create WebRtcPlayer

let player = new WebRtcPlayer(videoElementId, stream_UUID  [,options]);
//videoElementId - id of video
//stream_UUID - name of srteam from RTSPtoWebRTC config
//options - Object with options

methods

destroy player

player.destroy();

load

player.load(stream_UUID);

getImageUrl

player.getImageUrl();

return base64 encoded string image from videoelement

About

example player for RTSPtoWebRTC project


Languages

Language:JavaScript 100.0%