Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We are trying to capture an image (picture) from a participant video call using Canvas but facing challenges in doing so. Any help would be appreciated. 
 
Let's say there are 3 participants in a video call. P1, P2, and P3.  And Participant P2 wants to capture an image (picture) from the video of participant P1. We wrote the below code to achieve this but are unable to do so as participant P2  local video is coming but participant P1 video doesn't come.
 
navigator.mediaDevices.getUserMedia({ video: true, audio: false })
      .then(function (stream) {
        video.srcObject = stream;
        video.play();
      })
      .catch(function (err) {
        console.log("An error occurred: " + err);
      });
Framework I am using Angular. 

I would appreciate guidance on how to achieve this by suggesting changes in the above code or using another way to achieve this.


What I have tried:

I have try from this code
navigator.mediaDevices.getUserMedia({ video: true, audio: false })
      .then(function (stream) {
        video.srcObject = stream;
        video.play();
      })
      .catch(function (err) {
        console.log("An error occurred: " + err);
      });
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900