video_style
Introduction
Video Style provides reusable video style configuration entities and a pluggable provider API for Drupal.
It is designed as the foundation for a modern Drupal video delivery ecosystem: site builders can create reusable video styles, editors can keep using familiar Media workflows, and developers can implement provider-specific delivery logic without coupling the whole system to one vendor or one rendering approach.
A Video style combines a provider plugin, provider-owned settings, derivative generation logic, a responsive rendering strategy, and a render mode. The module also includes a Video style field formatter and a Video style poster thumbnail formatter.
Who this module is for
- Developers who want a clean, extensible architecture for video delivery in Drupal.
- Site builders who want reusable video configuration instead of repeating formatter settings field by field.
- Product owners and digital teams who want a maintainable foundation for local delivery, CDN delivery, remote encoding, responsive sources, and future provider integrations.
Features
- A
video_styleconfiguration entity at/admin/config/media/video-styles - A shared asset administration page at
/admin/config/media/video-styles/assets - A shared asset registry for provider-owned metadata
- A dedicated
VideoProviderplugin type for provider-specific style logic - A bundled local provider for Drupal-managed files
- A
Video styleformatter for single-file media video source fields - A
Video style posterformatter for rendering poster output through the selected Video style - A duplicate operation for quickly creating a new Video style from an existing one
- Support for provider-defined responsive strategies and render modes
Why this module exists
Drupal has mature image tooling, but video delivery often ends up fragmented across formatters, players, custom code, and provider-specific integrations.
Video Style addresses that gap by introducing a Drupal-native abstraction for reusable video delivery. Instead of hard-coding one provider or duplicating formatter settings everywhere, the module separates responsibilities clearly:
- the base module owns reusable styles, formatters, and shared administration
- provider modules own delivery logic, sync logic, cleanup logic, and provider-specific configuration
- responsive rendering is handled by the companion Responsive Video Style module
Architecture
The module is intentionally built around clear separation of concerns.
- Provider plugins own their own configuration form, validation, and submit handling.
- Provider plugins own derivative generation and source-level delivery attributes.
- Providers can optionally expose poster image data for native video output.
- Providers declare whether they behave as a
sourcestrategy or avariantstrategy for responsive rendering. - Providers also declare whether Drupal renders native playback markup or whether the provider owns the final output.
- The formatter selects a saved Video style; the provider decides what is actually rendered.
This makes the system suitable for both simple local delivery and more advanced integrations such as remote encoding or CDN-backed video providers.
Delivery lifecycle
The architecture separates request-side scheduling from read-side delivery.
- Drupal first calls provider request methods such as
requestDerivative()andrequestPoster(). - Providers can use that step to schedule work such as local generation, remote synchronization, or asynchronous processing.
- Drupal then calls the read-side methods such as
buildDerivative(),buildPoster(), orbuildProviderElement(). - The shared asset registry invalidates provider-specific cache tags when delivery state changes, so rendered output can move from fallback delivery to ready derivatives or poster assets.
This pattern is especially important for sustainable long-term maintenance because queue orchestration and final rendering stay clearly separated.
Bundled local provider
The included local provider works with Drupal-managed files and mirrors the important playback controls from Drupal core’s video formatter, including controls, autoplay, loop, muted, plays inline, width, and height.
It is useful as a simple Drupal-native provider and also serves as a reference implementation for custom provider modules.
Ecosystem
Video Style is the base module of a larger ecosystem.
- Responsive Video Style adds breakpoint-based mapping and responsive field formatting.
- Video Style: ImageKit adds an ImageKit provider with asynchronous synchronization, remote delivery, poster generation, and codec-specific delivery options.
The architecture is intentionally open for further provider modules such as FFmpeg, Cloudinary, Bunny.net, Mux, or other delivery backends.
Installation and configuration
- Install the module as usual.
- Create one or more Video styles at
/admin/config/media/video-styles. - On a media video source field display, select the Video style formatter and choose the desired Video style.
- Optionally use the Video style poster formatter where poster output should be rendered from the selected style.
- For responsive delivery or remote providers, install one or more companion modules from the Video Style ecosystem.
Roadmap
-
Needed for a beta release
- Broader real-world testing across different Drupal site architectures and Media setups
- Expanded automated test coverage for config entities, formatters, provider plugins, and asset registry behavior
- Additional documentation and administrator-facing help text
- Validation hardening around provider configuration and formatter edge cases
- Further review of extension patterns for additional provider modules
-
Needed for a stable release
- Resolved major and critical issues reported by the community
- Backward-compatibility review and stabilization of the provider API
- Production-oriented documentation and upgrade expectations
- Confidence from broader community adoption and feedback
-
Additional 1.x goals
- More provider integrations
- More administrative tooling around assets, delivery state, and diagnostics
- Further improvements to poster handling and provider-rendered use cases
Support / community
- Issue queue
- Bug reports, feature requests, architectural discussion, and feedback.
- Maintainer profile
- For more about the maintainer and related Drupal work.
Maintainer
David Pacassi Torrico (dpacassi)Software Architect & Developer Backend
Sponsorship
The initial implementation of this module was fully sponsored by Helga.
If you are interested in sponsoring additional features, provider integrations, hardening work, or long-term maintenance, please get in touch through the issue queue or maintainer profile.