Skip to content

Use VisionOS stream client - #7

Merged
alexeichhorn merged 2 commits into
cloudflare-workerfrom
fix/visionos-stream-client
Aug 18, 2026
Merged

alexeichhorn merged 2 commits into
cloudflare-workerfrom
fix/visionos-stream-client

Conversation

@alexeichhorn

@alexeichhorn alexeichhorn commented Aug 18, 2026

Copy link
Copy Markdown
Owner
  • Problem: The server still prioritizes Android VR stream URLs, which are no longer usable, while YouTubeKit PR #140 moves local extraction to the current VisionOS client.
  • Solution: Prefer VisionOS with Web as the server's primary extraction clients, keeping remote extraction aligned with YouTubeKit and retaining the existing Web Embedded fallback.

Note

Overview Updates stream discovery to prefer YouTube’s VISIONOS client alongside WEB, replacing the previous Android VR client and extending AvailableInnertubeClient with VisionOS support.

Client integration Advances the youtubei.js dependency to a revision that supports the new client and embedded-player request data.

Embedded fallback Loads the video’s embed page when primary clients return no streams, extracts encryptedHostFlags, and supplies them as encrypted_host_flags to the WEB_EMBEDDED request before deduplicating the results.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
youtubekit-server 95ee041 Aug 18 2026, 02:21 PM

@alexeichhorn
alexeichhorn marked this pull request as ready for review August 18, 2026 14:30
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 63ca9712-812e-41d8-8aa9-4ed6bcd49a50

📥 Commits

Reviewing files that changed from the base of the PR and between 99cf663 and 95ee041.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • package.json
  • src/youtube/models/internal.ts
  • src/youtube/service.ts

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The update pins a newer youtubei.js commit, adds the VISIONOS client type, passes wsFetch into stream retrieval, and adds encrypted host flag extraction for WEB_EMBEDDED fallback requests.

Changes

Stream retrieval updates

Layer / File(s) Summary
Client support and dependency update
package.json, src/youtube/models/internal.ts
The pinned youtubei.js commit changes. AvailableInnertubeClient now includes VISIONOS.
Stream discovery and embedded fallback
src/youtube/service.ts
start passes wsFetch to getStreams. Stream discovery tries VISIONOS and WEB. Fallback retrieval extracts encrypted host flags from the embed page and forwards them to WEB_EMBEDDED requests.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 95ee0

The PR updates stream-client selection and fallback handling without any supplied evidence of an actionable merge-blocking risk; it is merge-ready after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant start
  participant getStreams
  participant fetchEncryptedHostFlags
  participant getStreamsForClient
  participant InnerTube

  start->>getStreams: Pass wsFetch
  getStreams->>getStreamsForClient: Try VISIONOS and WEB
  getStreams->>fetchEncryptedHostFlags: Fetch embedded-player HTML on fallback
  fetchEncryptedHostFlags-->>getStreams: Return encryptedHostFlags
  getStreams->>getStreamsForClient: Request WEB_EMBEDDED streams with flags
  getStreamsForClient->>InnerTube: Call getInfo
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the primary change: using the VisionOS stream client.
Description check ✅ Passed The description accurately explains the VisionOS client change, dependency update, and embedded fallback behavior.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/visionos-stream-client

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@alexeichhorn
alexeichhorn merged commit b6fb48d into cloudflare-worker Aug 18, 2026
5 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant