don't autoplay videos in notes window #624

This commit is contained in:
Hakim El Hattab 2013-10-28 08:45:14 -04:00
parent 82d2ae654d
commit 8cb3c279b0
2 changed files with 13 additions and 3 deletions

View File

@ -2009,7 +2009,7 @@ var Reveal = (function(){
*/
function startEmbeddedContent( slide ) {
if( slide ) {
if( slide && !isSpeakerNotes() ) {
// HTML5 media elements
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
if( el.hasAttribute( 'data-autoplay' ) ) {
@ -2061,6 +2061,16 @@ var Reveal = (function(){
}
/**
* Checks if this presentation is running inside of the
* speaker notes window.
*/
function isSpeakerNotes() {
return !!window.location.search.match( /receiver/gi );
}
/**
* Reads the current URL (hash) and navigates accordingly.
*/

4
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long