embedded.php
3 years ago
external_url.php
3 years ago
html5.php
3 years ago
shortcode.php
3 years ago
video.php
3 years ago
vimeo.php
3 years ago
youtube.php
3 years ago
external_url.php
34 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Display Video HTML5 |
| 4 | * |
| 5 | * @package Tutor\Templates |
| 6 | * @subpackage Single\Video |
| 7 | * @author Themeum <support@themeum.com> |
| 8 | * @link https://themeum.com |
| 9 | * @since 1.0.0 |
| 10 | */ |
| 11 | |
| 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | exit; |
| 14 | } |
| 15 | |
| 16 | $video_info = tutor_utils()->get_video_info(); |
| 17 | $poster = tutor_utils()->avalue_dot( 'poster', $video_info ); |
| 18 | $poster_url = $poster ? wp_get_attachment_url( $poster ) : ''; |
| 19 | |
| 20 | do_action( 'tutor_lesson/single/before/video/external_url' ); |
| 21 | ?> |
| 22 | |
| 23 | <?php if ( $video_info ) : ?> |
| 24 | <div class="tutor-video-player"> |
| 25 | <input type="hidden" id="tutor_video_tracking_information" value="<?php echo esc_attr( json_encode( $jsonData ?? null ) ); ?>"> |
| 26 | <div class="loading-spinner" area-hidden="true"></div> |
| 27 | <video poster="<?php echo esc_url( $poster_url ); ?>" class="tutorPlayer" playsinline controls > |
| 28 | <source src="<?php echo esc_url( tutor_utils()->array_get( 'source_external_url', $video_info ) ); ?>" type="<?php echo esc_attr( tutor_utils()->avalue_dot( 'type', $video_info ) ); ?>"> |
| 29 | </video> |
| 30 | </div> |
| 31 | <?php endif; ?> |
| 32 | |
| 33 | <?php do_action( 'tutor_lesson/single/after/video/external_url' ); ?> |
| 34 |