Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Assigned an item for thumbnail, but it doesn't load. I went poking through the module code and am unsure if this is a bug. In the videojs.theme.inc file:
foreach ($items as $item) {
if (!isset($codecs[$item['filemime']])) {
// check for image file and add in it as poster
$image = file_validate_is_image((object) $item);
if (empty($image)) {
$vars['poster'] = file_create_url($item['uri']);
}
// Skip unplayable items.
continue;
}
$item['videotype'] = $codecs[$item['filemime']];
$vars['items'][] = $item;
}
It seems like it's checking for a poster image (it was finding mine), but then ignoring the results.
I was able to get it working on my end by changing line 36 to:
if (!empty($image)) {
I am still fairly new to Drupal and haven't reviewed the whole module's code in detail, so I apologize in advance if I'm maybe just not using it correctly.
Comments
Comment #1
threegSorry, I was too quick to post. After looking at it a bit longer, I believe I'm just using it incorrectly.
Comment #2
Jorrit CreditAttribution: Jorrit commentedNo problem. In the -dev version, the process of determining whether a file is an image has been simplified.