✨ 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
|
if (!queue) return
|
||||||
const timecodes = options && typeof options === 'object' ? options.timecodes : false
|
const timecodes = options && typeof options === 'object' ? options.timecodes : false
|
||||||
// Stream time of the dispatcher
|
// Stream time of the dispatcher
|
||||||
const currentStreamTime = queue.voiceConnection.dispatcher
|
const currentStreamTime = queue.currentStreamTime
|
||||||
? queue.voiceConnection.dispatcher.streamTime + queue.additionalStreamTime
|
|
||||||
: 0
|
|
||||||
// Total stream time
|
// Total stream time
|
||||||
const totalTime = queue.playing.durationMS
|
const totalTime = queue.playing.durationMS
|
||||||
// Stream progress
|
// Stream progress
|
||||||
|
|
|
@ -97,6 +97,12 @@ class Queue extends EventEmitter {
|
||||||
get calculatedVolume () {
|
get calculatedVolume () {
|
||||||
return this.filters.bassboost ? this.volume + 50 : this.volume
|
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
|
module.exports = Queue
|
||||||
|
|
Loading…
Reference in a new issue