I have recently installed this module and tried to figure out how to display an html video using the views style plugin. After some confusion on why I didn't see any output I found, that in line 110 of the file videojs_style_plugin.inc a theme call to theme('videojs_view_playlist', $view, $items) is made, but there is no implementation of this template or theme function in hook_theme(). When I changed that call to theme('videojs_view', $view, $items) my view finally yielded results. For a correct display I then had to add the following lines to the function template_preprocess_videojs_view():

$vars['attributes'] =  array(
    'width' => intval(variable_get('videojs_width', 640)),
    'height' => intval(variable_get('videojs_height', 264)),

The failing views integration seemed like a bug to me, though I didn't do a deep-drive.

#1 views-integration-1747890-1.patch3 KBberliner
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


berliner’s picture

Status: Active » Needs review
3 KB
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es). View

Another problem I have found is the cck formatter that doesn't seem to work in a views context with field output.
To reproduce it:
1. Create a node type with a filefield.
2. Create a view of type node and filter for the created node type.
3. Change row style to fields
4. Add the filefield and choose as a formatter VideoJS

For me this results in the field label being printed but without the player.

I have looked a little into the module and came up with the attached patch that solves the problem for me and fixes in the same time a little issue I had with the preprocess functions. It doesn't seem standard to me that you have used template_preprocess_* functions instead of ones prefixed with the module name, but I can be wrong on this.

roball’s picture

Version: 6.x-2.2 » 6.x-2.3

I think we first have to solve the problem with the template files addressed in #1102046: Make template overridable by theme: currently, there are 3 theme hooks registered, but all use the same template file. That cannot work. One of these theme hooks is even not necessary at all. My patch at #18 removes the unneeded hook and separates the remaining 2 into having one dedicated template file per hook, with correct names.

Once that patch gets committed, can you please review your patch?

roball’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)