[gnomeweb-wp] use html5 version of youtube player



commit 171bb68dc0abc94dae99d1e5ff77702bc806d95e
Author: Vinicius Depizzol <vdepizzol gmail com>
Date:   Tue Apr 5 21:21:13 2011 -0300

    use html5 version of youtube player

 wp-content/themes/gnome-grass/js/template.js |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/wp-content/themes/gnome-grass/js/template.js b/wp-content/themes/gnome-grass/js/template.js
index 85abb3b..a70ccc4 100644
--- a/wp-content/themes/gnome-grass/js/template.js
+++ b/wp-content/themes/gnome-grass/js/template.js
@@ -78,12 +78,15 @@ $(document).ready(function() {
         
         var href = this.href;
         
+        
         if($(this).hasClass('play_youtube')) {
-            href = this.href.replace(new RegExp("watch\\?v=", "i"), 'v/')  + '&autoplay=1';
+            href = this.href.replace(new RegExp("watch\\?v=", "i"), 'embed/')  + '?autoplay=1&html5=1';
         } else if($(this).hasClass('play_vimeo')) {
             href = this.href.replace(new RegExp("([0-9])","i"),'moogaloop.swf?clip_id=$1') + '&autoplay=1'
         }
         
+        alert(href);
+        
         $.fancybox({
             'padding'       : 10,
             'autoScale'     : false,
@@ -93,8 +96,7 @@ $(document).ready(function() {
             'width'         : 680,
             'height'        : 410,
             'href'          : href,
-            'type'          : 'swf',
-            'swf'           : {'allowfullscreen':'true'},
+            'type'          : 'iframe',
             'hideOnContentClick' : false,
             'hideOnOverlayClick' : false
         });



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]