Skip to content

fix(audio-only-mode): prefer non-MCDN/P2P URLs to avoid 403 and DOMException on playback#2

Merged
GrassBlock1 merged 4 commits intomasterfrom
copilot/fix-audio-only-mode-issues
Mar 17, 2026
Merged

fix(audio-only-mode): prefer non-MCDN/P2P URLs to avoid 403 and DOMException on playback#2
GrassBlock1 merged 4 commits intomasterfrom
copilot/fix-audio-only-mode-issues

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 17, 2026

  • Explore codebase and understand audio-only-mode component
  • Fix backupUrl/backup_url handling (correctly typed as string[] arrays)
  • Collect all available audio URLs (primary + all backup URLs)
  • Prefer non-MCDN/P2P CDN URLs by filtering (avoiding URLs that trigger 403 from other scripts)
  • Add warning log when all URLs are MCDN/P2P (fallback case)
  • Handle DOMException from detached video elements gracefully (check video.isConnected)
  • Fix isMcdnOrP2pUrl catch path to return true (treat unparseable URLs as bad/unknown)
  • Fix Prettier formatting error (line 130 too long)
  • ESLint check passes

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

…lement

Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix audio-only mode request issues fix(audio-only-mode): prefer non-MCDN/P2P URLs to avoid 403 and DOMException on playback Mar 17, 2026
Copilot AI requested a review from GrassBlock1 March 17, 2026 14:24
@GrassBlock1 GrassBlock1 marked this pull request as ready for review March 17, 2026 14:29
Copilot AI review requested due to automatic review settings March 17, 2026 14:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes audio-only mode playback failures caused by selecting MCDN/P2P CDN URLs (which may be rewritten/intercepted by other scripts, leading to 403 and playback DOMExceptions) by improving URL selection and adding a guard for torn-down players.

Changes:

  • Corrects the typing/handling of backupUrl / backup_url as string[] and aggregates primary + backup URLs.
  • Prefers the first non‑MCDN/P2P URL using URL heuristics, with a warning fallback when only MCDN/P2P URLs are available.
  • Adds a video.isConnected guard before assigning video.src to avoid errors when the element is detached during async work.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread registry/lib/components/video/audio-only-mode/AudioOnlyMode.vue Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@GrassBlock1
Copy link
Copy Markdown

@copilot fix ESLint errors

Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Mar 17, 2026

@copilot fix ESLint errors

Fixed in ab85ea5 — there was one Prettier error on line 130 (line too long), now properly wrapped.

Copilot AI requested a review from GrassBlock1 March 17, 2026 23:13
@GrassBlock1 GrassBlock1 merged commit bc17011 into master Mar 17, 2026
1 check 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.

3 participants