Part of the Video ecosystem · 35 projects
Video Style provides a flexible framework for managing video delivery in Drupal. It allows site builders to create reusable video style configurations and developers to implement custom delivery logic for various video providers. This module aims to unify video delivery within Drupal, offering a maintainable solution for different hosting and encoding needs.
Video Style provides reusable video delivery settings for Drupal Media. Create a Video style once, then use it in Drupal-rendered pages or expose its delivery information to a decoupled frontend through Drupal core REST or JSON:API.
The module includes a Local file provider and a plugin API for additional delivery providers. Video Style: ImageKit adds ImageKit transformations and remote delivery; Responsive Video Style adds breakpoint-based video composition.
Features
- Reusable Video styles managed through Drupal configuration, with a duplicate operation for creating similar styles.
- A Video style field formatter for file-backed video Media.
- A Video style poster formatter for Media thumbnails, with fallback to the stored thumbnail when no poster is available.
- A bundled Local file provider with playback controls, autoplay, looping, muted playback, inline playback and display dimensions.
- Shared asset administration with delivery status and controls for rescheduling pending synchronization retries.
- Optional Video Style API submodule for Drupal core REST and JSON:API.
- Structured delivery information including source URLs, playback settings, posters, processing states and video metadata when available.
- Cache-aware delivery that updates when asynchronous assets become available.
- An extensible provider API for additional video processing and delivery services.
Getting started
- Install with
composer require drupal/video_styleand enable Video Style. - Create a style at Configuration → Media → Video styles (
/admin/config/media/video-styles). - For Drupal-rendered output, select the Video style formatter on a video Media source field and choose your style.
- Install a provider module if you need transformations, generated posters or remote delivery.
The Local file provider serves the original Drupal-managed file. It does not transcode video, resize the underlying file or generate posters. Those capabilities depend on the selected provider.
REST and JSON:API
Enable the included Video Style API submodule (video_style_api) and your preferred core API module. Select Expose through APIs on each style you want to make available.
Eligible video Media then provides a read-only video_styles field. Configure Media access and the chosen transport normally; REST additionally requires its Media GET resource with JSON format to be enabled. Exposing a style does not bypass Media or file access.
API reads do not upload files or generate assets. For providers requiring preparation, use the included Drush warming command and cron/queue processing. Optional preparation when published Media is saved can be enabled under Video styles → API settings. Exposure and automatic preparation default off.
Developers integrating external caches can use the documented video_style_delivery invalidation signal. Sending invalidations to an external frontend remains the consuming application's responsibility.
Scope and GraphQL
The formatters and API fields support Media using Drupal core's Video file source with a single-value file source field. Remote-video/oEmbed Media is outside this scope.
GraphQL integration is not included. GraphQL schemas need an explicit mapping for the structured video-delivery fields; installing GraphQL or a schema generator alone does not provide that mapping.
Documentation and related projects
- Documentation and developer API
- REST and JSON:API setup
- Responsive Video Style
- Video Style: ImageKit
- Issue queue for bug reports, feature requests and support.
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.
Ask your assistant about Video Style
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- file Drupal core
- media Drupal core
Required by
2 tracked projects depend on this one
- Video Style: ImageKit 2 sites
- Responsive Video Style 2 sites
More in the Video ecosystem
Most installed first