← All changes
|
modules/atomic-widgets/elements/atomic-background-video/handlers/background-video-handler.js
+2
-2
4.3.0-beta2
→
trunk
View file →
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | import { register } from '@elementor/frontend-handlers'; |
| 2 | 2 | import { Alpine } from '@elementor/alpinejs'; |
| 3 | -import { getEditorState, isEditorPreview } from './editor-background-video-state'; | |
| 3 | +import { getEditorState, isEditorPreview, resolveDesignTimeState } from './editor-background-video-state'; | |
| 4 | 4 | |
| 5 | 5 | const PLAYING_CLASS = 'e--playing'; |
| 6 | 6 | const PAUSED_CLASS = 'e--paused'; |
| 7 | 7 | // Functional state classes on the root element that drive play/pause button visibility via CSS. |
| @@ -73,9 +73,9 @@ | ||
| 73 | 73 | Alpine.data( `eBackgroundVideo${ elementId }`, () => ( { |
| 74 | 74 | isPlaying: video ? ! video.paused : false, |
| 75 | 75 | isEditor: isEditorPreview(), |
| 76 | 76 | get editorState() { |
| 77 | - return getEditorState( elementId, settings.state || 'playing' ); | |
| 77 | + return getEditorState( elementId, resolveDesignTimeState( settings.state ) ); | |
| 78 | 78 | }, |
| 79 | 79 | |
| 80 | 80 | get previewState() { |
| 81 | 81 | if ( this.isEditor ) { |