[yelp-xsl] mal2html-page: Auto-play/pause media in ui:overlay
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] mal2html-page: Auto-play/pause media in ui:overlay
- Date: Fri, 2 Nov 2012 22:21:55 +0000 (UTC)
commit 3eb52fb29ad2553c0a226916c0a08d52c707094d
Author: Shaun McCance <shaunm gnome org>
Date: Fri Nov 2 18:21:37 2012 -0400
mal2html-page: Auto-play/pause media in ui:overlay
xslt/mallard/html/mal2html-page.xsl | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 7e3b2b9..852fee0 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -1335,12 +1335,14 @@ $(document).ready(function () {
var overlay = $(this).parent('div').children('div.ui-overlay');
var inner = overlay.children('div.inner');
var close = inner.children('a.ui-overlay-close');
+ var media = inner.find('audio, video');
var screen = $('div.ui-screen');
if (screen.length == 0) {
screen = $('<div class="ui-screen"></div>');
$('body').append(screen);
}
var hideoverlay = function () {
+ media[0].pause();
$(document).unbind('keydown.yelp-ui-overlay');
close.unbind('click');
screen.unbind('click');
@@ -1370,7 +1372,9 @@ $(document).ready(function () {
});
overlay.css({top: $(this).offset().top});
screen.fadeIn('slow');
- overlay.slideDown('fast');
+ overlay.slideDown('fast', function () {
+ media[0].play();
+ });
return false;
});
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]