fix for firefox?
This commit is contained in:
parent
5cac487c0f
commit
2d8d93cbfa
1 changed files with 9 additions and 0 deletions
|
|
@ -47,6 +47,11 @@ export class Player {
|
||||||
this.sleepTimerEndTime = null;
|
this.sleepTimerEndTime = null;
|
||||||
this.sleepTimerInterval = null;
|
this.sleepTimerInterval = null;
|
||||||
|
|
||||||
|
// Apply audio effects when track is ready
|
||||||
|
this.audio.addEventListener('canplay', () => {
|
||||||
|
this.applyAudioEffects();
|
||||||
|
});
|
||||||
|
|
||||||
// Initialize dash.js player
|
// Initialize dash.js player
|
||||||
this.dashPlayer = MediaPlayer().create();
|
this.dashPlayer = MediaPlayer().create();
|
||||||
this.dashPlayer.updateSettings({
|
this.dashPlayer.updateSettings({
|
||||||
|
|
@ -150,6 +155,10 @@ export class Player {
|
||||||
const preservePitch = audioEffectsSettings.isPreservePitchEnabled();
|
const preservePitch = audioEffectsSettings.isPreservePitchEnabled();
|
||||||
if (this.audio.preservesPitch !== preservePitch) {
|
if (this.audio.preservesPitch !== preservePitch) {
|
||||||
this.audio.preservesPitch = preservePitch;
|
this.audio.preservesPitch = preservePitch;
|
||||||
|
// Firefox support
|
||||||
|
if (this.audio.mozPreservesPitch !== undefined) {
|
||||||
|
this.audio.mozPreservesPitch = preservePitch;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue