We are updating our documentation library to be ready for Sector 10! Find out more in our Sector 10 roadmap or head straight to our collection of Sector 10 - Changes and Updates.
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
<your-domain>/admin/structure/media
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
<your-domain>/admin/config/search/path/patterns
The URL pattern is configured using tokens
- Sector video video/[media:field_title]
Sector Media view modes
<your-domain>/admin/structure/display-modes/view
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).
Media Browser(s)
<your-domain>/admin/structure/views/view/media_entity_browser
Sector video adds one additional custom displays in the default Sector media browser view.
<your-domain>/admin/config/content/entity_browser
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.
<your-domain>/admin/people/permissions
Sector by default allows both content editor and content administrator roles to access the media entity browsers.
Media embed buttons and icons
<your-domain>/admin/config/content/embed
Media video embed buttons are defined and ...
<your-domain>/admin/config/content/formats
... used in the WYSIWYG editor toolbar for both Basic and Full HTML text formats.
Sample content
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
<your-domain>/section/sector-wysiwyg-content-elements