Removed unecessary constant variable.
This commit is contained in:
parent
62145ef741
commit
af0200a4a5
@ -50,7 +50,7 @@ export default class PlayListSong {
|
|||||||
}
|
}
|
||||||
this.#audio = new Audio(this.#url);
|
this.#audio = new Audio(this.#url);
|
||||||
console.log("Fetching from url: " + this.#url);
|
console.log("Fetching from url: " + this.#url);
|
||||||
const listener = () => {
|
this.#audio.addEventListener("canplaythrough", () => {
|
||||||
this.#ready = true;
|
this.#ready = true;
|
||||||
console.log("attempting to invoke onReady.");
|
console.log("attempting to invoke onReady.");
|
||||||
console.log(onReady);
|
console.log(onReady);
|
||||||
@ -58,8 +58,7 @@ export default class PlayListSong {
|
|||||||
onReady(this.#audio);
|
onReady(this.#audio);
|
||||||
console.log("onReady invoked.");
|
console.log("onReady invoked.");
|
||||||
}
|
}
|
||||||
};
|
}, { once: true });
|
||||||
this.#audio.addEventListener("canplaythrough", listener, { once: true });
|
|
||||||
return this.#audio;
|
return this.#audio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user