Index: flvmediaplayer.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/flvmediaplayer/flvmediaplayer.module,v retrieving revision 1.14.2.52.2.20.2.26 diff -u -p -r1.14.2.52.2.20.2.26 flvmediaplayer.module --- flvmediaplayer.module 14 May 2009 17:52:29 -0000 1.14.2.52.2.20.2.26 +++ flvmediaplayer.module 18 May 2009 14:01:36 -0000 @@ -785,32 +785,36 @@ function flvmediaplayer_build_embed_code $dimensions = ($params['width'] ? ' width="'. $params['width'] .'" ' : '') . ($params['height'] ? ' height="'. $params['height'] .'"' :''); // build the object structure $html = ''; + // now build out any parameters + $data = array(); if ($params) { - foreach ($params as $name => $param) { - $html .= ''; + foreach ($params as $name => $value) { + $html .= ''; + $data[] = $name .'="'. $value.'"'; } } - + // create the flashvars - $data = array(); + $all_flashvars = array(); if ($flashvars) { foreach ($flashvars as $name => $value) { - $data[] = $name .'='. $value; + $all_flashvars[] = $name .'='. $value; } - } - // get all the options - if (count($data)) { - $vars = 'flashvars="'. implode('&', $data) .'" '; + $data[] = 'flashvars="'. implode('&', $all_flashvars) .'"'; } + // combine all the options + if (count($data)) { + $params = implode(' ', $data); + } + // create the flashvars in the object - $html .= ''; + $html .= ''; $html .= ''; return $html; } - /** * Insert the player into the node body. * @ TODO make this a filter function