mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-25 15:52:13 +00:00
feat: Add TVHTML5 InnerTube client
+ Update `ANDROID` version.
This commit is contained in:
@@ -51,9 +51,9 @@ export const CLIENTS = Object.freeze({
|
||||
ANDROID: {
|
||||
NAME_ID: '3',
|
||||
NAME: 'ANDROID',
|
||||
VERSION: '18.48.37',
|
||||
VERSION: '19.35.36',
|
||||
SDK_VERSION: 33,
|
||||
USER_AGENT: 'com.google.android.youtube/18.48.37(Linux; U; Android 13; en_US; sdk_gphone64_x86_64 Build/UPB4.230623.005) gzip'
|
||||
USER_AGENT: 'com.google.android.youtube/19.35.36(Linux; U; Android 13; en_US; SM-S908E Build/TP1A.220624.014) gzip'
|
||||
},
|
||||
YTSTUDIO_ANDROID: {
|
||||
NAME_ID: '14',
|
||||
@@ -65,6 +65,12 @@ export const CLIENTS = Object.freeze({
|
||||
NAME: 'ANDROID_MUSIC',
|
||||
VERSION: '5.34.51'
|
||||
},
|
||||
TV: {
|
||||
NAME_ID: '7',
|
||||
NAME: 'TVHTML5',
|
||||
VERSION: '7.20241016.15.00',
|
||||
USER_AGENT: 'Mozilla/5.0 (ChromiumStylePlatform) Cobalt/Version'
|
||||
},
|
||||
TV_EMBEDDED: {
|
||||
NAME_ID: '85',
|
||||
NAME: 'TVHTML5_SIMPLY_EMBEDDED_PLAYER',
|
||||
@@ -99,4 +105,4 @@ export const INNERTUBE_HEADERS_BASE = Object.freeze({
|
||||
'content-type': 'application/json'
|
||||
});
|
||||
|
||||
export const SUPPORTED_CLIENTS = [ 'IOS', 'WEB', 'YTKIDS', 'YTMUSIC', 'ANDROID', 'YTSTUDIO_ANDROID', 'YTMUSIC_ANDROID', 'TV_EMBEDDED', 'WEB_EMBEDDED', 'WEB_CREATOR' ];
|
||||
export const SUPPORTED_CLIENTS = [ 'IOS', 'WEB', 'YTKIDS', 'YTMUSIC', 'ANDROID', 'YTSTUDIO_ANDROID', 'YTMUSIC_ANDROID', 'TV', 'TV_EMBEDDED', 'WEB_EMBEDDED', 'WEB_CREATOR' ];
|
||||
@@ -217,6 +217,12 @@ export default class HTTPClient {
|
||||
ctx.client.clientFormFactor = 'SMALL_FORM_FACTOR';
|
||||
ctx.client.clientName = Constants.CLIENTS.YTSTUDIO_ANDROID.NAME;
|
||||
break;
|
||||
case 'TV': {
|
||||
ctx.client.clientVersion = Constants.CLIENTS.TV.VERSION;
|
||||
ctx.client.clientName = Constants.CLIENTS.TV.NAME;
|
||||
ctx.client.userAgent = Constants.CLIENTS.TV.USER_AGENT;
|
||||
break;
|
||||
}
|
||||
case 'TV_EMBEDDED':
|
||||
ctx.client.clientName = Constants.CLIENTS.TV_EMBEDDED.NAME;
|
||||
ctx.client.clientVersion = Constants.CLIENTS.TV_EMBEDDED.VERSION;
|
||||
|
||||
Reference in New Issue
Block a user