prevent errors when audiobuffer is not setup

This commit is contained in:
Daniel Sommer 2022-05-03 15:44:34 +02:00
parent a7e51d1158
commit 992abdef76

View file

@ -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() {