Hi there,

We lost our video embed with the switch to the media library :(.
Current assumption is that we need to move our video solution to use the "remote video" type and field, and disable the default video

- create new media type "remote video"
- integrate with media library embed field in WYSIWYG
- test and report back

If it works
- remove old 'artefacts' - I assume the media type and one module

Ta,

Heike

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

HeikeT created an issue. See original summary.

HeikeT’s picture

The awesome people of the Video Embed Field module have also updated their page with solutions!
https://www.drupal.org/project/video_embed_field

HeikeT’s picture

Title: Video embed solution needs to be updated to work with Media Library » Switch from Video Embed Field to Media Library remote video
DanielVeza’s picture

FileSize
526 bytes

Not prod ready. This doesn't work in Sector yet. We override the media.settings.yml file unnecessarily (See #3080497: [Meta] Cleanup our config files).

So we need to remove that file.

But we also need to provide an update hook for existing sites. We need to add the

oembed_providers_url: 'https://oembed.com/providers.json'

key & value to media.settings.yml

Thangvu’s picture

Hi Daniel,

I have attached the patch as required, I test it on the local site and it works fine for me. please check it again when you apply it. Cheers.

DanielVeza’s picture

Status: Active » Needs work
  1. +++ b/sector.install
    @@ -43,6 +43,9 @@ function sector_install() {
    +
    +  // Update media.settings.yml
    +  sector_update_8401();
    

    This isn't needed. New sites will already have the new config, and the update will run on existing sites

  2. +++ b/sector.install
    @@ -162,3 +165,15 @@ function excludeXmlsitemapNodes() {
    +/**
    + * update media.settings.yml function
    + * Implement Hook_update_N()
    + *
    + * @param [type] $sandbox
    + * @return void
    + */
    

    This should be a bit more descriptive. The param and return also isn't needed in this case.

  3. +++ b/sector.install
    @@ -162,3 +165,15 @@ function excludeXmlsitemapNodes() {
    +  $data = ["oembed_providers_url" => "https://oembed.com/providers.json"];
    +  \Drupal::configFactory()->getEditable('media.settings.yml')->setData($data)->save();
    

    This creates a new config entity called media.settings.yml. We want to alter media.settings and add the new key & value to the end.

Thangvu’s picture

Hi Daniel,

This is a new patch, I deleted some unnecessary in the code. Please check it out

Thang.

Thangvu’s picture

new patch file, deleted some comments.

Thangvu’s picture

DanielVeza’s picture

Here's a mega patch with all changes.

This swaps the sector starter kit over to media library and provides a minor install task to allow older Sector sites to take up the media library if they decide to.

DanielVeza’s picture

Crediting edmonkey & emma_selley for all their internal testing for this change.

  • DanielVeza committed 27429f7 on 8.x-4.x
    Issue #3115487 by Thangvu, DanielVeza, HeikeT, emma_selley, edmonkey:...
DanielVeza’s picture

Status: Needs work » Fixed

Thanks all!

DanielVeza’s picture

Assigned: DanielVeza » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.