Transforming Video Player Customization with Player.style and Web Components

At Qualabs, innovation and collaboration are at the core of our mission. We specialize in enhancing video technology and actively contribute to the developer community through open-source initiatives.

During the MonteVIDEO Tech Summer Camp, Steve Heffernan, creator of Player.style, proposed the idea of building custom themes for video and audio players.

Although this project wasn’t officially selected, we saw its potential and decided to bring it to life, aiming to simplify video player customization and encourage creativity.

Challenge

Customizing video player interfaces can be complex, requiring deep framework knowledge and extensive coding. Many developers struggle to modify video players to align with branding and design aesthetics.

Our challenge was to create a theme that developers could easily integrate into any video player with minimal effort. The solution needed to be lightweight, customizable, and work across different platforms and frameworks.

Process

To address this challenge, we leveraged Player.style , an open-source project designed to simplify video player UI customization using MediaChrome . This library allows developers to apply and modify player themes using HTML, CSS, or React components.

We developed the X-mas theme, a festive and customizable video player UI that enables developers to apply a holiday-themed design to their players effortlessly.

Implementation Steps:

  • Research & Analysis: We explored existing themes in Player.style and identified potential enhancements.
  • Design & Development: Our engineers created a Christmas-themed player UI using MediaChrome, ensuring flexibility and adaptability.
  • Testing & Optimization: The theme was tested across multiple video player frameworks to ensure seamless compatibility.
  • Open Source Contribution: We made the theme available on Player.style, inviting developers to use and customize it.
  • Solution

    Making Any Player Compatible with Player.style

    To integrate Player.style with a custom video player, developers need to create a web component that behaves like the < video > tag.

    What is a Web Component?

    A web component is a reusable, encapsulated custom element that functions like a native HTML element. It consists of three core technologies:

    • Custom Elements – Define new HTML elements using JavaScript.
    • Shadow DOM – Encapsulates styles and logic, preventing conflicts with the rest of the page.
    • HTML Templates – Enables dynamic, reusable content structures.

    Key Features for a Video Web Component

    For full compatibility, the web component must replicate the functionality of a native < video > element, exposing essential methods, properties, and events.

    Core Methods:

    play(), pause(), load(), canPlayType(type), requestPictureInPicture()

    Supported Properties:

    src, currentTime, duration, paused, muted, volume, playbackRate, controls, loop, autoplay, poster, preload, crossOrigin

    Event Handling:

    play, pause, playing, waiting, seeking, seeked, timeupdate, ended, ratechange, loadedmetadata, loadeddata, canplay, canplaythrough, volumechange

    By implementing these features, the web component behaves like a standard < video > tag while providing a flexible, customizable player interface compatible with Player.style.

    Results

    • Effortless Customization: Developers can now personalize their video players with a ready-to-use theme.
    • Seamless Integration: The X-mas theme works across multiple players without requiring complex modifications.
    • Community Engagement: Our contribution inspired developers to experiment with UI themes in MediaChrome.
    • Scalability: The modular approach allows easy adaptation for new themed UI designs.
    • Extending Innovation: The IETF MoQ Player Building on the success of the X-mas theme, we also contributed to the IETF MoQ Player, ensuring seamless integration of Player.style into custom-built players.

    What’s Next?

    Following the success of the X-mas theme and IETF MoQ Player, we plan to expand our collection of player themes and further integrate Player.style into diverse video workflows.

    We encourage developers to explore our work and join us in improving video player UI customization.