Skip to content

Commit

Permalink
fix: AudioElement is not getting released correctly (#1516)
Browse files Browse the repository at this point in the history
# Description

Implement correct `AudioElement` releasing as mentioned in the #966
  • Loading branch information
krida2000 authored May 23, 2023
1 parent 8d7b322 commit 32210f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/audioplayers_web/lib/wrapped_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ class WrappedPlayer {
}

void release() {
// Release `AudioElement` correctly (#966)
player?.src = '';
player?.remove();
_cancel();
player = null;
_stereoPanner = null;
Expand Down

0 comments on commit 32210f3

Please sign in to comment.