I'm developing web application using nodejs and angularjs. I need to display multiple rtsp streaming in single page. For which i use node-rtsp-stream using JSmpeg library. My client side code look like this:
<canvas id="can1" style="width: 480px; height: 280px"></canvas>
<canvas id="can2" style="width: 480px; height: 280px"></canvas>
<script type="text/javascript">
var can1 = document.getElementById('can1');
let player1 = new JSMpeg.Player('ws://192.168.0.72:89', {
canvas: can1, autoplay: true, audio: false, loop: true
})
var can2 = document.getElementById('can2');
let player2 = new JSMpeg.Player('ws://192.168.0.72:88', {
canvas: can2, autoplay: true, audio: false, loop: true
})
</script>
Streaming was displayed successfully but the issue is when i comment one of the player then streaming displayed fine. But, when i start two player simultaneous jsmpeg player not able to stream smoothly. So, Is there any solution ?