Skip to content

Commit

Permalink
Clean up media elements to avoid leak (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
arunpbk-stayqrious authored Aug 11, 2021
1 parent 0fa97ea commit 66c406e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ function startPlayback ({muted, timeout, inline}, elementCallback) {
} else {
sendOutput(true)
}
// Clean up to avoid MediaElementLeak
element.remove()
element.srcObject = null
})
}

Expand Down

0 comments on commit 66c406e

Please sign in to comment.