# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: video_filter.codecs.inc
--- video_filter.codecs.inc Base (BASE)
+++ video_filter.codecs.inc Locally Modified (Based On LOCAL)
@@ -77,6 +77,13 @@
     'regexp' => '/gamevideos\.1up\.com\/video\/id\/([0-9]+)/',
     'ratio' => 500 / 319,
   );
+  $codecs['yahoo'] = array(
+    'name' => t('Yahoo Video'),
+    'sample_url' => 'http://video.yahoo.com/watch/5062493/13450565',
+    'callback' => 'video_filter_yahoo',
+    'regexp' => '/video\.yahoo\.com\/watch\/([0-9]+)\/([0-9]+)/i',
+    'ratio' => 512 / 322,
+  );
   $codecs['metacafe'] = array(
     'name' => t('Meta Cafe'),
     'sample_url' => 'http://www.metacafe.com/watch/1234567890/some_title/',
@@ -229,6 +236,33 @@
   return video_filter_flash($video);
 }
 
+function video_filter_yahoo($video) {
+  $video['source'] = 'http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46';
+
+  $params = array(
+    'allowsSriptAccess' => 'always',
+    'bgcolor' => '#000000',
+    'flashvars' => 'id=' . $video['codec']['matches'][2] . '&vid=' . $video['codec']['matches'][1] . '&embed=1',
+  );
+
+  $code = video_filter_flash($video, $params);
+
+  $code = str_replace('type="application/x-shockwave-flash" ', '', $code);
+  $code = str_replace(' data="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46"', '', $code);
+  
+  $attributes = $params;
+  $attributes['src'] = $video['source'];
+  $attributes['type'] = 'application/x-shockwave-flash';
+  $attributes['width'] = $video['width'];
+  $attributes['height'] = $video['height'];
+  $attributes['allowFullScreen'] = empty($video['autoplay']) ? 'false' : 'true';
+
+  $embed = '<embed' . drupal_attributes($attributes) . '/></object>';
+  $code = str_replace('</object>', $embed, $code);
+
+  return $code;
+}
+
 function video_filter_metacafe($video) {
   $video['source'] = 'http://metacafe.com/fplayer/'.$video['codec']['matches'][1].'/'.$video['codec']['matches'][2].'.swf';
 
