Beta —
@videojs/core is close to stable. Experimental adoption in real projects is welcome.@videojs/core provides the foundational building blocks used by platform-specific implementations (DOM, HTML, React, React Native) to create consistent media player experiences. It contains feature definitions, feature state types, and core player logic that remains independent of any rendering environment.
In the dependency hierarchy, @videojs/core sits above @videojs/utils and @videojs/store, and below the platform packages @videojs/html and @videojs/react.
Installation
Exports
| Entry point | Description |
|---|---|
. | Main entry — runtime-agnostic core logic, feature definitions, and state types |
./dom | DOM bindings — connects core features to the browser environment |
./dom/media/* | Media-specific DOM modules (e.g. HLS, DASH playback adapters) |
Main entry (.)
The default import provides runtime-agnostic player logic and feature primitives that work in any JavaScript environment.
DOM bindings (./dom)
The ./dom subpath exports bindings that connect core player state to the browser DOM. Import this in browser environments when you need to wire up DOM elements to player features.
Media DOM modules (./dom/media/*)
Media-specific modules provide DOM-level adapters for specific playback formats. These are used internally by @videojs/html and @videojs/react.
Dependencies
| Package | Role |
|---|---|
@videojs/spf | Stream Processing Framework — unified HLS/DASH interface |
@videojs/store | Reactive state management |
@videojs/utils | Shared utility functions |
dashjs | MPEG-DASH playback engine |
hls.js | HLS playback engine |
Related packages
@videojs/html
Web Components implementation built on top of core.
@videojs/react
React components and hooks built on top of core.
@videojs/store
Reactive state management used by core.
@videojs/spf
Stream Processing Framework used by core.