Thank you! Works!
My code is not clever at all to adapt various proportions, I’ve just wrap iframe
with WP tags and classes, however I get YouTube 16:9 video fully responsive.
global $es_single_page_instance;
remove_action( 'es_single_video_tab', array( $es_single_page_instance, 'single_video_tab' ) );
add_action( 'es_single_video_tab', 'my_custom_video_tab' );
function my_custom_video_tab() {
global $post;
$es_property = es_get_property( $post->ID );
ob_start(); do_action( 'es_single_tabbed_content_after', 'es-video' ); $content = ob_get_clean();
if ( $es_property->video || $content ) : ?>
<div class="es-tabbed-item es-video" id="es-video">
<h3><?php _e( 'Video', 'es-plugin' ); ?></h3>
<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio">
<div class="wp-block-embed__wrapper">
<?php if ( $es_property->video ) : ?>
<?php echo htmlspecialchars_decode( $es_property->video ); ?>
<?php endif; ?>
</div>
</figure>
<?php echo $content; ?>
</div>
<?php endif;
}
Maybe it would be an incentive to improve Estatik at this point.