Just wondering if anybody has used Adsolution (longtailvideo.com, home of jwflv) with jw flv player and drupal, in particular with xspf playlist. Looking for a way to create pre/mid/post roll content that is both created inhouse and delivered by their cdn.

Since the hard part with drupal is the playlists, it doesn't seem like Adsolution would be much use without something like xspf playlist to auto generate node playlists.

Comments

mrfelton’s picture

I have got AdSolution integration working with a flvmediaplayer, media_mover, xspf_playlist setup on this site: http://www.crescentmedia.tv/en. It only took a little customisation, most of which was at the theme layer and basically consisted with overriding theme_flvmediaplayer_render_player to get a correctly named containing div for swfobject_api, a couple of extra flashvars, and embeding the unique LongTail JavaScript for my AdSoltion account:

function mytheme_flvmediaplayer_render_player($player_path, $params, $flashvars) {
  $js_file = 'http://www.ltassrv.com/serve/api5.4.asp?d=16903&s=15935&c=12159&v=1';
  $script .= 'document.write(unescape("%3Cscript src=\''. $js_file .'\' type=\'text/javascript\'%3E%3C/script%3E"));';
  drupal_add_js($script, 'inline', 'footer');

  $flashvars['plugins'] = "ltas";
  $flashvars['channel'] = "default";
  $params['wmode'] = "transparent"; 
  $output = theme('swfobject_api', $player_path, $params, $flashvars);
  
  // wrap it in the special add div
  $output = "<div id='mediaspace' name='mediaspace'>".$output."</div>";
  return $output;
}

Ideally, the location of the JavaScript would be extracted to a configuration page to make it easer to change, and to allow for the possibility of using more than one AdSolution channel.