? video_filter-62dev-2.patch
Index: video_filter.codecs.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/video_filter/video_filter.codecs.inc,v
retrieving revision 1.3.2.25
diff -u -p -r1.3.2.25 video_filter.codecs.inc
--- video_filter.codecs.inc	20 Mar 2010 12:20:08 -0000	1.3.2.25
+++ video_filter.codecs.inc	15 Jul 2010 21:22:19 -0000
@@ -160,7 +160,6 @@ function video_filter_codec_info() {
     'regexp' => '/picasaweb\.google\.com\/data\/feed\/base\/user\/([a-zA-Z0-9@_\-]+)\/albumid\/([a-z0-9]+)/i',
     'ratio' => 800 / 600,
   );
-
   $codecs['teachertube'] = array(
     'name' => t('Teachertube'),
     'sample_url' => 'http://www.teachertube.com/viewVideo.php?video_id=VIDEOID',
@@ -168,6 +167,13 @@ function video_filter_codec_info() {
     'regexp' => '/teachertube\.com\/viewVideo.php\?video_id\=([0-9]+)/i',
     'ratio' => 16 / 9,
   );
+  $codecs['ooyala'] = array(
+    'name' => t('Ooyala'),
+    'sample_url' => 'http://player.ooyala.com/player.swf?embedCode=d1Z29oMTqqKBoMP4m50UnEE5EQbDEHPT',
+    'callback' => 'video_filter_ooyala',
+    'regexp' => '/player\.ooyala\.com\/player\.(?:swf|js)\?(.+)/i',
+    'ratio' => 480 / 360,
+  );
 
   return $codecs;
 }
@@ -366,3 +372,15 @@ function video_filter_teachertube($video
 
   return video_filter_flash($video, $params);
 }
+
+function video_filter_ooyala($video) {
+  if (strpos($video['codec']['matches'][0], 'player.js') !== FALSE) {
+    $output = '<script src="http://player.ooyala.com/player.js?' . $video['codec']['matches'][1] . '" type="text/javascript"></script>';
+  } else {
+    $video['source'] = 'http://player.ooyala.com/player.swf?' . $video['codec']['matches'][1];
+    $params['flashvars'] = 'embedType=directObjectTag&' . $video['codec']['matches'][1];
+    $output = video_filter_flash($video, $params);
+  }
+
+  return $output;
+}
