Skip to content

GuideGetting Started

Browser support

Which browsers Video.js 10 supports, what looks different in older versions, and how to build the skins for your own browser targets

Video.js 10 supports current versions of the major browsers, back to the versions below. The Compat skin goes further back in Chrome, Edge, and Firefox. This page covers which versions we support, what looks different in older ones, and what to change when you build the skin CSS yourself.

Supported browsers

Supported browsers and the versions of each that the Default and Neutral skins and the Compat skin support
BrowserDefault and NeutralCompat
Chrome111 and later99 and later
Edge111 and later99 and later
Firefox121 and later103 and later
Safari16.4 and later16.4 and later
Safari on iOS16.4 and later16.4 and later

Default and Neutral reach 91.5% of global web usage, and Compat reaches 93.2%, according to caniuse-lite 1.0.30001810. These figures update when we update that data.

We test in and fix bugs for these versions. To reach older Chrome, Edge, or Firefox versions, use Compat. Its older versions apply to the packaged Compat skins, not to skins from the Shadcn registry.

Why these versions

Each minimum is the first version that has something the skin can’t work without:

Browser Default and Neutral Compat
Chrome and Edge The color-mix() and oklch() color functions Cascade layers (@layer)
Firefox The :has() selector The oldest Firefox our automated tests can run
Safari and Safari on iOS The JavaScript, which uses ES2022 syntax and adoptedStyleSheets The same JavaScript

Compat sets its colors with plain values, so it doesn’t need the newer color functions. Newer JavaScript APIs are feature-detected, so they don’t raise any minimum.

Default and Neutral need every CSS feature in this table, and none of them has a fallback. Compat needs only @layer; without the others, it loses a few layout details:

First browser version that fully supports each CSS feature the skins need, and what breaks without it. Feature names link to their support data on caniuse.com or MDN. Paired browsers share a column and show two values only when they differ.
FeatureChrome and EdgeFirefoxSafari and iOSWithout it
@layer999715.4No component styling
@container10611016Controls do not adapt to player width
Media query range syntax1046316.4Large-screen sizing is lost
:has()10512115.4Menu and slider focus states are lost
color-mix()11111316.2Skin colors are lost
oklch()11111315.4Skin colors are lost

We don’t test browsers older than these minimums. In them, the skins break in the ways the last column describes.

What looks different in older versions

Every supported browser plays media and shows every control. A few CSS features the skins use arrived after the minimums. Browsers with them get the full design, and older ones get a fallback:

Feature Who gets the fallback What you see instead
Popover API Chrome and Edge before 114, Firefox before 125, Safari and iOS before 17 Tooltips, menus, and popovers open inside the player instead of above the page. On video skins, a menu taller than the player is cut off.
light-dark() Chrome and Edge before 123, Safari and iOS before 17.5 Light colors only. Audio skins show their light theme, and video skins keep a light hairline border.
contrast-color() Chrome and Edge before 147, Firefox before 146, Safari and iOS before 26 Buttons use the theme’s default text color instead of one picked to contrast with the accent color.
Relative colors Chrome and Edge before 131, Firefox before 133, Safari and iOS before 18 The scrims behind the controls are built with color-mix() instead, and subtle shadows are left out.
Scrollbar styling Chrome and Edge before 121, Safari and iOS before 26.2 Menus show the browser’s default scrollbars.
Anchor positioning Chrome and Edge before 125, Firefox before 147, Safari and iOS before 26 JavaScript positions popups, so they look the same. In Default and Neutral, the menu highlight jumps between items instead of sliding.
:dir() Chrome and Edge before 120 Nothing, as long as the dir attribute sets the text direction.

The skins keep each newer declaration inside an @supports check, so browsers that have the feature still use it.

Compat’s older versions also lack three features the other skins require:

Feature Who gets the fallback What you see instead
Container queries Compat in Chrome and Edge before 106, Firefox before 110 The narrowest layout at every player size: no center play and seek buttons, and the time shows as a toggle instead of “current / duration”.
Media query range syntax Compat in Chrome and Edge before 104 In fullscreen, the controls don’t grow on large screens.
:has() Compat in Chrome and Edge before 105, Firefox before 121 Focusing the time slider with the keyboard doesn’t show the thumbnail preview.

Choose Compat for older browsers

Compat supports the oldest browsers, as the supported browsers table shows. It also leaves out two details that Default and Neutral add, which depend on browser support:

Detail Default Neutral Compat
Menu highlight Slides between items with anchor positioning, and jumps without it Slides between items with anchor positioning, and jumps without it Jumps between items
Control corners Rounded Smooth squircle corners with corner-shape, and rounded without it Rounded

Compat still gets the popover and color fallbacks in the first table. See Skins to compare the skins in full.

Skins from the Shadcn registry

Packaged skins don’t use @scope: our build rewrites it into :where() selectors. Skins you add as source through the Shadcn registry keep it, because it reads more clearly in files you edit. That raises the minimums for one style:

Registry skin Supported browsers
Tailwind The Default and Neutral versions above, for every skin. Utility classes style each element, so there’s no @scope.
Plain CSS Chrome and Edge 118, Firefox 146, Safari and iOS 17.4. To reach the full list, flatten @scope in your build.

Build the skin CSS yourself

We build the packaged skins for the supported browsers, so most projects need no changes. Your own build only matters when it processes the skin CSS.

Skins are stylesheets you import, such as @videojs/react/video/skin.css, so your bundler’s CSS pipeline processes them.

Turn off two Lightning CSS rewrites

Vite minifies CSS with Lightning CSS. When your browser targets include older versions, it rewrites two features the skins already handle, in every browser rather than only the older ones:

Feature What goes wrong
light-dark() The rewrite depends on a color-scheme declaration the skins don’t make, so the skin colors break. Lightning CSS 1.33 and later rewrite it even inside @supports checks.
:dir() The rewrite turns it into a list of right-to-left languages, so right-to-left styles can apply because of the page’s lang instead of its text direction. The skins already pair :dir() with [dir] selectors, so they don’t need the rewrite.

Exclude both:

import { Features } from 'lightningcss';
import { defineConfig } from 'vite';

export default defineConfig({
  css: {
    lightningcss: { exclude: Features.LightDark | Features.DirSelector },
  },
});

Flatten @scope in registry skins

Lightning CSS leaves @scope alone. To support browsers without it, add a small PostCSS plugin that rewrites each @scope block into ordinary selectors, the same way we build the packaged skins. Most bundlers, including Vite and Next.js, run PostCSS before Lightning CSS.

Install PostCSS and its selector parser:

npm install --save-dev postcss postcss-selector-parser

Add the plugin to postcss.config.mjs:

import selectorParser from 'postcss-selector-parser';

/** Rewrite `@scope (<root>) { … }` into descendant selectors that older browsers understand. */
function flattenScope() {
  const rewrite = (selector, root) =>
    selectorParser((selectors) => {
      selectors.each((sel) => {
        let referencesRoot = false;

        sel.walk((node) => {
          if (node.type === 'nesting' || (node.type === 'pseudo' && node.value === ':scope')) {
            node.replaceWith(selectorParser.string({ value: `:where(${root})` }));
            referencesRoot = true;
          }
        });

        if (!referencesRoot) {
          sel.prepend(selectorParser.combinator({ value: ' ' }));
          sel.prepend(selectorParser.string({ value: `:where(${root})` }));
        }
      });
    }).processSync(selector);

  return {
    postcssPlugin: 'flatten-scope',
    OnceExit(css) {
      const scopes = [];
      css.walkAtRules('scope', (atRule) => scopes.push(atRule));

      // Innermost first, so a nested scope is flattened before its parent prefixes it.
      for (const atRule of scopes.reverse()) {
        const match = /^\(\s*(.+?)\s*\)\s*$/.exec(atRule.params);
        if (!match || /\)\s*to\s*\(/.test(atRule.params)) continue;

        atRule.walkRules((rule) => {
          rule.selectors = rule.selectors.map((selector) => rewrite(selector.trim(), match[1]));
        });
        atRule.replaceWith(atRule.nodes);
      }
    },
  };
}
flattenScope.postcss = true;

export default { plugins: [flattenScope()] };

Flattened rules apply in source order instead of by @scope proximity, the same as in the packaged skins. Keep the Lightning CSS setting above so the colors still work.

Other environments

Environment Supported What to know
Server-side rendering Yes Components render valid markup on the server. Playback, state, and events start in the browser after hydration.
Progressive Web Apps Yes Installed apps use the browser engine, but standalone mode can change fullscreen and media session behavior. Test in a browser tab and in the installed app.
WebViews Untested WKWebView on iOS and Android WebView can differ from the full browser in autoplay, fullscreen, and hardware acceleration. Test each platform and WebView version you support.
Smart TVs and set-top boxes No Their embedded browsers have limited standards support. The core isn’t tied to a platform, so TV adapters are possible later.

Guides