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