Initial Commit N° : 003 - V.4.3.5
This commit is contained in:
+18
-25
@@ -340,6 +340,8 @@ $('body').on('click', "a.product-video-popup", function(e) {
|
||||
closeOnVerticalDrag:false
|
||||
};
|
||||
|
||||
$('body').trigger('nasa_media_all_pause');
|
||||
|
||||
if (productVideo) {
|
||||
var embedUrl = nasa_ember_link(productVideo);
|
||||
items.push({
|
||||
@@ -388,11 +390,7 @@ $('body').on('nasa_after_single_product_slick_inited', function(ev, _thumbs, _nu
|
||||
var _this = $(this);
|
||||
$('body').trigger('nasa_check_slick_disabled', [_this]);
|
||||
|
||||
$('.nasa-single-product-slide .nasa-single-product-main-image video').each(function() {
|
||||
if (!this.paused) {
|
||||
this.pause();
|
||||
}
|
||||
});
|
||||
$('body').trigger('nasa_media_all_pause');
|
||||
});
|
||||
|
||||
if (_thumbs) {
|
||||
@@ -1501,19 +1499,12 @@ $('body').on('click','.main_min_img, .woocommerce-product-gallery__wrapper .main
|
||||
});
|
||||
|
||||
gallery.listen('beforeChange', function() {
|
||||
$('video').each(function() {
|
||||
if (!this.paused) {
|
||||
this.pause();
|
||||
}
|
||||
});
|
||||
$('body').trigger('nasa_media_all_pause');
|
||||
});
|
||||
|
||||
gallery.listen('close', function (index, item) {
|
||||
$('video').each(function() {
|
||||
if (!this.paused) {
|
||||
this.pause();
|
||||
}
|
||||
});
|
||||
$('body').trigger('nasa_media_all_pause');
|
||||
$(pswpElement).remove();
|
||||
});
|
||||
|
||||
gallery.init();
|
||||
@@ -1595,6 +1586,9 @@ $('body').on('click','.commentlist .nasa-wrap-review-thumb .nasa-item-review-thu
|
||||
})
|
||||
|
||||
$('body').addClass('ovhd');
|
||||
|
||||
$('body').trigger('nasa_media_all_pause');
|
||||
|
||||
$('body').trigger('nasa_reload_slick_slider_private', $('.nasa-slide-popup-review'));
|
||||
$('.nasa-slide-popup-review').addClass('nasa-active');
|
||||
|
||||
@@ -1605,10 +1599,13 @@ $('body').on('click','.commentlist .nasa-wrap-review-thumb .nasa-item-review-thu
|
||||
// }
|
||||
|
||||
$('.nasa-slide-popup-review >.nasa-slick-slider').on('beforeChange', function(event, slick, currentSlide) {
|
||||
var _videos = $('.nasa-slide-popup-review').find('.ns-video-review');
|
||||
_videos.each(function() {
|
||||
this.pause();
|
||||
});
|
||||
// var _videos = $('.nasa-slide-popup-review').find('.ns-video-review');
|
||||
// _videos.each(function() {
|
||||
// this.pause();
|
||||
// });
|
||||
|
||||
$('body').trigger('nasa_media_all_pause');
|
||||
|
||||
// if ($(_lm_btn).length) {
|
||||
// if (currentSlide >= slick.slideCount-2) {
|
||||
// nasa_get_ajax_load_review_slide($,$('.nasa-slide-popup-review >.nasa-slick-slider'))
|
||||
@@ -1621,12 +1618,8 @@ $('body').on('click','.nasa-slide-popup-review .close-review-slide-popup,.nasa-s
|
||||
e.preventDefault();
|
||||
var _this = $(this);
|
||||
var _pa = $(_this).parents('.nasa-slide-popup-review');
|
||||
var _videos = $(_pa).find('.ns-video-review');
|
||||
|
||||
_videos.each(function() {
|
||||
this.pause();
|
||||
});
|
||||
|
||||
$('body').trigger('nasa_media_all_pause');
|
||||
$('body').removeClass('ovhd');
|
||||
$(_pa).fadeOut(300);
|
||||
setTimeout(function() {
|
||||
@@ -2221,7 +2214,7 @@ function nasa_ember_link(link) {
|
||||
startTime = link.substring(startIndex + 2);
|
||||
}
|
||||
|
||||
var embedUrl = 'https://www.youtube.com/embed/' + videoId + '?autoplay=1';
|
||||
var embedUrl = 'https://www.youtube.com/embed/' + videoId + '?autoplay=1&enablejsapi=1';
|
||||
if (startTime) {
|
||||
embedUrl += '&start=' + startTime;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user