Autoplay Policy Changes mitigation attempt #2
This commit is contained in:
parent
6f06d70ff6
commit
79a7177714
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user