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.
I am working on an angular4+ project where I have to record video and play the recorded video at first I got window.URL.createObjectUrl deprecation error I fixed this by using
"video.srcObject = stream" in place of
" video.src = window.URL.createObjectURL(stream);"
But now when I am stopping the recording I am getting error when executing the below function - "recordRTC.getDataURL(function (dataURL) { });"
"RecordRTC.js:265 Uncaught TypeError: Cannot set property 'onmessage' of undefined
at Object.getDataURL (RecordRTC.js:265)
at VideoComponent.webpackJsonp.../../../../../src/app/video/video.component.ts.VideoComponent.processVideo (video.component.ts:72)
at MediaStreamRecorder._callback [as recordingCallback] (RecordRTC.js:177)
at MediaRecorder.mediaRecorder.ondataavailable (RecordRTC.js:2161)"
If I am trying the same thing in angular2 project it is working fine but getting above error with angular4+ projects
Someone please suggest how I can fix this issue so that I can play the recorded video
I am working on an angular4+ project where I have to record video and play the recorded video at first I got window.URL.createObjectUrl deprecation error I fixed this by using "video.srcObject = stream" in place of " video.src = window.URL.createObjectURL(stream);" But now when I am stopping the recording I am getting error when executing the below function - "recordRTC.getDataURL(function (dataURL) { });"
"RecordRTC.js:265 Uncaught TypeError: Cannot set property 'onmessage' of undefined at Object.getDataURL (RecordRTC.js:265) at VideoComponent.webpackJsonp.../../../../../src/app/video/video.component.ts.VideoComponent.processVideo (video.component.ts:72) at MediaStreamRecorder._callback [as recordingCallback] (RecordRTC.js:177) at MediaRecorder.mediaRecorder.ondataavailable (RecordRTC.js:2161)"
If I am trying the same thing in angular2 project it is working fine but getting above error with angular4+ projects
Someone please suggest how I can fix this issue so that I can play the recorded video