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

Deleted blob from memory #300

Open
SergeyKozlov opened this issue Jul 11, 2017 · 3 comments
Open

Deleted blob from memory #300

SergeyKozlov opened this issue Jul 11, 2017 · 3 comments

Comments

@SergeyKozlov
Copy link

Hi.

Each time a new video is stored in the memory of the explorer?
How can I make the old one deleted from memory when recording a new video?

Thank you.

@johnnylawson
Copy link

I had this same issue and the only way after many hours of trying things, is to refresh the browser window. Chrome has a limit of 500mb. If you record consecutive short videos - you eventually reach 500mb and things go array depending on your application. You can't write to the blob after 500mb. I inserted some code in my application that after the video is saved to a file - it refreshes the browser window thus resetting the blob size to 0 in memory.

@jerodfritz
Copy link

+1
I can confirm the same behavior @johnnylawson is describing. Even saving off the captured data in the ondatavailable event still eats up the limit.

@SergeyKozlov
Copy link
Author

Hello everyone.
In fact, I have long found a solution to this problem.
First I create an object.

recordingDIV.querySelector('button').onclick = function () {
    var button = this;
    if (button.innerHTML === 'Stop Recording') {
        //stopButtonRecording(button); // ==
        button.disabled = true;
        button.disableStateWaiting = true;
        setTimeout(function () {
            button.disabled = false;
            button.disableStateWaiting = false;
        }, 2 * 1000);
        button.innerHTML = 'Start Recording';
        function stopStream() {
            if (button.stream && button.stream.stop) {
                button.stream.stop();
                button.stream = null;
            }
        }
        if (button.recordRTC) {

Then I delete the object when I no longer need it.

delete button; // destroy object

In addition, you can use a native function:
https://github.com/muaz-khan/RecordRTC#destroy

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

3 participants