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

Add function to remove canvas elements #32

Open
reesvarney opened this issue Sep 24, 2020 · 1 comment
Open

Add function to remove canvas elements #32

reesvarney opened this issue Sep 24, 2020 · 1 comment

Comments

@reesvarney
Copy link

I've been using a slightly modified version of this in my own project which has a lot of streams being mixed together/ dropped over periods of time. This causes issues as after calling releaseStreams() there is still a canvas element left in the DOM which can cause a lot of build-up over time.

I propose that a basic end() function is added which serves the same function as releaseStreams but also removes the mixer canvas element. This should be as simple as adding the following code:

this.end = function(){
    this.releaseStreams();
    canvas.parentNode.removeChild(canvas);
}
@reesvarney
Copy link
Author

I would add this and PR myself but I don't have much experience with the typescript workflow.

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