Skip to content

Commit

Permalink
website/js: try and make the disconnecting (more) consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
Wessie committed Feb 26, 2024
1 parent 1130887 commit b4d3093
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assets/js/radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,10 @@ class Stream {
stop = async (deleteAudio) => {
this.audio.pause()
if (deleteAudio) {
// due to eager buffering by browsers they will keep the stream 'playing'
// in the background if we don't do the below things.
this.audio.src = null;
this.audio.load();
this.audio = null;
}

Expand Down

0 comments on commit b4d3093

Please sign in to comment.