| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
|
| 6 |
$bppiv_block = call_user_func( function() use ( $get_value, $bppiv_meta, $bppiv_width ) { |
| 7 |
return [ |
| 8 |
"blockName" => "panorama/video-360", |
| 9 |
"attrs" => [ |
| 10 |
"videoUrl" =>$get_value('bppiv_video_src', false, 0, 'url'), |
| 11 |
"options" => [ |
| 12 |
"autoplay" => $get_value('bppiv_video_autoplay', true, true), |
| 13 |
"loop" => $get_value('bppiv_video_loop', true, true), |
| 14 |
"play" => $get_value('video_play_pause_ctrl', true, true), |
| 15 |
"progress" => $get_value('video_progress_ctrl', true, true), |
| 16 |
"volume" => $get_value('video_volume_ctrl', true, true), |
| 17 |
"remainingTime" => $get_value('video_remaining_time_ctrl', true), |
| 18 |
"pip" => $get_value('video_pip_ctrl', true), |
| 19 |
"fullscreen" => $get_value('video2_fullscreen_ctrl', true), |
| 20 |
"playbackSpeed" => $get_value('video_playback_speed_ctrl', true), |
| 21 |
"initialView" => $get_value('initial_view_video', true), |
| 22 |
"initialPosition" => [ |
| 23 |
"x" => (float)$get_value('initial_view_video_property', false, 0, 'top'), |
| 24 |
"y" => (float)$get_value('initial_view_video_property', false, 0, 'right'), |
| 25 |
"z" => (float)$get_value('initial_view_video_property', false, 0, 'bottom') |
| 26 |
] |
| 27 |
], |
| 28 |
"layout" => [ |
| 29 |
"alignSl" => [ |
| 30 |
"desktop" =>$bppiv_meta['bppiv_alignment'] ?? "center", |
| 31 |
"tablet" => $bppiv_meta['bppiv_alignment'] ?? "center", |
| 32 |
"mobile" => $bppiv_meta['bppiv_alignment'] ?? "center" |
| 33 |
], |
| 34 |
"width" => [ |
| 35 |
"desktop" => $bppiv_width, |
| 36 |
"tablet" => $bppiv_width, |
| 37 |
"mobile" => $bppiv_width |
| 38 |
] |
| 39 |
] |
| 40 |
], |
| 41 |
"innerBlocks" => [], |
| 42 |
"innerHTML" => "", |
| 43 |
"innerContent" => [] |
| 44 |
]; |
| 45 |
} ); |