Skip to content

Commit

Permalink
Merge pull request #1185 from equalizedigital/dev/pricing-block
Browse files Browse the repository at this point in the history
Dev/pricing block
  • Loading branch information
tronsymphony authored Apr 15, 2024
2 parents aaf20d8 + 137d84a commit a3f8fd7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions template-parts/blocks/video-block/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
$class_name = apply_filters( 'loader_block_class', $class_name, $block, $post_id );
$image_path = get_template_directory_uri() . '/assets/images/';

$video_file_cc = get_field('video_file_cc');

$optional_video_url = get_field('optional_video_url');
$video_path = null;
if($optional_video_url){
Expand All @@ -48,6 +50,8 @@
}




$heading = get_field( 'heading' );
?>

Expand Down Expand Up @@ -89,6 +93,7 @@
<div class="video_block_template_container_media_video">
<video class="video-element video-placeholder" id="video-placeholder" loop autoplay muted>
<source src="<?php echo wp_kses_post( $video_path ); ?>" type="video/mp4">

</video>
<div class="video_block_template_container_media_video_button">
<button class="modal-btn" data-modal="modal_video_block_<?php echo esc_attr( $block_id ); ?>" aria-controls="modal_video_block_<?php echo esc_attr( $block_id ); ?>" aria-expanded="false" aria-haspopup="dialog" aria-label="Play Video">
Expand All @@ -113,6 +118,9 @@
<div class="content">
<video class="video-element video-modal-autoplay" controlslist="nodownload" controls>
<source src="<?php echo wp_kses_post( $video_path ); ?>" type="video/mp4">
<?php if($video_file_cc): ?>
<track src="<?php echo wp_kses_post( $video_file_cc['url'] ); ?>" kind="subtitles" srclang="en" label="English" default>
<?php endif; ?>
</video>
</div>
<button class="close-btn" aria-label="Close Modal">
Expand Down

0 comments on commit a3f8fd7

Please sign in to comment.