• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

114
Views
cómo superponer dos flujos de medios en un elemento de video

Estoy tratando de combinar dos flujos en un elemento de video, pero no funciona. No quiero superponerlos con css al tener dos elementos de video, ya que quiero pasar el objeto de flujo al socio.

 navigator.mediaDevices.getUserMedia({ video: true, audio: true }).then( (newStream) => { // setStream(newStream); // if (userVideo.current) { // userVideo.current.srcObject = newStream; // } let canvas = document.getElementById("threeCanvas") let stream = canvas.captureStream(240); const canvasStream = Object.assign(stream.getVideoTracks()[0]); let ctx = new AudioContext(), oscillator = ctx.createOscillator(); let dst = oscillator.connect(ctx.createMediaStreamDestination()); oscillator.start(); const silience = Object.assign(dst.stream.getAudioTracks()[0], { enabled: false }); let dummyStream = new MediaStream([canvasStream, silience]); const combinedStream = //is there a way of combning them here? like combainStream(dummyStream ,newStream) or something if (userVideo.current) { userVideo.current.srcObject = combinedStream; } },

about 3 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error