mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
Seek precise decimal issues fixed
This commit is contained in:
@@ -112,12 +112,12 @@ export class SeekStream {
|
||||
this.request = stream;
|
||||
stream.pipe(this.stream, { end: false });
|
||||
|
||||
this.stream.once("headComplete", () => {
|
||||
stream.unpipe(this.stream)
|
||||
stream.destroy()
|
||||
this.stream.state = WebmSeekerState.READING_DATA
|
||||
res('')
|
||||
})
|
||||
this.stream.once('headComplete', () => {
|
||||
stream.unpipe(this.stream);
|
||||
stream.destroy();
|
||||
this.stream.state = WebmSeekerState.READING_DATA;
|
||||
res('');
|
||||
});
|
||||
} else res('');
|
||||
}).catch((err) => err);
|
||||
if (parse instanceof Error) {
|
||||
@@ -131,7 +131,7 @@ export class SeekStream {
|
||||
this.timer.reuse();
|
||||
return this.seek(sec);
|
||||
}
|
||||
const bytes = this.stream.seek(sec);
|
||||
const bytes = this.stream.seek(parseFloat(sec.toFixed(2)));
|
||||
if (bytes instanceof Error) {
|
||||
this.stream.emit('error', bytes);
|
||||
this.bytes_count = 0;
|
||||
|
||||
Reference in New Issue
Block a user