Skip to content

Commit

Permalink
fix(player): add initial mute to trick webkit
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaraa committed Jul 4, 2024
1 parent c65d3ea commit 9beff28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/static/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions app/views/components/player/player.templ
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ templ PlayerSticky() {
id="audio-player"
controls
preload="none"
muted
></audio>
///
<style>
Expand Down

0 comments on commit 9beff28

Please sign in to comment.