✨ Add queue stream time
This commit is contained in:
parent
3374835951
commit
00f77fbd67
2 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue