video play
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
7 changed files
with
20 additions
and
4 deletions
| ... | @@ -25216,8 +25216,16 @@ | ... | @@ -25216,8 +25216,16 @@ |
| 25216 | }; | 25216 | }; |
| 25217 | }); | 25217 | }); |
| 25218 | $$1(document).ready(function ($) { | 25218 | $$1(document).ready(function ($) { |
| 25219 | $('#Modal_Video').on('hidden.bs.modal', function () { | ||
| 25220 | $('#home-video').get(0).pause(); | ||
| 25221 | $('#home-video').get(0).currentTime = 0; | ||
| 25222 | }); | ||
| 25223 | $('#Modal_Video').on('show.bs.modal', function () { | ||
| 25224 | $('#home-video').get(0).currentTime = 0; | ||
| 25225 | $('#home-video').get(0).play(); | ||
| 25226 | }); | ||
| 25219 | $(document).mouseup(function (e) { | 25227 | $(document).mouseup(function (e) { |
| 25220 | var container = $("#wrapper-navbar"); | 25228 | var container = $("#Modal_Video"); |
| 25221 | if (!container.is(e.target) && container.hasClass('show') && container.has(e.target).length === 0) { | 25229 | if (!container.is(e.target) && container.hasClass('show') && container.has(e.target).length === 0) { |
| 25222 | container.removeClass('show'); | 25230 | container.removeClass('show'); |
| 25223 | } | 25231 | } | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -64,7 +64,7 @@ if($video !=""){ ?> | ... | @@ -64,7 +64,7 @@ if($video !=""){ ?> |
| 64 | <div class="modal-body"> | 64 | <div class="modal-body"> |
| 65 | <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> | 65 | <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
| 66 | <div class="body-content"> | 66 | <div class="body-content"> |
| 67 | <video width="100%" controls> | 67 | <video id="home-video" width="100%" controls> |
| 68 | <source src="<?php echo $video;?>" type="video/mp4"> | 68 | <source src="<?php echo $video;?>" type="video/mp4"> |
| 69 | <track src="<?php echo $video_cc;?>" label="English" kind="captions" srclang="en-us" > | 69 | <track src="<?php echo $video_cc;?>" label="English" kind="captions" srclang="en-us" > |
| 70 | Your browser does not support the video tag. | 70 | Your browser does not support the video tag. | ... | ... |
| ... | @@ -40,8 +40,16 @@ document.addEventListener("DOMContentLoaded", function() { | ... | @@ -40,8 +40,16 @@ document.addEventListener("DOMContentLoaded", function() { |
| 40 | }); | 40 | }); |
| 41 | 41 | ||
| 42 | jQuery( document ).ready(function($) { | 42 | jQuery( document ).ready(function($) { |
| 43 | $('#Modal_Video').on('hidden.bs.modal', function () { | ||
| 44 | $('#home-video').get(0).pause(); | ||
| 45 | $('#home-video').get(0).currentTime = 0; | ||
| 46 | }); | ||
| 47 | $('#Modal_Video').on('show.bs.modal', function () { | ||
| 48 | $('#home-video').get(0).currentTime = 0; | ||
| 49 | $('#home-video').get(0).play(); | ||
| 50 | }); | ||
| 43 | $(document).mouseup(function(e){ | 51 | $(document).mouseup(function(e){ |
| 44 | var container = $("#wrapper-navbar"); | 52 | var container = $("#Modal_Video"); |
| 45 | if(!container.is(e.target) && container.hasClass('show') && container.has(e.target).length === 0){ | 53 | if(!container.is(e.target) && container.hasClass('show') && container.has(e.target).length === 0){ |
| 46 | container.removeClass('show'); | 54 | container.removeClass('show'); |
| 47 | } | 55 | } | ... | ... |
| ... | @@ -5,7 +5,7 @@ | ... | @@ -5,7 +5,7 @@ |
| 5 | Author: the Understrap Contributors | 5 | Author: the Understrap Contributors |
| 6 | Author URI: https://github.com/understrap/understrap-child/graphs/contributors | 6 | Author URI: https://github.com/understrap/understrap-child/graphs/contributors |
| 7 | Template: understrap | 7 | Template: understrap |
| 8 | Version: 1.2.0049 | 8 | Version: 1.2.0050 |
| 9 | License: GNU General Public License v2 or later | 9 | License: GNU General Public License v2 or later |
| 10 | License URI: http://www.gnu.org/licenses/gpl-2.0.html | 10 | License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| 11 | Text Domain: understrap-child | 11 | Text Domain: understrap-child | ... | ... |
-
Please register or sign in to post a comment