Main principles
Gcore JS Video Player (@gcorevideo/player) is a lightweight, customizable video player built on top of hls.js, dash.js, and native tag <video />. It supports LIVE and VOD playback with low-latency, adaptive protocols, and flexible embedding options.Full SDK reference is available on https://github.com/G-Core/gcore-videoplayer-js/.
- Supports HLS, LL-HLS, MPEG-DASH, LL-DASH, MP4.
- Works in all browsers, and on all PCs and mobile devices.
- Configurable via plugins.
- Full control with SDK methods, events, and error handling.
- Works with any source URL (not limited to Gcore Streaming Platform).
The player was originally created to support LL-HLS and LL-DASH with a latency of ±2-3 seconds, and VOD with different quality levels.
- Core of the player is Clappr module.
- hls.js to play HLS and LL-HLS on devices without native support.
- dash.js to play DASH and LL-DASH on devices without native support.
- Wrapper of <video /> element for native playback of video formats.
Live demo
We prepared 2 live demo projects for you: Vanilla JS Vanilla JS version directly imported as a.js file into a web page.
This demo is a real browser page that works as a permanent public example. It contains both Live and VOD players, external custom control buttons, and separate log panels so you can clearly see player events in real time.
What the demo shows:
- Live playback and VOD playback on the same page.
- Switching between different Live and VOD sources.
- Integration of custom external buttons such as Play, Pause, Mute, and volume control.
- Event logs for player lifecycle and playback events.
- Native JavaScript integration without a frontend framework.
- Home – player with configured plugins and sources.
- Settings – Settings and plugins to configure.
- Source – Video sources to play.
Basic functions
Set video source
Controlling how and what your player plays is simple thanks to a set of built‑in functions you can configure at initialization. These options let you switch sources, enable autoplay, loop content, mute on start, and even show a preview image before playback begins. You can use any video source URL, not just streams hosted on Gcore. The player supports standard formats like HLS (.m3u8) and MPEG-DASH (.mpd), Live and VOD. The player will automatically determine the source type and start playback. You can define a single source to play, and also multiple sources in the configuration. Player will try them in order, use the first compatible one, and display an error stub if none can be played. Simple way to start HLS playback: LIVE, player detects type of video automatically (clickable link to the video):Enable autoplay
To enable autoplay, setautoPlay: true. Don’t forget to combine it with mute: true to comply with most browser policies.
Loop playback
Use theloop: true config option to repeat the video continuously.
Mute on start
Setmute: true to start playback without audio. This helps meet autoplay restrictions.
Set thumbnail
Use thePoster plugin and define an image using the poster.url setting. This image appears before playback starts and is helpful for branding, showing a preview, or providing visual context.
How to customize
Make the player look and behave exactly how you want by applying custom styles or hiding built‑in interface elements before diving into specific tweaks.How to set custom skin
Since the player’s UI is plugin-based, most interface elements expose class names that can be targeted directly. For complete control over layout and styling, it’s recommended that you define your styles in a scoped or external stylesheet.
Example of CSS can be found here:
How to hide UI components
The player interface is modular. Visual elements are enabled by activating corresponding plugins. TheMedia controls plugin handles the core of the UI — if it’s not selected, most visible components won’t appear. Each UI-related plugin can be toggled dynamically at runtime. Some plugins also act as containers and unlock access to additional components.
Install and configure
Install via npm or yarn
The Gcore Player SDK doesn’t depend on any specific framework — it works with React, Vue, Svelte, plain JS, or even CMS platforms like WordPress and Tilda. This section shows how to install and launch a minimal player in your environment. Step 1. Install the SDK Use npm or yarn to install the player package:Vanilla JS
As alternative you can directly import native .js file into your HTML pages without installation. Add module:Get the latest version
You can use the Gcore Player either with a fixed version or always pull the latest release. Latest build (auto-update):- Use exact versions in production for stability.
- Use latest during development or if you need automatic access to improvements.
Use plugins
The following plugins extend the player’s capabilities:
For a full list and detailed descriptions of every plugin, see the Plugin Reference in our GitHub repository.
SDK overview
Gcore Video Player is configured through a single object calledPlayerConfig. This object defines the player’s behavior, including video sources, playback type, preferred streaming protocol, autoplay and mute settings, poster image, and enabled plugins.
Methods overview
Once the player is initialized, you can use its instance methods to control playback. You don’t need to deal with the internal architecture—most features are exposed via simple methods.
For a full list of methods see the Player class in our GitHub repository.
Events overview
The player emits events throughout the playback lifecycle. You can track user interaction, update your interface, or synchronize video playback with other actions in your app. One of the most common events is play, which triggers when playback begins—either automatically or after user interaction:
For a complete list of player events and their parameters, refer to the PlayerEvent class documentation.
Errors overview
Gcore Video Player emits a standardized error event whenever playback fails. This event returns aPlaybackError object containing details such as error code, message, severity, and source:
- Invalid or unreachable video URLs
- Missing or corrupted media metadata
- Unrecognized formats or codec issues