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.56k stars 1.76k forks source link

Please link: https://www.webrtc-experiment.com/screenshot.js ERROR in Crome Console #681

Closed hiren3897 closed 4 years ago

hiren3897 commented 4 years ago

I am trying to record animation overlayed over video element using RecordRTC in Angular 9 but when I start recording it gives me an error of "Please link: https://www.webrtc-experiment.com/screenshot.js"

Screenshot from 2020-09-28 14-37-45 You can see the error in the above image

my code `play = () => { const square = new Square(this.ctx); this.squares = this.squares.concat(square); // this.draw(); const recorder = new RecordRTC(this.canvas.nativeElement, { type: 'canvas', mimeType: 'video/webm\;codecs=h264' }); recorder.startRecording();

recorder.stopRecording(() => {
  const recordedBlobs = recorder.getBlob();
  const url = URL.createObjectURL(recordedBlobs);
  console.log(url);
  const file = new File([recordedBlobs], 'video.mp4', {
    type: 'video/mp4'
  });
  invokeSaveAsDialog(file, 'test');
});

}` @muaz-khan

hiren3897 commented 4 years ago

@muaz-khan How can i add screenshot.js to my angular.json or install in my angular project to fix this issue

mhackeras commented 3 years ago

Wonder why is this closed? I am getting this in my vue.js project.

hiren3897 commented 3 years ago

Wonder why is this closed? I am getting this in my vue.js project.

Hello there! https://www.webrtc-experiment.com/screenshot.js I solved this with a quick hack by creating screensort.js and copy-paste the content form the above website by configuring it in my angular project my error was resolved I hope it works for you as well. cheers

MoukimHF commented 3 years ago

Hello @hiren3897 I just added this script to the project and it was solved https://www.webrtc-experiment.com/EBML.js

RacketyWater7 commented 2 years ago

@hiren3897 For me, its creating a lot of errors in the screenshot.js file. What I did is I created this file in the same directory as the file where I'm using it and imported it like: import "./screenshot.js" and its showing a lot of errors in the screenshot.js file. :( some are below: image

nhhai1605 commented 2 years ago

Hello @RacketyWater7 , I fixed it by adding <script src="https://www.webrtc-experiment.com/screenshot.js"></script>