Removed unecessary constant variable.

This commit is contained in:
Harrison Deng 2022-04-18 02:04:24 -05:00
parent 62145ef741
commit af0200a4a5

View File

@ -50,7 +50,7 @@ export default class PlayListSong {
}
this.#audio = new Audio(this.#url);
console.log("Fetching from url: " + this.#url);
const listener = () => {
this.#audio.addEventListener("canplaythrough", () => {
this.#ready = true;
console.log("attempting to invoke onReady.");
console.log(onReady);
@ -58,8 +58,7 @@ export default class PlayListSong {
onReady(this.#audio);
console.log("onReady invoked.");
}
};
this.#audio.addEventListener("canplaythrough", listener, { once: true });
}, { once: true });
return this.#audio;
}