prevent errors when audiobuffer is not setup
This commit is contained in:
parent
a7e51d1158
commit
992abdef76
1 changed files with 4 additions and 4 deletions
|
@ -28,15 +28,15 @@ class Player extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
play() {
|
play() {
|
||||||
this.audiobuffer.play();
|
this.audiobuffer?.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
pause() {
|
pause() {
|
||||||
this.audiobuffer.pause();
|
this.audiobuffer?.pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
async stop() {
|
stop() {
|
||||||
this.audiobuffer.stop();
|
this.audiobuffer?.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
isReady() {
|
isReady() {
|
||||||
|
|
Loading…
Reference in a new issue