From 9beff28d98742e0e8295045a124b94c8e95439d3 Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Thu, 4 Jul 2024 23:18:26 +0300 Subject: [PATCH] fix(player): add initial mute to trick webkit --- app/static/js/player.js | 1 + app/views/components/player/player.templ | 1 + 2 files changed, 2 insertions(+) diff --git a/app/static/js/player.js b/app/static/js/player.js index c7dee08..5808a56 100644 --- a/app/static/js/player.js +++ b/app/static/js/player.js @@ -185,6 +185,7 @@ function setLoading(loading, fallback) { */ function playPauser(audioEl) { const __play = () => { + audioEl.muted = null; audioEl.play(); const songEl = document.getElementById( "song-" + playerState.playlist.songs[playerState.currentSongIdx].yt_id, diff --git a/app/views/components/player/player.templ b/app/views/components/player/player.templ index cf4c0d1..35bb14f 100644 --- a/app/views/components/player/player.templ +++ b/app/views/components/player/player.templ @@ -36,6 +36,7 @@ templ PlayerSticky() { id="audio-player" controls preload="none" + muted > ///