don't autoplay videos in notes window #624
This commit is contained in:
parent
82d2ae654d
commit
8cb3c279b0
12
js/reveal.js
12
js/reveal.js
|
@ -2009,7 +2009,7 @@ var Reveal = (function(){
|
||||||
*/
|
*/
|
||||||
function startEmbeddedContent( slide ) {
|
function startEmbeddedContent( slide ) {
|
||||||
|
|
||||||
if( slide ) {
|
if( slide && !isSpeakerNotes() ) {
|
||||||
// HTML5 media elements
|
// HTML5 media elements
|
||||||
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
|
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
|
||||||
if( el.hasAttribute( 'data-autoplay' ) ) {
|
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.
|
* Reads the current URL (hash) and navigates accordingly.
|
||||||
*/
|
*/
|
||||||
|
|
4
js/reveal.min.js
vendored
4
js/reveal.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user