mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-08-05 22:27:37 +02:00
don't start video bgs if autoPlayMedia config is set to false
This commit is contained in:
2
dist/reveal.esm.js
vendored
2
dist/reveal.esm.js
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.esm.js.map
vendored
2
dist/reveal.esm.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.js
vendored
2
dist/reveal.js
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.js.map
vendored
2
dist/reveal.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -268,14 +268,15 @@ export default class Backgrounds {
|
|||||||
*/
|
*/
|
||||||
update( includeAll = false ) {
|
update( includeAll = false ) {
|
||||||
|
|
||||||
|
let config = this.Reveal.getConfig();
|
||||||
let currentSlide = this.Reveal.getCurrentSlide();
|
let currentSlide = this.Reveal.getCurrentSlide();
|
||||||
let indices = this.Reveal.getIndices();
|
let indices = this.Reveal.getIndices();
|
||||||
|
|
||||||
let currentBackground = null;
|
let currentBackground = null;
|
||||||
|
|
||||||
// Reverse past/future classes when in RTL mode
|
// Reverse past/future classes when in RTL mode
|
||||||
let horizontalPast = this.Reveal.getConfig().rtl ? 'future' : 'past',
|
let horizontalPast = config.rtl ? 'future' : 'past',
|
||||||
horizontalFuture = this.Reveal.getConfig().rtl ? 'past' : 'future';
|
horizontalFuture = config.rtl ? 'past' : 'future';
|
||||||
|
|
||||||
// Update the classes of all backgrounds to match the
|
// Update the classes of all backgrounds to match the
|
||||||
// states of their slides (past/present/future)
|
// states of their slides (past/present/future)
|
||||||
@@ -373,8 +374,9 @@ export default class Backgrounds {
|
|||||||
previousVideoParent.appendChild( currentVideo );
|
previousVideoParent.appendChild( currentVideo );
|
||||||
currentVideoParent.appendChild( previousVideo );
|
currentVideoParent.appendChild( previousVideo );
|
||||||
|
|
||||||
// Resume playing if the previous video was playing
|
if( config.autoPlayMedia !== false ) {
|
||||||
previousVideo.play();
|
previousVideo.play();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user