mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
fixing
This commit is contained in:
1 parent
2ee4a0a86d
commit
998040d33a
2 files changed
+9
-8
No files matched your search
+8
-7
@@ -2468,18 +2468,19 @@ export default class Player extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
applyTrackOption(match) {
|
||||
async applyTrackOption(match) {
|
||||
if (!match || !this.connection || this._paused) return false;
|
||||
|
||||
if (match.startMs > 0) {
|
||||
this.seekToPosition(match.startMs).catch((e) => {
|
||||
logger.warn("[Player] TrackOptions apply-seek error:", e.message);
|
||||
});
|
||||
}
|
||||
|
||||
this._clearTrackEndTimer();
|
||||
this._activeTrackOpt = null;
|
||||
|
||||
try {
|
||||
await this.seekToPosition(match.startMs || 0);
|
||||
} catch (e) {
|
||||
logger.warn("[Player] TrackOptions apply-seek error:", e.message);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (match.endMs > 0) {
|
||||
const elapsedMs = Date.now() - this.startedPlaying;
|
||||
const remainingMs = match.endMs - elapsedMs;
|
||||
|
||||
Reference in new issue
Block a user