diff --git a/public/index.js b/public/index.js index caf9f36..dc13a19 100644 --- a/public/index.js +++ b/public/index.js @@ -44,7 +44,7 @@ // Context bullshit let playerContext = [] - window.resumeContexts = function () { + window.resumeAudioContexts = function () { for (let i in playerContext) { let ctx = playerContext[i] if (ctx && ctx.resume) { @@ -347,11 +347,11 @@ playing.innerHTML = title document.title = title + window.resumeAudioContexts() + audio.src = '/api/serve/by-id/' + id audio.play() - window.resumeAudioContexts() - updateQT(q) nowPlaying = id diff --git a/public/player.js b/public/player.js index 5e8e46d..9382e31 100644 --- a/public/player.js +++ b/public/player.js @@ -167,12 +167,12 @@ audio.addEventListener('stop', togglePlayButton, false) play.addEventListener('click', function (e) { + window.resumeAudioContexts() if (audio.paused) { audio.play() } else { audio.pause() } - window.resumeAudioContexts() }, false) mute.addEventListener('click', function (e) {