SIGN IN SIGN UP

fix: remove inline onclick CSP violation in retry link (#1332)

Closes #1331

The "click here to retry" link shown after HLS manifest load retries are
exhausted used an inline `onclick` attribute, which violates
`script-src-attr 'none'` CSP policies.

### Changes
- **`playback-core`**: Replaces the inline `onclick` with a typed
`reload` flag on `MediaError`. The message is now plain text, so direct
consumers of `playback-core`/`mux-video` are no longer exposed to raw
HTML in the error message.
- **`mux-player`**: Builds the retry link HTML (using `data-mux-reload`)
in `muxMediaErrorToDialogMessage`, and handles clicks via event
delegation on the player element using `composedPath()` to reach through
shadow DOM boundaries.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk, localized to error messaging and retry-click handling; main
risk is regressions where the reload link no longer appears or reloads
in some shadow DOM/event-path edge cases.
> 
> **Overview**
> Removes the CSP-violating inline `onclick` reload handler from the HLS
manifest retry exhaustion error.
> 
> `playback-core` now marks these errors with a `MediaError.reload` flag
and emits a plain-text message, while `mux-player` conditionally renders
the retry anchor (`data-mux-reload`) and handles retry clicks via
delegated `click` handling using `composedPath()` (with proper listener
cleanup).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
cebafedac7669f1798d341db621310e9a57d4d76. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
M
Manuel Calleriza committed
65d44fcea631ff7d1bbc70782eeefefb36918d42
Parent: 095f04c
Committed by GitHub <noreply@github.com> on 5/14/2026, 6:52:53 PM