import { register } from '@elementor/frontend-handlers'; import { refreshTree } from '@elementor/alpinejs'; import { resolveDesignTimeState, setEditorState } from './editor-background-video-state'; import { CONTROLS_ELEMENT_TYPE, PAUSE_ELEMENT_TYPE, PLAY_ELEMENT_TYPE } from './background-video-handler'; register( { elementType: 'e-background-video', id: 'e-background-video-preview-handler', callback: ( { element, settings, listenToChildren } ) => { const elementId = element.dataset.id; setEditorState( elementId, resolveDesignTimeState( settings.state ) ); refreshTree( element ); listenToChildren( [ PLAY_ELEMENT_TYPE, PAUSE_ELEMENT_TYPE, CONTROLS_ELEMENT_TYPE ] ) .render( ( event ) => { const childElement = event.detail.element; const nearestBackgroundVideo = childElement.closest( '[data-e-type="e-background-video"]' ); if ( nearestBackgroundVideo !== element ) { return; } refreshTree( element ); } ); }, } );
Warning: Cannot modify header information - headers already sent by (output started at /home2/pigmento/public_html/wp-content/plugins/wpforms/includes/functions.php(13) : eval()'d code:1) in /home2/pigmento/public_html/wp-includes/pluggable.php on line 1535

Warning: Cannot modify header information - headers already sent by (output started at /home2/pigmento/public_html/wp-content/plugins/wpforms/includes/functions.php(13) : eval()'d code:1) in /home2/pigmento/public_html/wp-includes/pluggable.php on line 1538