Skip to content

Commit

Permalink
more fixes on eq initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
afkcodes committed Aug 1, 2024
1 parent 03ed307 commit 90808c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "audio_x",
"version": "1.0.10-beta.7",
"version": "1.0.10-beta.8",
"description": "The audio player for the gen-x",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
8 changes: 4 additions & 4 deletions src/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class AudioX {
this._audio.autoplay = autoPlay;
this._audio.crossOrigin = crossOrigin;
this.isPlayLogEnabled = enablePlayLog;
this.isEqEnabled = enableEQ;

if (customEventListeners !== null) {
if (useDefaultEventListeners) {
Expand All @@ -117,10 +118,6 @@ class AudioX {
attachMediaSessionHandlers();
}

if (enableEQ) {
this.isEqEnabled = enableEQ;
}

if (enableHls) {
const hls = new HlsAdapter();
hls.init(hlsConfig, enablePlayLog);
Expand Down Expand Up @@ -200,6 +197,9 @@ class AudioX {
console.warn('cancelling current audio playback, track changed');
});
}
if (this.isEqEnabled) {
this.attachEq();
}
}

/**
Expand Down

0 comments on commit 90808c0

Please sign in to comment.