mirror of
https://github.com/zoriya/v10.git
synced 2026-08-05 05:37:21 +00:00
@videojs/core
⚠️ Beta Close to stable. Experimental adoption in real projects.
Overview
@videojs/core provides runtime-agnostic core components and utilities shared across Video.js
packages. These are foundational building blocks used by platform-specific implementations
(DOM, HTML, React, React Native) to create consistent media player experiences.
Update i18n copy
The i18n source of truth lives in src/core/i18n. Translation keys are the default English
phrases, so changing English copy also changes the typed key consumers use.
When you add, rename, or remove player copy:
- Update
src/core/i18n/types.ts. Add the new phrase toTranslationParams, include any placeholder params, and remove replaced phrases so stale keys fail typecheck. - Update
src/core/i18n/locales/en.ts. Keep the English locale complete. It must satisfyTranslations, notPartial<Translations>. - Update every non-English file in
src/core/i18n/locales. Move existing translations to the new phrase keys when the meaning is unchanged, add translations for new phrases, and remove replaced phrase keys. - Update call sites and tests. Any helper that returns a translation key, such as error-dialog copy, must return the new phrase.
- Run
pnpm -F @videojs/core run generate:locales. This refresheslocales/all.ts,load-locale.ts, and the HTML/React locale re-export files. - Run focused tests and typecheck.
At minimum, run the package tests that cover the changed copy and
pnpm typecheck.
Community
If you need help with anything related to Video.js v10, or if you'd like to casually chat with other members: