youtube.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Display Video HTML5 |
| 5 | * |
| 6 | * @since v.1.0.0 |
| 7 | * @author themeum |
| 8 | * @url https://themeum.com |
| 9 | */ |
| 10 | |
| 11 | if ( ! defined( 'ABSPATH' ) ) |
| 12 | exit; |
| 13 | |
| 14 | $video_info = tutor_utils()->get_video_info(); |
| 15 | $youtube_video_id = tutor_utils()->get_youtube_video_id(tutor_utils()->avalue_dot('source_youtube', $video_info)); |
| 16 | |
| 17 | do_action('tutor_lesson/single/before/video/youtube'); |
| 18 | ?> |
| 19 | <div class="tutor-single-lesson-segment tutor-lesson-video-wrap"> |
| 20 | |
| 21 | <div class="plyr__video-embed" id="tutorPlayer"> |
| 22 | <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> |
| 23 | </div> |
| 24 | |
| 25 | </div> |
| 26 | <?php |
| 27 | do_action('tutor_lesson/single/after/video/youtube'); ?> |