Changes to the media management from May 2020!
From May 2020, the new media library replaces the Sector media browsers for images, files and videos, and Sector sites first launched after May 2020 will take advantage of the new, easy to use, and customisable interface. Not sure if that's you? Have a quick look at the WYSIWYG toolbar - three media buttons = old, one button = new! Find out what changed in Working with the new media library.
Sector Media allows you to embed externally hosted videos into body content.
Drupal core's new remote video media type replaces the video media type from May 2020!
The new media library in core is incompatible with the previous video media type. Updating an existing site will require migrating videos from the old to the new media entity. More documentation coming soon!
The Sector D8 video configuration follows the same approach for the other Sector D8 media file types (Sector D8).
Features and functionality
Video functionality for Sector Media is part of the Sector 8.x-2.0-alpha5 release. It includes:
- A Media file type for video
- The ability for content editors to add externally hosted videos (YouTube, Vimeo) and embed media videos from the WYSIWYG editor.
- Media view modes for videos managed via Display Suite.
Included media contribution modules
Sector 8.x-2.0-alpha5 includes the following - not yet core - media contrib. modules:
- Video Embed field - https://www.drupal.org/project/video_embed_field
Related entities and configuration (Sector D8+)
Sector Media file type video
Sector 8.x-2.0-alpha5 includes a preconfigured media types for embedded videos. All displays are hooked into Display Suite view modes to allow for consistency and easy display management.
Preconfigured media metadata fields
Video media type:
- Title (Sector custom)
- Credit and caption (Sector custom - limited to Restricted Basic HTML)
- Transcript (Sector custom - limited to Restricted Basic HTML)
- Tags (Sector custom)
Preconfigured URL pattern
The URL pattern is configured using tokens
- Sector video video/[media:field_title]
Sector Media view modes
The media view modes allow control over how videos are displayed in both the AdminUI and the frontend.
The view modes are inherited by the default Sector D8 media file types (Sector D8).
Sector video adds one additional custom displays in the default Sector media browser view.
Based on the view displays, we have configured 2 entity browsers, each to be used in either the CKeditor (via iframe) or in the media field uploads (via modal).
- Media Entity video alternate (CKeditor)
- Media Entity video
The preconfigured Sector Starter Kit content types don't use media video fields, so the second media entity browser is not actively used. It was added to allow consistency for future add-ons.
Entity Browser permissions
Entity Browser comes with permissions per configured browser, so the permissions need to be reviewed to allow editorial user roles access.
Sector by default allows both content editor and content administrator roles to access the media entity browsers.
Media embed buttons and icons
Media video embed buttons are defined and ...
... used in the WYSIWYG editor toolbar for both Basic and Full HTML text formats.
From 8.x-2.0-alpha5 Sector includes basic theming for videos.
Media sample content
- YouTube sample video <your-domain>/video/sample-video
Media added to pages
To easily test and showcase the media video configuration, we have embedded a sample video into the Sector WYSIWYG Content Elements page.
- Sample video embeds