Add AudioPlayer.currentDispatcher

This commit is contained in:
Amish Shah
2017-02-25 11:12:17 +00:00
parent a029999b09
commit 18bcd2f7e2

View File

@@ -47,7 +47,15 @@ class AudioPlayer extends EventEmitter {
}
get currentTranscoder() {
return this.streams.last().transcoder;
return (this.streams.last() || {}).transcoder;
}
/**
* The current dispatcher
* @type {?StreamDispatcher}
*/
get currentDispatcher() {
return (this.streams.last() || {}).dispatcher;
}
destroy() {