Closed (fixed)
Project:
FlashVideo
Version:
6.x-1.5-beta2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2008 at 22:38 UTC
Updated:
14 Mar 2009 at 05:15 UTC
Hi,
Thanks for this wonderful module, which has recently made me a lot of friends at work. I'd just like to offer this theming function I'm using in zen right now to insert the video in a fashion that passes http://validator.w3.org/ . So far, this seems to be working, but I've only had a chance to test it on IE 6/7 and FF 2.
Based heavily off this very useful bit of code.
function zen_flashvideo_play_flash($video) {
// Get the FlashVars for this video.
$flashvars = htmlspecialchars(flashvideo_get_flashvars($video));
// Creates an absolute path for the player.
$loader_path = htmlspecialchars(check_url(file_create_url(flashvideo_variable_get($video['nodetype'], 'player', 'Player.swf'))));
// Get the window mode
$wmode = '';
$wmode_param = '';
switch(flashvideo_variable_get($video['nodetype'], 'mode', 'window')) {
case 'transparent':
$wmode = ' wmode="transparent"';
$wmode_param = '<param name="wmode" value="transparent" />';
break;
case 'window':
$wmode = ' wmode="window" allowfullscreen="true"';
$wmode_param = '<param name="wmode" value="window" /><param name="allowfullscreen" value="true" />';
break;
}
$output .= '<object type="application/x-shockwave-flash"
data="' . $loader_path . '?' . $flashvars . '"
width="' . $video['width'] . '" height="' . $video['height'] . '">';
$output .= '<param name="movie" value="' . $loader_path . '?' . $flashvars . '" />';
$output .= '<param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" />';
$output .= '<param name="quality" value="high" />';
$output .= $wmode_param;
$output .= '</object>';
$output = theme( 'flashvideo_format_play', $video, $output, t('http://www.macromedia.com/go/getflashplayer'),
t('Link to Macromedia Flash Player Download Page'),
t('Download latest Flash Player'));
return $output;
}
My apologies if the issue queue is the wrong place for this.
Comments
Comment #1
attheshow commentedVersion 6.x of the module now uses templates. Users can change the displayed code to whatever they like.