muaz-khan / RecordRTC

RecordRTC is WebRTC JavaScript library for audio/video as well as screen activity recording. It supports Chrome, Firefox, Opera, Android, and Microsoft Edge. Platforms: Linux, Mac and Windows.
https://www.webrtc-experiment.com/RecordRTC/
MIT License
6.45k stars 1.75k forks source link

Pictures keep reloading from html2canvas - Think it might be from screenshot.js? #555

Open ragiovan opened 4 years ago

ragiovan commented 4 years ago

Hi, thanks for all of your work Muaz-Khan. I love the media recording you allow us to do.

I have been able to get the webpage recording to work. The one in which you use html2canvas. However, since a peer 2 peer whiteboard is part of the html I need to convert to canvas, I need this to be relatively fast. However, I've noticed that a lot of my client network resources are being used up when I load the page. In particular, small png files that I have in there are requested again and again, as well as a tiny audio file in my directory. It looks like my style.css is requested over and over again, which is the main issue. Looking at the network resources, it looks like your screenshot.js requests this over and over again on line 10. Unfortunately, it looks like screenshot.js is production code, so I can't read any of it. How can I make it so my style.css, pictures, and audio is not requested again and again in screenshot.js, line 10?

` html2canvas(elementToShare, { grabMouse: true, onrendered: function(canvas) { context2d.drawImage(canvas, 0, 0, canvas2d.width, canvas2d.height); if(isStoppedRecording) { return; }

        setTimeout(looper, 1);
    }
});

})();

Thank you, picture of resources used below...

` image

xblcx commented 4 years ago

Yes, I have the same problem.