Fix APlayer instance scope in initialization

Refactored APlayer initialization to use a properly scoped variable for the instance, ensuring it is accessible outside the try block. This improves logging and debugging of the APlayer instance after creation.
This commit is contained in:
Sora 2026-01-20 10:02:50 +08:00
parent e251421fb8
commit 08b5e3bc85

View File

@ -77,8 +77,9 @@
console.log('Creating APlayer with playlist:', playlist);
let ap;
try {
const ap = new APlayer({
ap = new APlayer({
container: container,
lrcType: 0,
audio: playlist,