Index: ooyala.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ooyala/ooyala.module,v
retrieving revision 1.6
diff -u -r1.6 ooyala.module
--- ooyala.module	12 Nov 2009 04:58:03 -0000	1.6
+++ ooyala.module	24 Nov 2009 18:55:42 -0000
@@ -94,12 +94,14 @@
     ),
     'ooyala_player' => array(
       'arguments' => array(
-        'embededcode' => 0,
+        'embedcode' => NULL,
+        'width' => NULL,
+        'height' => NULL,
       ),
     ),
     'ooyala_thickbox_player' => array(
       'arguments' => array(
-        'embededcode' => 0,
+        'embedcode' => NULL,
       ),
       'template' => 'templates/ooyala-thickbox-player',
     ),
@@ -566,17 +568,21 @@
 /**
  * A public API function used to output an Ooyala player.
  */
-function ooyala_player($embededcode) {
-  print theme('ooyala_thickbox_player', $embededcode);
+function ooyala_player($embedcode, $width = NULL, $height = NULL) {
+  print theme('ooyala_player', $embedcode, $width, $height);
 }
 
 /**
  * Theme function to output an Ooyala video player.
  */
-function theme_ooyala_player($embededcode) {
-  $width = variable_get('ooyala_video_width', 400);
-  $height = variable_Get('ooyala_video_height', 300);
-  return sprintf('<script src="http://www.ooyala.com/player.js?width=%d&height=%d&embedCode=%s"></script>', $width, $height, $embededcode );
+function theme_ooyala_player($embedcode, $width = NULL, $height = NULL) {
+  if (empty($width)) {
+    $width = variable_get('ooyala_video_width', 400);
+  }
+  if (empty($height)) {
+    $height = variable_Get('ooyala_video_height', 300);
+  }
+  return sprintf('<script src="http://www.ooyala.com/player.js?width=%d&height=%d&embedCode=%s"></script>', $width, $height, $embedcode );
 }
 
 /**
@@ -681,7 +687,7 @@
  * Preprocess function for ooyala-thickbox-player.tpl.php.
  */
 function template_preprocess_ooyala_thickbox_player(&$variables) {
-  $variables['playercode'] = theme('ooyala_player', $variables['embededcode']);
+  $variables['playercode'] = theme('ooyala_player', $variables['embedcode'], $variables['width'], $variables['height']);
 }
 
 /**
