mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-06 04:32:40 +00:00
Minor seeking performance optimisation
This commit is contained in:
@@ -18,6 +18,8 @@ interface WebmSeekerOptions extends DuplexOptions {
|
||||
mode?: 'precise' | 'granular';
|
||||
}
|
||||
|
||||
const WEB_ELEMENT_KEYS = Object.keys(WebmElements);
|
||||
|
||||
export class WebmSeeker extends Duplex {
|
||||
remaining?: Buffer;
|
||||
state: WebmSeekerState;
|
||||
@@ -211,7 +213,7 @@ export class WebmSeeker extends Duplex {
|
||||
}
|
||||
|
||||
private parseEbmlID(ebmlID: string) {
|
||||
if (Object.keys(WebmElements).includes(ebmlID)) return WebmElements[ebmlID];
|
||||
if (WEB_ELEMENT_KEYS.includes(ebmlID)) return WebmElements[ebmlID];
|
||||
else return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user