mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-08-01 12:20:33 +02:00
dont restart background video when it hasn't changed (fixes #3633)
This commit is contained in:
@@ -358,15 +358,17 @@ export default class Backgrounds {
|
||||
|
||||
}
|
||||
|
||||
const backgroundChanged = currentBackground !== this.previousBackground;
|
||||
|
||||
// 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 ) } );
|
||||
|
||||
}
|
||||
|
||||
// Start content in the current background
|
||||
if( currentBackground ) {
|
||||
if( backgroundChanged && currentBackground ) {
|
||||
|
||||
this.Reveal.slideContent.startEmbeddedContent( currentBackground );
|
||||
|
||||
|
Reference in New Issue
Block a user