Problem/Motivation

When a video image is changed using Brightcove UI, the change is never detected and projected to Drupal - video_embed_field module doesn't update the video thumbnail. For that reason, the old thumbnail is displayed, even if the new image is available.

Steps to reproduce

1. Create video media with Brightcove URL and embed it to a node - current image is rendered.
2. Change the video image using Brightcove UI.
3. Keep clearing caches or anything else - there is no way to refresh it for editors.

Proposed resolution

A. When the video media is edited inside Drupal, refresh the thumbnail image.
B. Or/And probably a better option, provide a "Refresh thumbnail" button (e.g. between "Operations").

Remaining tasks

1. Implement variant A - done
2. Implement variant B
3. Review, test, and consider which one to merge.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kyberman created an issue. See original summary.

kyberman’s picture

Status: Active » Needs review
shreyal999’s picture

Status: Needs review » Needs work

Hey @kyberman
I looked into the above MR, the one thing that can be improved here is, this hook executes and delete the media thumbnail every time the Media entity is saved, instead it should remove thumbnail only when the brightcove path is changed or either the thumbnail is changed at brightcove panel. As removing it every time and generating it looks like an overhead to the process.

kyberman’s picture

Hi @shreyal999,

Thank you for your feedback. Yes, the media thumbnail is updated every time the entity is saved, but I can't imagine a situation when that really happens often. I would say media is resaved only ocasionaly, but I could be wrong.

The proposed "only when the brightcove path is changed or either the thumbnail is changed at brightcove panel" means there would need to be a cron task or something to regularly check if something was changed in Brightcove, am I right? If this is the case, the presave hook sounds much cleaner to me.

Best regards
Vit