mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
feat: implement seeking (FFmpeg -ss restart), fix lyrics sync with seekOffset
- AudioPlayer.seek() restarts FFmpeg with -ss parameter for actual seeking - New POST /api/player/:botId/seek endpoint - BotStatus includes seekOffset and playStartTime from server - Frontend elapsed = seekOffset + (now - playStartedAt) - Progress bar click now seeks to clicked position - All timing actions use _resetTiming() helper with seekOffset - Lyrics sync uses store.elapsed which includes seekOffset Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
080c2836c9
commit
1cdface33c
5 files changed
+101
-50
No files matched your search
@@ -37,6 +37,8 @@ export interface BotStatus {
|
||||
queueSize: number;
|
||||
volume: number;
|
||||
playMode: PlayMode;
|
||||
seekOffset: number; // seconds offset from last seek/play start
|
||||
playStartTime: number; // server timestamp when playback started
|
||||
}
|
||||
|
||||
export class BotInstance extends EventEmitter {
|
||||
@@ -505,6 +507,8 @@ export class BotInstance extends EventEmitter {
|
||||
queueSize: this.queue.size(),
|
||||
volume: this.player.getVolume(),
|
||||
playMode: this.queue.getMode(),
|
||||
seekOffset: this.player.getSeekOffset(),
|
||||
playStartTime: Date.now(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user