mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-08-06 06:38:08 +02:00
dont restart background video when it hasn't changed (fixes #3633)
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
@@ -77,7 +77,7 @@ export default {
|
|||||||
// Enable keyboard shortcuts for navigation
|
// Enable keyboard shortcuts for navigation
|
||||||
keyboard: true,
|
keyboard: true,
|
||||||
|
|
||||||
// Optional function that blocks keyboard events when retuning false
|
// Optional function that blocks keyboard events when returning false
|
||||||
//
|
//
|
||||||
// If you set this to 'focused', we will only capture keyboard events
|
// If you set this to 'focused', we will only capture keyboard events
|
||||||
// for embedded decks when they are in focus
|
// for embedded decks when they are in focus
|
||||||
|
@@ -358,15 +358,17 @@ export default class Backgrounds {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const backgroundChanged = currentBackground !== this.previousBackground;
|
||||||
|
|
||||||
// Stop content inside of previous backgrounds
|
// Stop content inside of previous backgrounds
|
||||||
if( this.previousBackground ) {
|
if( backgroundChanged && this.previousBackground ) {
|
||||||
|
|
||||||
this.Reveal.slideContent.stopEmbeddedContent( this.previousBackground, { unloadIframes: !this.Reveal.slideContent.shouldPreload( this.previousBackground ) } );
|
this.Reveal.slideContent.stopEmbeddedContent( this.previousBackground, { unloadIframes: !this.Reveal.slideContent.shouldPreload( this.previousBackground ) } );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start content in the current background
|
// Start content in the current background
|
||||||
if( currentBackground ) {
|
if( backgroundChanged && currentBackground ) {
|
||||||
|
|
||||||
this.Reveal.slideContent.startEmbeddedContent( currentBackground );
|
this.Reveal.slideContent.startEmbeddedContent( currentBackground );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user