Problem/Motivation

As discussed in #2699983: Update modules to current releases MEEV has been deprecated in favour of VEF. The video_embed_media (VEF sub-module) has a script which converts the bundle and content to the new format, if that is useful to lightning.

Proposed resolution

Add VEF in favour of MEEV.

Remaining tasks

Patch.

User interface changes

Support for YouTube + Vimeo out the box instead of YouTube, Aol, Grab Networks and Wotchit.

API changes

None. Same fields are supported.

Data model changes

Updated bundle type. Updated field name.

Comments

Sam152 created an issue. See original summary.

balsama’s picture

Assigned: Unassigned » phenaproxima
phenaproxima’s picture

Status: Active » Needs review

Ready for review in the 8.x-vef branch.

balsama’s picture

Status: Needs review » Needs work

I tested updating from RC4.

1) I'm unable to create new video media entities and get the following fatal in my apache log:
PHP Fatal error: Call to a member function downloadThumbnail() on a non-object in /docroot/profiles/lightning/modules/contrib/video_embed_field/modules/video_embed_media/src/Plugin/MediaEntity/Type/VideoEmbedField.php on line 51

2) The Label for the field in the video bundle is "Video URL". We used to support URLs and embed codes. Do we only support URLs now?

phenaproxima’s picture

1) I was seeing those, but I thought I fixed them all. Can you provide exact steps to reproduce?

2) We are supporting whatever Video Embed Field supports; looks like that is URLs only. At least, that is what VEF's out-of-the-box plugins support. It's really up to the individual provider plugins. I can ask @Sam152 if this is a regression, but my knee-jerk imagining is that VEF would support at least whatever MEEV did.

balsama’s picture

Hmm as far as #1, the steps were just

  1. install from RC4
  2. update to the VEF branch
  3. run drupash updb
  4. Attempt to create a Video Media Entity

If you try to create a video from the Media Library, the widget just hands and there is a 500 in the console. If you try to create from /media/add, you get a WSOD. Both methods had the same error (above) in the apache logs. I had two or three video entities in the database prior to updating to the VEF branch.

I can make sure this is reproducible once I'm on the ground in NOLA.

As far as #2, we'll just need to update some of our messaging around URLs. The Media Library Widget instructs users to paste the URL _or_ the Embed Code.

sam152’s picture

I can confirm that pasting embed codes isn't currently supported. If support was necessarily, all you would need to do is extend the provider and update the ::getIdFromInput method to extract the ID from the embed instead of the URL.

As far as the first issue is concerned, it simply looks like IDs can't be extracted from the existing media entities after the upgrade. This could be for a few reasons:

  1. It could be for a provider that no longer exists (YouTube + Vimeo out the box instead of YouTube, Aol, Grab Networks and Wotchit).
  2. The way the IDs are extracted could be different and thus aren't able to handle your specific URLs.
  3. You have used the embed code which isn't currently supported.

Solution: either track down this problem or make the existing code more resilient as to not fail when this situation is encountered (with a corresponding CR outlining the changes).

phenaproxima’s picture

I am reproducing @balsama's issue. Will look into this and correct it.

phenaproxima’s picture

Status: Needs work » Needs review

Nice catch, @balsama! Fixed in the 8.x-vef branch, and manually tested.

balsama’s picture

Status: Needs review » Reviewed & tested by the community

Cool. Everything works as expected this time for me too.

Testing Steps:

  1. Install RC4
  2. Create a few video entities
  3. update codebase to 8.x-vef
  4. run `drush updb`

Result:

  • Can create new Video Media as expected
  • Existing video entities display as expected

Caveats (might warrant their own issues)

  • Embedded video's width are now only constrained by parent element - used be arbitrarily constrained. (This is a good thing, just might need to document it somewhere)
  • Preview of embedded video expands outside of media library widget
  • Media Library "Create Embed" tab instructions read "Enter URL or Embed Code...", but videos (specifically(?)) only support URLs, not embeds

We should open followup issues as appropriate.

Thanks @phenaproxima and @Sam152!

  • balsama committed 810f2c3 on 8.x-1.x authored by phenaproxima
    Issue #2700399 by phenaproxima: Replace media_entity_embeddable_video...
balsama’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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