fix(utils): polyfill AbortSignal.any for Chromium ≤115#1142
Merged
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. |
3db64bf to
e4a07e2
Compare
Contributor
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (6)
Players (3)
Skins (16)
UI Components (21)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (5)
Skins (14)
UI Components (18)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (7)
🏷️ @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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1120
Summary
AbortSignal.any()isn't available in Chromium ≤115, making the player completely non-functional. This adds ananyAbortSignal()utility that feature-detects native support and falls back to manualAbortControllercomposition.Changes
anyAbortSignal(signals)to@videojs/utils/events— delegates to nativeAbortSignal.anywhen available ('any' in AbortSignal), otherwise composes a newAbortControllerthat forwards abort events from all input signalsAbortSignal.any()calls inAbortControllerRegistry.supersede()andTaskconstructor with the new utilityfallback pathsuite that temporarily removesAbortSignal.any)Testing
All pass. Typecheck and lint clean.
Note
Medium Risk
Changes core cancellation/composition behavior used by
TaskandAbortControllerRegistry; while small and well-tested, bugs could impact abort propagation and cleanup across async flows.Overview
Adds
anyAbortSignal()to@videojs/utils/eventsto safely compose multipleAbortSignals, using nativeAbortSignal.anywhen available and a manualAbortControllerfallback otherwise.Updates
TaskandAbortControllerRegistryto useanyAbortSignal()instead ofAbortSignal.any, and adds a comprehensive test suite covering both native and fallback behavior (including reason propagation and pre-aborted inputs).Written by Cursor Bugbot for commit e4a07e2. This will update automatically on new commits. Configure here.