I needed to process events on playlist items so that I could loop the playlist. By adding the following at line 70 in flowplayer.js I am now able to process those events.

if (config['playlist']) {
jQuery.each(config['playlist'], function(index, clip) {
jQuery.each(clipEvents, function(e_index, event) {
if (typeof(config['playlist'][index][event]) == 'string') {
config['playlist'][index][event] = eval(config['playlist'][index][event]);
}
});
});
}

This may not work for all situations but it does for mine. This has had very limited testing and probably needs more eyes than mine.

CommentFileSizeAuthor
#1 flowplayer.patch927 bytesrobloach

Comments

robloach’s picture

StatusFileSize
new927 bytes

Thanks for the contribution! Is this it? Do you have a test use case? I'd like to stick an example into hook_help().

Anonymous’s picture

I needed the ability to do image banner rotation. By setting the controls height to 0 and using the onBeforeFinish Event on the last item in the playlist I am able to accomplish this.

echo '<div id="ads1" style="display:block;width:200px;height:100px;border:0px;"></div>';
flowplayer_add('#ads1', array(
  'clip' => array( 'autoPlay' => TRUE, 'duration' => 5),
  'plugins' => array('controls' => array( 'all' => FALSE, 'height' => 0)),
  'playlist' => array(
    array( 'url' => '/sites/all/files/adverts_005.png', 'linkUrl' => ''),
    array( 'url' => '/sites/all/files/adverts_015.png', 'linkUrl' => ''),
    array( 'url' => '/sites/all/files/adverts_014.png', 'linkUrl' => '', 'onBeforeFinish' => 'new Function( "return false;" ) ')
  ),
));
jbrown’s picture

Status: Needs review » Reviewed & tested by the community

works for me

please apply

robloach’s picture

Status: Reviewed & tested by the community » Fixed

Thanks a lot for the help guys!

http://drupal.org/cvs?commit=216510

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.