Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

102
Views
Trying to transmit video capturestream webrtc

I am trasnmittin the video captureStream using signaling server but it seems to be not working at all, I dont know what I am missing or am I doing it wrong I am using the capturestream webrtc, Here is the code that I tried so far, Can anyone check it because Im getting blank on the client side. But if I tried the the navigator.mediaDevices.getDisplayMedia(constraint). It works but it I use the code below its seem to be not working...

Here is the code I tried

Video:

<video preload="auto" playsinline autoplay id="tvideo"
           <source src="video.mp4" type="video/mp4"></source>
        </video>

Js file

const tvideo = document.getElementById('tvideo');


 
const stream = tvideo.addEventListener('canplay', () => {
  let stream;
  const fps = 0;
  if (tvideo.captureStream) {
    stream = tvideo.captureStream(fps);
  } else if (tvideo.mozCaptureStream) {
    stream = tvideo.mozCaptureStream(fps);
  } else {
    console.error('Stream capture is not supported');
    stream = null;
  }
});

stream => {
    tvideo.srcObject = stream;
    socket.emit("broadcaster");
  };

Reciever is all good I think

socket.on("broadcaster", () => {
  socket.emit("watcher");
});
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!