embedded.php
6 years ago
external_url.php
6 years ago
html5.php
6 years ago
video.php
6 years ago
vimeo.php
6 years ago
youtube.php
6 years ago
youtube.php
40 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 | <div class="tutor-single-lesson-segment tutor-lesson-video-wrap"> |
| 23 | |
| 24 | <?php |
| 25 | if ($disable_default_player_youtube){ |
| 26 | ?> |
| 27 | <div class="tutor-video-embeded-wrap"> |
| 28 | <iframe src="https://www.youtube.com/embed/<?php echo $youtube_video_id; ?>" frameborder="0" allowfullscreen allowtransparency allow="autoplay"></iframe> |
| 29 | </div> |
| 30 | <?php |
| 31 | }else{ |
| 32 | ?> |
| 33 | <div class="plyr__video-embed" id="tutorPlayer"> |
| 34 | <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> |
| 35 | </div> |
| 36 | <?php } ?> |
| 37 | |
| 38 | </div> |
| 39 | <?php |
| 40 | do_action('tutor_lesson/single/after/video/youtube'); ?> |