Skip to content

Comments

feat(video): updated shaka player, fixed styles and bugs#522

Open
agliga wants to merge 2 commits intomainfrom
video
Open

feat(video): updated shaka player, fixed styles and bugs#522
agliga wants to merge 2 commits intomainfrom
video

Conversation

@agliga
Copy link
Collaborator

@agliga agliga commented Feb 17, 2026

Description

  • Updated shaka player to the latest
  • In the latest version, theres a lot of things that we had to override that we don't anymore. I cleaned up a lot of the CSS
  • I fixed the react version to work on the latest and I made react look similar to the marko component.

Checklist

  • I verify all changes are within scope of the linked issue

  • I added/updated/removed testing (Storybook in Skin) coverage as appropriate

  • I tested the UI in all supported browsers

  • I tested the UI in dark mode and RTL mode

@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2026

🦋 Changeset detected

Latest commit: 589c434

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@ebay/ui-core-react Minor
@ebay/ebayui-core Minor
@ebay/skin Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

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

Upgrades the ebay-video Shaka Player integration to Shaka v5 and updates Skin/React/Marko implementations to match the new UI/config behavior (including compact layout + navigation use cases from #507 and iOS bug fixes from #502).

Changes:

  • Bump shaka-player to 5.0.2 across Marko/React packages and update the lockfile accordingly.
  • Update video UI configuration (e.g., showUIAlways, context menu options, compact control panel elements) and simplify/adjust Skin overrides.
  • Refactor React/Marko video controls + snapshots to align with the updated player UI and markup.

Reviewed changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/skin/src/sass/video/video.scss Simplifies Shaka UI overrides and adds slider/button-panel positioning rules.
packages/skin/dist/video/video.css Regenerated compiled CSS reflecting the SCSS changes.
packages/skin/package.json Adjusts build script ordering (moves sass linting to build).
packages/evo-marko/package.json Updates Shaka dependency to v5.0.2.
packages/ebayui-core/package.json Updates Shaka dependency to v5.0.2.
packages/ebayui-core/src/components/ebay-video/index.marko Removes the loading overlay/spinner markup from server-rendered template.
packages/ebayui-core/src/components/ebay-video/component.ts Updates Shaka UI config for v5 and changes load/error handling + compact behavior.
packages/ebayui-core/src/components/ebay-video/elements.ts Adjusts report-button gating logic for report/a11y text inputs.
packages/ebayui-core/src/components/ebay-video/test/snapshots/test.server.js.snap Updates snapshots to match Marko markup changes.
packages/ebayui-core-react/package.json Updates optional Shaka dependency to v5.0.2.
packages/ebayui-core-react/test.setup.ts Adds a test-only SVGPathElement polyfill for jsdom.
packages/ebayui-core-react/src/ebay-video/const.ts Updates default control panel elements to use custom current/total time elements.
packages/ebayui-core-react/src/ebay-video/controls.tsx Adds custom Shaka UI elements for current/total time display.
packages/ebayui-core-react/src/ebay-video/video.tsx Registers new UI elements and adds JS-driven seekbar alignment for React player.
packages/ebayui-core-react/src/ebay-video/tests/render.spec.tsx Updates assertions to match Shaka v5 DOM/attributes.
package-lock.json Lockfile update reflecting new Shaka versions + workspace installs.
.changeset/sweet-beers-kiss.md Publishes minor bumps for Skin/Core/Core-React due to Shaka v5 upgrade.
Comments suppressed due to low confidence (2)

packages/ebayui-core/src/components/ebay-video/component.ts:348

  • _loadSrc no longer handles Shaka error codes for “another load in progress” / “player not ready” (previously ignored/retried). Without this, a transient load interruption can now fall through to handleError, removing the play button and emitting load-error. Reintroduce special handling for these known error codes (matching the React implementation) before attempting nextIndex / failing.
        this.player
            .load(src.src)
            .then(() => {
                // this._addTextTracks();
                this.state.failed = false;
            })
            .catch((err: Error & { code: number }) => {
                if (nextIndex) {
                    setTimeout(() => this._loadSrc(nextIndex), 0);
                } else {
                    this.handleError(err);
                }
            });

packages/ebayui-core/src/components/ebay-video/elements.ts:56

  • The report button is created when either reportText or a11yReportText is present, but the button itself is missing an accessible label (neither value is applied to aria-label). Set button_.ariaLabel (prefer a11yReportText, fall back to reportText) so the icon-only button is announced correctly by screen readers.
            if (!self.input.reportText && !self.input.a11yReportText) {
                return;
            }

            // The actual button that will be displayed
            this.button_ = document.createElement("button");
            this.button_.classList.add("video-player__report-button");

            const flagIcon = self
                .getComponent("flag-icon")!
                .el!.cloneNode(true);
            this.button_.prepend(flagIcon);
            this.parent.appendChild(this.button_);

Comment on lines +122 to +123
shaka.ui.Controls.registerElement("current_time", new CurrentTime.Factory());
shaka.ui.Controls.registerElement("total_time", new TotalTime.Factory());
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

shaka.ui.Controls.registerElement(...) is executed on every render of the React component (it’s in the function body, not an effect). Since Shaka’s element registry is global, this can lead to duplicate registrations across re-renders/multiple instances and may throw or leak. Move these registrations into a one-time initialization (module scope or a useEffect(..., [])) and guard against re-registering keys that already exist.

Copilot uses AI. Check for mistakes.
@patrickufer
Copy link
Contributor

@agliga I don't think the a11y text props are working as expected. Ex: a11yMuteText says it defaults to "Mute" but I don't see aria-label on the mute button control
image

Also, there is a a11yPlayText but no a11yPauseText .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ebay-video: upgrade shaka-player v5.0 with support for new UI config showUIAlways

2 participants