mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-22 22:18:14 +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:
@@ -399,8 +399,9 @@ export function parseResponse<T extends IParsedResponse = IParsedResponse>(data:
|
||||
expires: new Date(Date.now() + parseInt(data.streamingData.expiresInSeconds) * 1000),
|
||||
formats: parseFormats(data.streamingData.formats, this_response_nsig_cache),
|
||||
adaptive_formats: parseFormats(data.streamingData.adaptiveFormats, this_response_nsig_cache),
|
||||
dash_manifest_url: data.streamingData.dashManifestUrl || null,
|
||||
hls_manifest_url: data.streamingData.hlsManifestUrl || null
|
||||
dash_manifest_url: data.streamingData.dashManifestUrl,
|
||||
hls_manifest_url: data.streamingData.hlsManifestUrl,
|
||||
server_abr_streaming_url: data.streamingData.serverAbrStreamingUrl
|
||||
};
|
||||
|
||||
parsed_data.streaming_data = streaming_data;
|
||||
@@ -421,6 +422,9 @@ export function parseResponse<T extends IParsedResponse = IParsedResponse>(data:
|
||||
max_read_ahead_media_time_ms: data.playerConfig.mediaCommonConfig?.dynamicReadaheadConfig?.maxReadAheadMediaTimeMs || 0,
|
||||
min_read_ahead_media_time_ms: data.playerConfig.mediaCommonConfig?.dynamicReadaheadConfig?.minReadAheadMediaTimeMs || 0,
|
||||
read_ahead_growth_rate_ms: data.playerConfig.mediaCommonConfig?.dynamicReadaheadConfig?.readAheadGrowthRateMs || 0
|
||||
},
|
||||
media_ustreamer_request_config: {
|
||||
video_playback_ustreamer_config: data.playerConfig.mediaCommonConfig?.mediaUstreamerRequestConfig?.videoPlaybackUstreamerConfig
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user