Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stopRecording not calling callback #63

Closed
amorino opened this issue Nov 27, 2015 · 12 comments
Closed

stopRecording not calling callback #63

amorino opened this issue Nov 27, 2015 · 12 comments

Comments

@amorino
Copy link

amorino commented Nov 27, 2015

I'm using RecordRTC as the example, however, the stopRecording function is not calling the callback function.

The following messages are displaying:

initializing video stream recorder message
started recording video stream.
Stopped recording video stream.

But that's all. I'm using TweenMax and I get the following warning when I load RecordRTC:

'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead.

Hope that helps.

@thierry2015
Copy link

I currently have the same issue, the callback is not called sometimes. I tried to isolate a typic case, the only one that I found was when stopRecording() was called less than 500ms after startRecording(), but the problem is still happening "randomly" for other cases. (I currently cannot isolate part of the problem)

I currently have a website that relies on this feature, I will continue to investigate the problem, but an update would be welcomed!

@cdanzig
Copy link

cdanzig commented Jan 16, 2017

I have also gotten reports of the stopRecording callback not firing in Chrome. Have yet to reproduce.

@karls
Copy link

karls commented Jan 20, 2017

I have also stumbled on the same issue as previous posters.

I have an external monitor (Thunderbolt display), which I use as my sole monitor most of the time -- laptop lid is closed. I can seemingly reproduce this behaviour when I select the Thunderbolt's camera, but Default or Built-in microphone (not Thunderbolt's own microphone). Having said that, this behaviour has also happened without using the external monitor, while working on the laptop.

I have noticed that when this behaviour (callback not getting called) happens, it is accompanied by ~1-2s freeze in the recorder initialisation. After that, the video starts, but then hangs again for a few seconds. When I stop the video, stream gets stopped, but the callback does not fire.

It looks like when there are multiple video/audio devices available and the "wrong" ones are selected, bad things happen. But given that this weird behaviour has also happened with just one camera and one microphone available, perhaps there is a deeper issue with how Chrome handles selecting media devices?

@muaz-khan any thoughts on this?

@mauliksoni110
Copy link

I am also facing the same, any workaround?

@karls
Copy link

karls commented Jan 20, 2017

@mauliksoni110 the "workaround" is to choose the correct device(s) before initialising the recorder. Unfortunately I don't yet know if or how this can be done programmatically, in the case of multiple available media devices. Given that this behaviour occasionally also happens with just one camera and one microphone, I'm not sure selecting the device programmatically would fix it.

@karls
Copy link

karls commented Jan 20, 2017

Actually, this does not seem to be a RecordRTC issue at all. I have not restarted by browser (Chrome) since I noticed this issue happening with our platform in order to investigate this issue. I can replicate the same behaviour on https://simpl.info/mediarecorder/ without using my external monitor, meaning that only 1 webcam and 1 mic is available for use. The result after recording looks like this -- no recorded blobs. Everything looks fine, I can see the stream in <video>, but after recording a clip, nothing shows up.

No recorded blobs

@tdub7229
Copy link

tdub7229 commented Feb 9, 2017

Also experiencing this problem on Chrome 56.0.2924.87. When this happens on my laptop (which only has one microphone and one camera), the recording light on my laptop stays on.

Here is the chrome console output when it fails:

commits.js:2 You can use ?simple=true to remove redundant HTML.
commits.js:4watchers 782
commits.js:4 forks 345
commits.js:4 followers 1188
gumadapter.js:31 spec:   {"video":{},"audio":true}
gumadapter.js:31 chrome: {"video":{},"audio":true}
RecordRTC.js:54 started recording video stream.
RecordRTC.js:789 Using recorderType: MediaStreamRecorder
RecordRTC.js:1693 Passing following config over MediaRecorder API.
Object {type: "video", mimeType: "video/webm;codecs=h264", disableLogs: false, getNativeBlob: false, video: video}
RecordRTC.js:90 Initialized recorderType: MediaStreamRecorder for output-type: video
RecordRTC.js:103 Stopped recording video stream.
stopRecording @ RecordRTC.js:103

When it does work as expected, it's the same as above, but this line is also output:

RecordRTC.js:140 video/webm;codecs=h264 -> 22.5 KB

@karls
Copy link

karls commented Feb 13, 2017

Just to give an update to this -- some of our customers are having a fairly bad experience on Windows when another process has opened the webcam stream. Note that this does not seem to be the same issue as discussed here, but they might be related. I'm leaving this here for posterity.

I have also opened an issue on the Chromium bug tracker, https://bugs.chromium.org/p/chromium/issues/detail?id=690457, which also links to an issue on the Firefox bug tracker.

An operational update on my side is that we've stopped using RecordRTC for now and relying on just adapter.js. Adapter.js does not support Edge (no MediaRecorder), but we can live with it.

@cdanzig
Copy link

cdanzig commented Mar 6, 2017

Just closed? No update?

@muaz-khan
Copy link
Owner

I think it is fixed here: 41c93ba

@ykmo-VIRNECT
Copy link

Well.. I'm facing same problem

@jaketrimble
Copy link

jaketrimble commented May 28, 2020

Also experiencing this issue with version 5.6.1 in Chrome 83.0.4103.61 (Official Build) (64-bit). Sometimes it fires the callback, but mostly it does not. Lots of debugging and no clues.

UPDATE:
My logic was calling .stop() on tracks before calling .stopRecording(). Putting .stopRecording() before stopping tracks has solved the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants