Skip to content

Add function to remove canvas elements #32

@reesvarney

Description

@reesvarney

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions