aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/video_helper.inc2
-rw-r--r--theme/video-play-flv.tpl.php9
-rw-r--r--theme/video-play-html5.tpl.php4
-rw-r--r--video_formatter.inc16
4 files changed, 13 insertions, 18 deletions
diff --git a/includes/video_helper.inc b/includes/video_helper.inc
index 63d6f61..9f3ae2e 100644
--- a/includes/video_helper.inc
+++ b/includes/video_helper.inc
@@ -49,7 +49,7 @@ class video_helper {
$video->player_height = trim($player_dimensions[1]);
// load thumbnail object
$video->thumbnail = $this->thumbnail_object($variables);
-// $video->formatter = $variables['#formatter'];
+ $video->formatter = $variables['instance']['display']['default']['type'];
$video->autoplay = variable_get('video_autoplay', FALSE);
$video->autobuffering = variable_get('video_autobuffering', TRUE);
$video->theora_player = variable_get('video_ogg_player', 'http://theora.org/cortado.jar');
diff --git a/theme/video-play-flv.tpl.php b/theme/video-play-flv.tpl.php
index c895c8d..418fec2 100644
--- a/theme/video-play-flv.tpl.php
+++ b/theme/video-play-flv.tpl.php
@@ -1,13 +1,14 @@
-<?php
+<?php
+
/*
* @file
* Theme file to handle flv output.
- *
+ *
* Variables passed.
* $video is the video object.
* $node is the node object.
* $themed_output is the rendered html.
- *
+ *
*/
-print $themed_output;
+echo ($variables['themed_output']->themed_output);
?> \ No newline at end of file
diff --git a/theme/video-play-html5.tpl.php b/theme/video-play-html5.tpl.php
index cb4d51a..62a474e 100644
--- a/theme/video-play-html5.tpl.php
+++ b/theme/video-play-html5.tpl.php
@@ -26,7 +26,7 @@
<?php $videojs_sources .= "<source src=\"$filepath\" type='$mimetype; codecs=\"" . $codecs[$mimetype] . "\"' />"; ?>
<?php endif; ?>
<?php endforeach; ?>
-<?php print $videojs_sources; ?>
+ <?php print $videojs_sources; ?>
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
-<?php //echo theme('video_flv', (array)$video, array()); ?>
+ <?php echo theme('video_flv', array('video' => $video)); ?>
</video> \ No newline at end of file
diff --git a/video_formatter.inc b/video_formatter.inc
index 0be14f8..f29edd4 100644
--- a/video_formatter.inc
+++ b/video_formatter.inc
@@ -162,7 +162,8 @@ function theme_video_encoding_failed() {
return '<div class="video-ffmpeg-helper-encoding-failed">' . t('The video conversion process has failed. You might want to submit a simpler video format like <em>mpeg</em> or <em>divx avi</em>.<br />If the problem persists please contact website administrators.') . '</div>';
}
-function theme_video_flv($video, $node) {
+function theme_video_flv($video) {
+ $video = (object) $video;
if ($video->flash_player == 'swftools') {
$options = array(
'params' => array(
@@ -177,7 +178,7 @@ function theme_video_flv($video, $node) {
$themed_output = swf($video->files->{$video->player}->url, $options);
} elseif ($video->flash_player == 'flowplayer') {
// kjh: use a playlist to display the thumbnail if not auto playing
- if (!$video->autoplay && $video->thumbnail->url) {
+ if (isset($video->autoplay) && isset($video->thumbnail->url)) {
$options = array(
'playlist' => array($video->thumbnail->url,
array('url' => urlencode($video->files->{$video->player}->url),
@@ -191,18 +192,11 @@ function theme_video_flv($video, $node) {
'autoBuffering' => $video->autobuffering,
),);
}
-
- $themed_output = theme(
- 'flowplayer',
- $options,
- $video->formatter,
- // adding 24px to height #973636
- array('style' => 'width:' . $video->player_width . 'px;height:' . ($video->player_height + 24) . 'px;')
- );
+ $themed_output = theme('flowplayer', array('config' => $options, 'id' => 'flowplayer-' . $video->formatter, 'attributes' => array('style' => 'width:' . $video->player_width . 'px;height:' . ($video->player_height + 24) . 'px;')));
} else {
$themed_output = t('No flash player has been setup. ' . l(t('Please select a player to play Flash videos.'), 'admin/settings/video/players'));
}
- return theme('video_play_flv', $video, $node, $themed_output);
+ return theme('video_play_flv', array('video' => $video, 'themed_output' => $themed_output));
}
/**