Hi,
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)),
);
template_preprocess_videojs($vars);
The failing views integration seemed like a bug to me, though I didn't do a deep-drive.
Comments
Comment #1
berliner commentedAnother 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.
Comment #2
roball commentedI 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?
Comment #3
roball commented