mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-18 20:12:12 +00:00
refactor: Migrate to ts-proto (#752)
* refactor: Add extracted protos * refactor: Remove old stuff and update affected code * chore(package): Update `build:proto` script * chore(ClientInfo): Rename `androidSdkVersion` to `android_sdk_version` * chore: remove refs to old proto file * refactor(sabr_request): Rename `Gw` to `media_type` * chore(sabr_request): Fix typo in field num * feat(parser): Parse `video_playback_ustreamer_config` and `server_abr_streaming_url` * refactor: update protos * chore(package): streamline clean and build scripts * chore: update package.json * chore: update npmignore * chore(protos): Remove unneeded definitions See https://github.com/LuanRT/googlevideo for video playback proto definitions. * chore(package): add `rimraf` dependency
This commit is contained in:
@@ -10,6 +10,7 @@ export default class Format {
|
||||
width?: number;
|
||||
height?: number;
|
||||
last_modified: Date;
|
||||
last_modified_ms: string;
|
||||
content_length?: number;
|
||||
quality?: string;
|
||||
xtags?: string;
|
||||
@@ -107,6 +108,7 @@ export default class Format {
|
||||
};
|
||||
|
||||
this.last_modified = new Date(Math.floor(parseInt(data.lastModified) / 1000));
|
||||
this.last_modified_ms = data.lastModified;
|
||||
|
||||
if (Reflect.has(data, 'contentLength'))
|
||||
this.content_length = parseInt(data.contentLength);
|
||||
|
||||
Reference in New Issue
Block a user