How to Pass MediaStream through SignalR from client to server and server to cliennt

Viewed 188

I have a html video element which plays the video from the local, I get the stream using video.captureStream(), how i will pass through the signalR?


<video width="320" height="240" controls>
    <source id="sourc" src="content/Video1.mp4" type="video/mp4" > </source>
  Your browser does not support the video tag.
</video>


var connection = $.connection.chatHub;
$.connection.hub.start();

var ele = document.querySelector('video');

    ele.addEventListener("canplay", function () {
        const stream = ele.captureStream();
        connection.server.sendStream(SessionId, stream);
    });

0 Answers
Related