[yelp-xsl] mal2html-page: Autoplay ui:overlay screwed up for image overlays



commit f098d663eeeb08d92382060e5a45eaa7d786fd71
Author: Shaun McCance <shaunm gnome org>
Date:   Fri Nov 2 23:03:38 2012 -0400

    mal2html-page: Autoplay ui:overlay screwed up for image overlays

 xslt/mallard/html/mal2html-page.xsl |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 852fee0..1c3240b 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -1342,7 +1342,8 @@ $(document).ready(function () {
         $('body').append(screen);
       }
       var hideoverlay = function () {
-        media[0].pause();
+        if (media.length > 0)
+          media[0].pause();
         $(document).unbind('keydown.yelp-ui-overlay');
         close.unbind('click');
         screen.unbind('click');
@@ -1373,7 +1374,8 @@ $(document).ready(function () {
       overlay.css({top: $(this).offset().top});
       screen.fadeIn('slow');
       overlay.slideDown('fast', function () {
-        media[0].play();
+        if (media.length > 0)
+          media[0].play();
       });
       return false;
     });



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