From 2d8d93cbfa843c58ff76d9cd330a8d9346c029c4 Mon Sep 17 00:00:00 2001 From: edidealt Date: Sun, 1 Mar 2026 11:29:40 +0000 Subject: [PATCH] fix for firefox? --- js/player.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/player.js b/js/player.js index 9aa39b5..c12c2fc 100644 --- a/js/player.js +++ b/js/player.js @@ -47,6 +47,11 @@ export class Player { this.sleepTimerEndTime = null; this.sleepTimerInterval = null; + // Apply audio effects when track is ready + this.audio.addEventListener('canplay', () => { + this.applyAudioEffects(); + }); + // Initialize dash.js player this.dashPlayer = MediaPlayer().create(); this.dashPlayer.updateSettings({ @@ -150,6 +155,10 @@ export class Player { const preservePitch = audioEffectsSettings.isPreservePitchEnabled(); if (this.audio.preservesPitch !== preservePitch) { this.audio.preservesPitch = preservePitch; + // Firefox support + if (this.audio.mozPreservesPitch !== undefined) { + this.audio.mozPreservesPitch = preservePitch; + } } }