Active
Project:
Flowplayer API
Version:
7.x-1.0-alpha1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Jul 2011 at 09:45 UTC
Updated:
8 Jul 2013 at 19:51 UTC
Bonjour,
I tried in a template like node--NID.tpl.php:
#1 > $video = theme(flowplayer, '/path-to/video.flv');
echo $video;
#2 > $video = theme(flowplayer, array('clip' => array( 'url' => '/path-to/video.flv'),));
echo $video;
#3 > $video = '<a href="/path-to/video.flv" id="player" class="flowplayer"></a>';
flowplayer_add('#player', array(
'clip' => array(
'autoPlay' => FALSE
),
));
echo $video;
The #1 crash my site => display a html page without nothing in the <head> tag.
The #2 displayed well the page but didn't find the video (relative or absolute path). Didn't print any path in the js by the way.
The #3 worked for me.
Maybe I missed something in the use of the theme() function for flowplayer ?
Comments
Comment #1
mototribe commentedhave the same problem, #3 worked, thanks!
Comment #2
djbucci commented+1
Exact same issue as well with exact same symptoms.
Comment #3
ralva83638 commentedI had the same issue using a global php field in a view display, saw this in the sys log:
httpd: PHP Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in /../sites/all/modules/flowplayer/flowplayer.module on line 231
#3 above worked fine.
Comment #4
wolf_22 commentedSO...
theme() isn't working with this or what? Has anyone successfully used theme()? Whenever I use flowplayer_add(), nothing from the flowplayer admin interface seems to carry-over, such as the controls...
Comment #5
j_ten_man commentedThe documentation on the module page must be for Drupal 6 version. Here's the correct way to get this to work based off the 2 examples from above:
In other words, take what you were passing in for the clip, and pass it in as the 'config' key of the array.