This is a small patch that lets JW Player show thumbnails created by the Video module. To actually use D7 JW Player with the Video module then the Video module needs another patch detailed at #Using JW Player.

CommentFileSizeAuthor
video_thumbs-1.patch1.13 KBDippers
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dippers’s picture

Comment removed

rickvug’s picture

Status: Needs review » Postponed

Thank you for the patch Dippers. Before implementing support for images provided by Video module I'd like to have a pluggable system to work out where the preview image (ie. "poster") should come from. See #1395584: Provide image poster (with configuration to select the source) for the issue. For the moment I have updated the tpl file to use a poster, should one exist. Other modules can step into the preprocess stage as needed so it could even be possible to implement this in video if one wanted.

For now I'm going to call this postponed until there's a patch and way forward at #1395584: Provide image poster (with configuration to select the source). I'd be happy to have your input and patches to drive the effort forward.

andypost’s picture

Suppose "pluggin-way" for this is a useless complexity. I think better to implement a few alter|preprocess functions to provide integration for core, file entity and video modules

rickvug’s picture

@andypost I think you may be right that implementing (or providing) hooks may be a simpler and easier way to get this done.

andypost’s picture

@rickvug Video module now supports Jw player
So you can update the module page about it

TODO
- update docs about using poster image see #1398388-2: Using JW Player
- probably implement a variable with default preset to be used in this kind of integrations (currently custom module should load preset because presets are loaded in the module preprocess

tokonowaka’s picture

function mymodule_preprocess_jw_player(&$variables) {
	if(isset($variables['file_object']->thumbnailfile)) $variables['config']['image'] = file_create_url($variables['file_object']->thumbnailfile->uri);
}

this works for me.

tokonowaka’s picture

Issue summary: View changes

Added cross link

ron_s’s picture

Issue summary: View changes
Status: Postponed » Closed (duplicate)

All new development is occurring in 7.x-2.x, and preview images are already included.

Please download 7.x-2.x-dev, apply the following patches, and test. We'd appreciate any feedback. Thanks.

* Refactor theming: https://www.drupal.org/node/2713725
* Add not empty checks and Repeat option: https://www.drupal.org/node/2719995
* Add js file to build player: https://www.drupal.org/node/2719977