Skip to content

How discord-player is seeking #1694

Closed Answered by twlite
Fyphen1223 asked this question in Q&A
Discussion options

You must be logged in to vote

Our current implementation uses ffmpeg to perform seek and to apply some audio filters to the player.

When playerNode.seek(duration) is invoked, it internally calls <GuildQueueAudioFilters>.triggerReplay(duration). The implementation for triggerReplay is

public async triggerReplay(seek = 0) {
if (!this.queue.currentTrack) return false;
try {
await this.queue.node.play(this.queue.currentTrack, {
queue: false,
seek,
transitionMode: true
});
return true;
} catch {
return false;
}
}
}

Upon further in…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by twlite
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants