Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.48.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : zoo-product-embed.js
/**
 * Product embed js
 * Allow control light box video on single product page
 */
(function ($) {
    'use strict';
    var player;
    if ($('.wrap-product-video.vimeo-embed')[0]) {
        player = new Vimeo.Player($('.wrap-product-video.vimeo-embed iframe'));
    }
    $(document).on('click', '.video-lb-control', function (e) {
        e.preventDefault();
        $('.wrap-product-video').addClass('video-active');
        $('.product-extended-button').addClass('active');
        let window_w;
        window_w = $(window).width();
        let frame_w, frame_h;
        frame_w = window_w > 1170 ? 1170 : window_w - 60;
        frame_h = frame_w * 9 / 16;
        $('.wrap-product-video iframe').width(frame_w);
        $('.wrap-product-video iframe').height(frame_h);
        if ($('.wrap-product-video.vimeo-embed')[0]) {
            player.play();
        }
    });
    $(document).on('click', '.mask-product-video', function () {
        $('.video-active').removeClass('video-active');
        $('.product-extended-button').removeClass('active');
        if ($('.wrap-product-video.vimeo-embed')[0]) {
            player.pause();
        }
    });
    $(window).resize(function () {
        if ($('.video-active')[0]) {
            let window_w;
            window_w = $(window).width();
            let frame_w, frame_h;
            frame_w = window_w > 1170 ? 1170 : window_w - 60;
            frame_h = frame_w * 9 / 16;
            $('.wrap-product-video iframe').width(frame_w);
            $('.wrap-product-video iframe').height(frame_h);
        }
    });

})(jQuery);
var player;
function onYouTubePlayerAPIReady() {
    // create the global player from the specific iframe (#video)
    player = new YT.Player(jQuery('.wrap-product-video.youtube-embed iframe').attr('id'), {
        events:
            {
                // call this function when player is ready to use
                'onReady':onPlayerReady
            }
    });
}

function onPlayerReady(event) {
    jQuery(document).on('click', '.video-lb-control', function (e) {
        player.playVideo();
    });
    jQuery(document).on('click', '.mask-product-video', function () {
        player.pauseVideo();
    });
}
© 2025 XylotrechusZ