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

If recording is stopped early while recordingDuration property is set, a second stop occurs #222

Closed
jpehman opened this issue Mar 10, 2017 · 2 comments

Comments

@jpehman
Copy link

jpehman commented Mar 10, 2017

line 231 of RecordRTC.js

    function handleRecordingDuration() {
        setTimeout(function() {
            stopRecording(self.onRecordingStopped);
        }, self.recordingDuration);
    }

This timeout is set, but it is not cleared if the recording is stopped via another method. For example, if you wish to limit the size of the output by limiting the length of the recording while still allowing users to stop or pause the recording early.

@jpehman
Copy link
Author

jpehman commented Mar 10, 2017

Here's something you could use:

https://gist.github.com/jpehman/09922ceec9798bcde3748da84fa64868

@jpehman
Copy link
Author

jpehman commented Mar 11, 2017

Thanks for fixing this :)

AndersDJohnson pushed a commit to AndersDJohnson/RecordRTC that referenced this issue Apr 8, 2019
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

1 participant