aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorBrad Gessler <brad@polleverywhere.com>2013-10-26 20:31:42 -0700
committerBrad Gessler <brad@polleverywhere.com>2013-10-27 12:18:08 -0700
commitd66fe964bc03c000da48dce0c2314936ef492fae (patch)
tree24e8bc58331bff74630e4ecdc722191db36e57b2 /js
parentf1f28f61e608b70f437860e82555e3e4a9abd4b9 (diff)
downloadfosdem-2018-presentation-d66fe964bc03c000da48dce0c2314936ef492fae.tar
fosdem-2018-presentation-d66fe964bc03c000da48dce0c2314936ef492fae.tar.gz
Added support for postMessage's into any iframes for content that needs to do something when a slide is displayed and hidden.
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js
index a1ae5e4..7bc84de 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -2017,6 +2017,11 @@ var Reveal = (function(){
}
} );
+ // iframe embeds
+ toArray( slide.querySelectorAll( 'iframe' ) ).forEach( function( el ) {
+ el.contentWindow.postMessage('slide:start', '*');
+ });
+
// YouTube embeds
toArray( slide.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) {
if( el.hasAttribute( 'data-autoplay' ) ) {
@@ -2041,6 +2046,11 @@ var Reveal = (function(){
}
} );
+ // iframe embeds
+ toArray( slide.querySelectorAll( 'iframe' ) ).forEach( function( el ) {
+ el.contentWindow.postMessage('slide:stop', '*');
+ });
+
// YouTube embeds
toArray( slide.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) {
if( !el.hasAttribute( 'data-ignore' ) && typeof el.contentWindow.postMessage === 'function' ) {