Skip to content

Handle newer YouTube playback error messages - #147

Merged
alexeichhorn merged 1 commit into
fix/embedded-safari-user-agentfrom
fix/playback-error-messages
Oct 24, 2026
Merged

alexeichhorn merged 1 commit into
fix/embedded-safari-user-agentfrom
fix/playback-error-messages

Conversation

@alexeichhorn

@alexeichhorn alexeichhorn commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner
  • Problem: Availability checks can succeed for private videos because YouTube now reports Private video, and newer interstitial error messages are ignored.
  • Solution: Read interstitial titles and descriptions alongside existing messages, recognize the new private-video wording, and preserve error statuses when no message is present.

Note

Overview Updates playback availability handling to recognize YouTube’s newer error messages, including private-video errors displayed in interstitial screens.

Error extraction playabilityStatus(watchHTML:) combines and deduplicates reason, messages, and interstitial title and description text into a [String]. It also preserves the playback status when no explanatory message is available.

Availability handling checkAvailability() recognizes "Private video" alongside existing private-video wording and checks the collected messages for private and members-only restrictions. It handles the playback status once per check and reports YouTubeKitError.videoUnavailable for an error status even without accompanying text.

@alexeichhorn
alexeichhorn added this pull request to stack #148 October 23, 2026 17:16
@alexeichhorn
alexeichhorn marked this pull request as ready for review October 23, 2026 17:40
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T17:41:43.505663Z 7ccca9d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e23faf49-1ad1-486b-a745-1eed8673d2ce
📥 Commits

Reviewing files that changed from the base of the PR and between aedf62a and 7ccca9d.

📒 Files selected for processing: 3
  • Sources/YouTubeKit/Extraction.swift
  • Sources/YouTubeKit/YouTube.swift
  • Tests/YouTubeKitTests/ExtractionTests.swift

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

Playability status extraction now returns nonoptional messages from the status reason, interstitial title and description, and status messages, with duplicates removed. Availability checks evaluate each status once and recognize an additional exact private-video message. Tests cover interstitial details, legacy error details, and statuses with no error details.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 7ccca

The reported playback-error handling has no established merge-blocking issue in the supplied evidence. Merge after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: handling newer YouTube playback error messages.
Description check Passed The description directly explains the private-video and interstitial-message handling changes in the pull request.
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.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 89854c9 into main Oct 24, 2026
21 checks passed
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