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
youtube.php
36 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 | $disable_default_player_youtube = tutor_utils()->get_option('disable_default_player_youtube'); |
| 17 | $video_info = tutor_utils()->get_video_info(); |
| 18 | $youtube_video_id = tutor_utils()->get_youtube_video_id(tutor_utils()->avalue_dot('source_youtube', $video_info)); |
| 19 | |
| 20 | do_action('tutor_lesson/single/before/video/youtube'); |
| 21 | ?> |
| 22 | |
| 23 | <?php if($youtube_video_id ): ?> |
| 24 | <div class="tutor-video-player"> |
| 25 | <div class="loading-spinner" area-hidden="true"></div> |
| 26 | <div class="<?php echo $disable_default_player_youtube ? 'plyr__video-embed tutorPlayer' : 'tutor-ratio tutor-ratio-16x9'; ?>"> |
| 27 | <?php if (!$disable_default_player_youtube): ?> |
| 28 | <iframe src="https://www.youtube.com/embed/<?php echo $youtube_video_id; ?>" frameborder="0" allowfullscreen allowtransparency allow="autoplay"></iframe> |
| 29 | <?php else: ?> |
| 30 | <iframe src="https://www.youtube.com/embed/<?php echo $youtube_video_id; ?>?&iv_load_policy=3&modestbranding=1&playsinline=1&showinfo=0&rel=0&enablejsapi=1" allowfullscreen allowtransparency allow="autoplay"></iframe> |
| 31 | <?php endif; ?> |
| 32 | </div> |
| 33 | </div> |
| 34 | <?php endif; ?> |
| 35 | |
| 36 | <?php do_action('tutor_lesson/single/after/video/youtube'); ?> |