diff --git a/src/Player.js b/src/Player.js index 2db6fa3..de5d3ba 100644 --- a/src/Player.js +++ b/src/Player.js @@ -668,9 +668,7 @@ class Player extends EventEmitter { if (!queue) return const timecodes = options && typeof options === 'object' ? options.timecodes : false // Stream time of the dispatcher - const currentStreamTime = queue.voiceConnection.dispatcher - ? queue.voiceConnection.dispatcher.streamTime + queue.additionalStreamTime - : 0 + const currentStreamTime = queue.currentStreamTime // Total stream time const totalTime = queue.playing.durationMS // Stream progress diff --git a/src/Queue.js b/src/Queue.js index de83314..55a230c 100644 --- a/src/Queue.js +++ b/src/Queue.js @@ -97,6 +97,12 @@ class Queue extends EventEmitter { get calculatedVolume () { return this.filters.bassboost ? this.volume + 50 : this.volume } + + get currentStreamTime () { + return this.voiceConnection.dispatcher + ? this.voiceConnection.dispatcher.streamTime + this.additionalStreamTime + : 0 + } } module.exports = Queue