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

Disconnect, reconnect camera during recording video. #290

Open
redwerk opened this issue Jun 29, 2017 · 1 comment
Open

Disconnect, reconnect camera during recording video. #290

redwerk opened this issue Jun 29, 2017 · 1 comment

Comments

@redwerk
Copy link

redwerk commented Jun 29, 2017

When user during recording video, disconnects camera, user will see black screen and video will continue to record. Is there any way we could get the error that the camera got disconnected to have a more user-friendly message for them available?

@muaz-khan
Copy link
Owner

I think we've this: checkForInactiveTracks

recorder = RecordRTC(stream, {
   type: 'video',
   checkForInactiveTracks: true
});

checkForInactiveTracks will ask RecordRTC to auto-stop-recording on finding inactive tracks.

You can use this as well:

addStreamStopListener(cameraStream, function() {
    recorder.stopRecording(); // manually stop the recording
});

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

2 participants