Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📦 Bundle Size Report🎨 @videojs/html
Presets (7)
Media (7)
Players (3)
Skins (16)
UI Components (21)
Sizes are marginal over the root entry point. ⚛️ @videojs/react
Presets (7)
Media (6)
Skins (14)
UI Components (18)
Sizes are marginal over the root entry point. 🧩 @videojs/core
Entries (8)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (3)
ℹ️ How to interpretAll sizes are standalone totals (minified + brotli).
Run |
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| if (!data.fatal) return; | ||
|
|
||
| const code = hlsErrorTypeToCode[data.type] ?? MediaError.MEDIA_ERR_CUSTOM; | ||
| const error = new MediaError(data.error, code, true, data.details); |
There was a problem hiding this comment.
Error object as message adds "Error: " prefix
Medium Severity
Passing data.error (an Error object) as the first argument to new MediaError(data.error, ...) causes the super(message) call to invoke ToString() on the Error, which calls Error.prototype.toString(). This produces "Error: <original message>" instead of just "<original message>". Additionally, if hls.js provides an Error with an empty message, toString() returns "Error" (truthy), preventing defaultMessages from being used as a fallback. Passing data.error?.message instead of data.error would preserve the original message string.


Note
Medium Risk
Introduces new error propagation and event-bridging behavior in core delegate/proxy media layers, which can change how media events/errors surface to consumers. Risk is moderate because it touches shared mixins used across multiple media delegates, though changes are localized and covered by new tests.
Overview
Adds a new
MediaErrorclass (with HTMLMediaElement-like codes/messages) and anHlsMediaErrorsMixinthat converts fatalhls.jserrors intoErrorEvent('error')dispatches while exposing the current error via anerrorgetter.Updates HLS delegates (
HlsJsMediaDelegate,HlsMediaDelegate,NativeHlsMediaDelegate) to beEventTargets, forward delegate events to the host via newbridgeEvents, and surfaceerrorfrom the active engine/target. Also refactors delegate-prop inference types intocore/media/types.ts, and adds vitest coverage for event forwarding and HLS error mapping/reset behavior.Written by Cursor Bugbot for commit 89fc5d3. This will update automatically on new commits. Configure here.