Skip to content

Commit

Permalink
chore(player): add the max duation update for safari
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaraa committed Jul 4, 2024
1 parent d1c4d7a commit 2692248
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/static/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,9 @@ audioPlayerEl.addEventListener("loadeddata", (event) => {

audioPlayerEl.addEventListener("timeupdate", (event) => {
const currentTime = Math.floor(event.target.currentTime);
setDuration(currentTime);
if (isSafari()) {
setDuration(currentTime);
}
if (songCurrentTimeEl) {
songCurrentTimeEl.innerHTML = Utils.formatTime(currentTime);
}
Expand Down

0 comments on commit 2692248

Please sign in to comment.