I am trying to get 1st frame of video displayed instead of flowplayer logo. This is possible to do by setting autoBuffering to true.
Following code works for me:
theme('flowplayer', array(
'clip' => array(
'url' => $video,
'autoPlay' => FALSE, // Turn autoplay off
'autoBuffering' =>TRUE,
),
),
$id, array(
'style' => "width: $width; height: $height",
));
But there is an issue that whole video will be loaded on a page load. To stop loading the whole video we can use script:
var bufferingStopped = false;
function stopbuff () {
if (!bufferingStopped) {
$f().stopBuffering();
bufferingStopped = true;
}
}
$f("player", "flowplayer.swf", {
clip: {
autoBuffering: true,
onStart: function() {
setTimeout(stopbuff, 1000);
}
}
});
from http://flowplayer.org/forum/2/10163
But I couldn't figure out how to make it work in Flowplayer module. I tried something like this:
$out=theme('flowplayer', array(
'clip' => array(
'url' => $video,
'autoPlay' => FALSE, // Turn autoplay off
'autoBuffering' =>TRUE,
'onStart' => ' this.stopBuffering();'
),
),
$id, array(
'style' => "width: $width; height: $height",
));
but function stopBuffering is not recognized. Any ides?
Comments
Comment #1
robloachGreat find! I think we'd need an additional JavaScript file for this to get the eval() to work.
http://flowplayer.org/forum/2/10163#post-17357
Comment #2
aidanlis commentedSubscribe