Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
break;
case ANIMATION:
internal = this.engine.gifRecorder;
break;
default:
internal = this.engine.videoRecorder;
}
let maxFileSizeReached = false;
if (internal) {
internal = internal.getInternalRecorder();
}
if ((internal instanceof RecordRTC.MediaStreamRecorder) === true) {
this.player().recordedData = internal.getArrayOfBlobs();
// inject file info for newest blob
this.addFileInfo(
this.player().recordedData[this.player_.recordedData.length - 1]);
// check max file size
if (this.maxFileSize > 0) {
let currentSize = new Blob(this.player().recordedData).size;
if (currentSize >= this.maxFileSize) {
maxFileSizeReached = true;
}
}
}
// notify others
.then(async (stream) => {
this.videoElement.nativeElement.srcObject = stream;
await this.videoElement.nativeElement.play();
const options = {
mimeType: 'video/webm\;codecs=vp9',
recorderType: RecordRTC.MediaStreamRecorder
};
this.recordRTC = RecordRTC(stream, options);
this.recordRTC.startRecording();
})
.catch(function (err) {