[ie/youtube] Add visionos player client (#17184)

Authored by: bashonly
This commit is contained in:
bashonly
2026-07-09 21:42:39 +00:00
committed by GitHub
parent b3854cc41b
commit 1328586f72
3 changed files with 19 additions and 3 deletions
+16
View File
@@ -270,6 +270,22 @@ INNERTUBE_CLIENTS = {
'PLAYER_PO_TOKEN_POLICY': PlayerPoTokenPolicy(required=False, recommended=True),
'REQUIRE_JS_PLAYER': False,
},
# "Made for kids" videos aren't available with this client
'visionos': {
'INNERTUBE_CONTEXT': {
'client': {
'clientName': 'VISIONOS',
'clientVersion': '1.02',
'deviceMake': 'Apple',
'deviceModel': 'RealityDevice17,1',
'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 15_7_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Safari/605.1.15',
'osName': 'visionOS',
'osVersion': '26.5.23O471',
},
},
'INNERTUBE_CONTEXT_CLIENT_NAME': 101,
'REQUIRE_JS_PLAYER': False,
},
# mweb has 'ultralow' formats
# See: https://github.com/yt-dlp/yt-dlp/pull/557
'mweb': {
+2 -2
View File
@@ -3132,8 +3132,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
prs.append(pr)
if (
# Is this a "made for kids" video that can't be downloaded with android_vr?
client == 'android_vr' and self._is_unplayable(pr)
# Is this a "made for kids" video that can't be downloaded with android_vr/visionos?
client in {'android_vr', 'visionos'} and self._is_unplayable(pr)
and webpage and 'made for kids' in webpage
# ...and is a JS runtime is available?
and any(p.is_available() for p in self._jsc_director.providers.values())