Skip to content

Commit

Permalink
fix(player): add source for webkit :)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaraa committed Jul 2, 2024
1 parent 22ab024 commit a24956b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion app/static/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,8 @@ async function playSong(song) {

await downloadSong(song.yt_id).then(() => {
stopMuzikk();
audioPlayerEl.src = `/muzikkx/${song.yt_id}.mp3`;
audioPlayerEl.children.item(0).src =
`${location.protocol}//${location.host}/muzikkx/${song.yt_id}.mp3`;
audioPlayerEl.load();
});

Expand Down
15 changes: 8 additions & 7 deletions app/views/components/player/player.templ
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ templ PlayerSticky() {
</div>
</div>
</div>
<div class="hidden">
<audio
id="audio-player"
controls
preload="none"
></audio>
</div>
<audio
class="hidden"
id="audio-player"
controls
preload="none"
>
<source/>
</audio>
///
<style>
.collapsed {
Expand Down

0 comments on commit a24956b

Please sign in to comment.