function theme_video_cck_bliptv_flash in Embedded Media Field 5
2 theme calls to theme_video_cck_bliptv_flash()
- video_cck_bliptv_preview in contrib/
video_cck/ providers/ bliptv.inc - video_cck_bliptv_video in contrib/
video_cck/ providers/ bliptv.inc
File
- contrib/
video_cck/ providers/ bliptv.inc, line 236
Code
function theme_video_cck_bliptv_flash($code, $width, $height, $field, $item, $autoplay, $flv, $thumbnail, $options = array()) {
static $count;
if ($code) {
$count++;
$id = isset($options['id']) ? $options['id'] : "emfield_videocck_player_bliptv_{$count}";
$autoplay = $autoplay ? 'autostart=true' : 'autostart=false';
$rss = $item['data']['showpage'] ? "&feedurl={$item['data']['showpage']}/rss" : '';
$post_id = $item['data']['post_id'];
// if/when we allow featured shows to be embedded, this will handle that.
// $file = $item['data']['is_show'] ? "http://$code.blip.tv/rss/flash/" : 'http://blip.tv/rss/flash/'. $item['data']['post_id'];
$file = 'http://blip.tv/rss/flash/' . $item['data']['post_id'];
$embed_file = 'http://blip.tv/scripts/flash/showplayer.swf?' . $autoplay . '&enablejs=true' . $rss . '&file=' . $file . '&showplayerpath=http://blip.tv/scripts/flash/showplayer.swf';
if ($item['data']['video_cck_bliptv_data_version'] == 1) {
// If this is an old version of the data, then we'll attempt to display.
$autoplay = $autoplay ? 'autoStart=true' : 'autoStart=false';
$embed_file = "http://blip.tv/scripts/flash/blipplayer.swf?{$autoplay}&file={$flv}%3Fsource%3D3";
// Now we'll resave the node so the data is saved properly in the future.
// @TODO: Do this in cron, or even in update?
// Query would be something like:
// SELECT nid FROM content_type_video WHERE field_video_provider = 'bliptv' AND field_video_data LIKE '%%"video_cck_bliptv_data_version";i:1;%%';
// except that we don't know types and fields...
if (($node = $options['node']) && $node->nid) {
emfield_operations_reload(array(
$options['node']->nid,
), FALSE);
}
}
$output .= '<object type="application/x-shockwave-flash" data="' . $embed_file . '" width="' . $width . '" height="' . $height . '" allowfullscreen="true" id="' . $id . '"><param name="movie" value="' . $embed_file . '" /><param name="quality" value="best" /><embed src="' . $embed_file . '" quality="best" width="' . $width . '" height="' . $height . '" name="' . $id . '" type="application/x-shockwave-flash"></embed></object>';
}
return $output;
}