PATH:
home
/
lab2454c
/
sothebankuab.com
/
wp-content
/
plugins
/
bdthemes-element-pack
/
assets
/
js
/
widgets
/** * Start hover video widget script */ (function($, elementor) { 'use strict'; // hoverVideo // check video buffer function videoBufferChecker(videoId){ var checkInterval = 50.0; // check every 50 ms (do not use lower values) var lastPlayPos = 0; var currentPlayPos = 0; var bufferingDetected = false; var player = document.getElementById(videoId); setInterval(checkBuffering, checkInterval) function checkBuffering() { currentPlayPos = player.currentTime; // checking offset should be at most the check interval // but allow for some margin var offset = (checkInterval - 20) / 2000; // if no buffering is currently detected, // and the position does not seem to increase // and the player isn't manually paused... if ( !bufferingDetected && currentPlayPos < (lastPlayPos + offset) && !player.paused ) { // console.log("buffering = " + videoId); $('#'+videoId).closest('.bdt-hover-video').find('.hover-video-loader').addClass('active'); bufferingDetected = true; } // if we were buffering but the player has advanced, // then there is no buffering if ( bufferingDetected && currentPlayPos > (lastPlayPos + offset) && !player.paused ) { // console.log("not buffering anymore = " + videoId); $('#'+videoId).closest('.bdt-hover-video').find('.hover-video-loader').removeClass('active'); bufferingDetected = false } lastPlayPos = currentPlayPos } } // check video buffer var widgetInstaVideo = function($scope, $) { var $instaVideo = $scope.find('.bdt-hover-video'); if (!$instaVideo.length) { return; } // var $settings = $instaVideo.data('settings'); // console.log($settings.proVisibility); var video = $($instaVideo).find('.bdt-hover-wrapper-list video'); // console.log(video); var videoProgress; setInterval(function () { videoProgress = $('.bdt-hover-progress.active'); }, 100); $(video).on('mouseenter', function (e) { $(this).trigger('play'); videoBufferChecker($(this).attr('id')); var video = $($instaVideo).find('.bdt-hover-video .bdt-hover-wrapper-list video'); var thisId = $(this).attr('id'); $('#'+thisId).on('ended', function(){ setTimeout(function( a ) { $('#'+thisId).trigger('play'); videoBufferChecker(thisId); }, 1500); }); }); $(video).on('mouseout', function (e) { $(this).trigger('pause'); }); $(video).on('timeupdate', function () { var videoBarList = $(video).parent().find('video.active').attr('id'); var ct = document.getElementById(videoBarList).currentTime; var dur = document.getElementById(videoBarList).duration; var videoProgressPos = ct / dur; $($instaVideo).find('.bdt-hover-bar-list').find("[data-id=" + videoBarList + "]").width(videoProgressPos * 100 + "%"); $($instaVideo).find('.bdt-hover-btn-wrapper').find(".bdt-hover-progress[data-id=" + videoBarList + "]").width(videoProgressPos * 100 + "%"); // if (video.ended) { // } }); if($( $instaVideo ).find('.autoplay').length > 0 ){ $( $instaVideo ).find(".bdt-hover-wrapper-list video:first-child").trigger('play'); } if($( $instaVideo ).find('.autoplay').length > 0 ){ var playingVideo = $(video).parent().find('video.active'); $(video).on('timeupdate', function () { playingVideo = $(video).parent().find('video.active'); }); setInterval(function() { $(playingVideo).on('ended', function(){ var nextVideoId = $(playingVideo).next().attr('id'); $('#' + nextVideoId).siblings().css("display", 'none').removeClass('active'); $('#' + nextVideoId).css("display", 'block').addClass('active'); $('#'+nextVideoId).trigger('play'); if($(playingVideo).next('video').length > 0) { var firstVideo = $(playingVideo).siblings().first().attr('id'); $($instaVideo).find("[data-id=" + firstVideo + "]").closest('.bdt-hover-bar-list').find('.bdt-hover-progress').width(0+'%'); $($instaVideo).find('.bdt-hover-btn-wrapper').find("[data-id=" + nextVideoId + "]").siblings().removeClass('active'); $($instaVideo).find('.bdt-hover-btn-wrapper').find("[data-id=" + nextVideoId + "]").addClass('active'); $($instaVideo).find('.bdt-hover-btn-wrapper').find(".bdt-hover-progress").width("0%"); } else{ var firstVideo = $(playingVideo).siblings().first().attr('id'); // console.log("Dont exists"+firstVideo); $('#' + firstVideo).siblings().css("display", 'none').removeClass('active'); $('#' + firstVideo).css("display", 'block').addClass('active'); $($instaVideo).find("[data-id=" + firstVideo + "]").closest('.bdt-hover-bar-list').find('.bdt-hover-progress').width(0+'%'); $($instaVideo).find('.bdt-hover-btn-wrapper').find("[data-id=" + firstVideo + "]").siblings().removeClass('active'); $($instaVideo).find('.bdt-hover-btn-wrapper').find("[data-id=" + firstVideo + "]").addClass('active'); $($instaVideo).find('.bdt-hover-btn-wrapper').find(".bdt-hover-progress").width("0%"); $('#'+firstVideo).trigger('play'); } }); }, 1000); } $('.bdt-hover-btn').on('mouseenter', function () { var videoId = $(this).attr('data-id'); $('#' + videoId).trigger('play'); videoBufferChecker(videoId); $('#' + videoId).siblings().css("display", 'none').removeClass('active'); $('#' + videoId).css("display", 'block').addClass('active'); $('.bdt-hover-bar-list .bdt-hover-progress').removeClass('active'); $('.bdt-hover-bar-list').find("[data-id=" + videoId + "]").addClass('active'); $('.bdt-hover-btn-wrapper').find("[data-id=" + videoId + "]") .siblings().removeClass('active'); $('.bdt-hover-btn-wrapper').find("[data-id=" + videoId + "]") .addClass('active'); }); }; var widgetInstaVideoAccordion = function($scope, $) { var $hoverVideoAccordion = $scope.find('.bdt-hover-video'); if (!$hoverVideoAccordion.length) { return; } var video = $($hoverVideoAccordion).find('.bdt-hover-wrapper-list video'); var videoProgress; setInterval(function () { videoProgress = $('.bdt-hover-progress.active'); }, 100); $(video).on('timeupdate', function () { var videoBarList = $(video).parent().find('video.active').attr('id'); var ct = document.getElementById(videoBarList).currentTime; var dur = document.getElementById(videoBarList).duration; var videoProgressPos = ct / dur; $('.bdt-hover-bar-list').find("[data-id=" + videoBarList + "]").width(videoProgressPos * 100 + "%"); // if (video.ended) { // } }); // start autoplay if($( $hoverVideoAccordion ).find('.autoplay').length > 0 ){ $( $hoverVideoAccordion ).find(".hover-video-list video:first-child").trigger('play'); } if($( $hoverVideoAccordion ).find('.autoplay').length > 0 ){ var playingVideo = $(video).parent().find('video.active'); $(video).on('timeupdate', function () { playingVideo = $(video).parent().find('video.active'); }); setInterval(function() { $(playingVideo).on('ended', function(){ var nextVideoId = $(playingVideo).next().attr('id'); $('#' + nextVideoId).siblings().css("display", 'none').removeClass('active'); $('#' + nextVideoId).css("display", 'block').addClass('active'); // console.log('playingVideo = '+ $(playingVideo).attr('id')); $('#'+nextVideoId).trigger('play'); if($(playingVideo).next('video').length > 0) { // console.log("Exists"); var firstVideo = $(playingVideo).siblings().first().attr('id'); $($hoverVideoAccordion).find("[data-id=" + firstVideo + "]").closest('.bdt-hover-bar-list').find('.bdt-hover-progress').width(0+'%'); } else{ var firstVideo = $(playingVideo).siblings().first().attr('id'); // console.log("Dont exists"+firstVideo); $('#' + firstVideo).siblings().css("display", 'none').removeClass('active'); $('#' + firstVideo).css("display", 'block').addClass('active'); $($hoverVideoAccordion).find("[data-id=" + firstVideo + "]").closest('.bdt-hover-bar-list').find('.bdt-hover-progress').width(0+'%'); $('#'+firstVideo).trigger('play'); } }); }, 1000); } // end autoplay $('.bdt-hover-mask-list .bdt-hover-mask').on('mouseenter', function () { var videoId = $(this).attr('data-id'); $('#' + videoId).siblings().css("display", 'none').removeClass('active'); $('#' + videoId).css("display", 'block').addClass('active'); $('#'+videoId).siblings().trigger('pause'); // play item on active $('#'+videoId).trigger('play'); // play item on active videoBufferChecker(videoId); $('.bdt-hover-bar-list .bdt-hover-progress').removeClass('active'); $('.bdt-hover-bar-list').find("[data-id=" + videoId + "]").addClass('active'); $('.bdt-hover-mask-list').find("[data-id=" + videoId + "]") .siblings().removeClass('active'); $('.bdt-hover-mask-list').find("[data-id=" + videoId + "]") .addClass('active'); $('#'+videoId).on('ended', function(){ setTimeout(function( a ) { $('#'+videoId).trigger('play'); videoBufferChecker(videoId); }, 1500); }); }); $('.bdt-hover-mask-list').on('mouseout', function (e) { $(this).siblings('.bdt-hover-wrapper-list .hover-video-list').find('video').trigger('pause'); }); }; jQuery(window).on('elementor/frontend/init', function() { elementorFrontend.hooks.addAction('frontend/element_ready/bdt-hover-video.default', widgetInstaVideo); elementorFrontend.hooks.addAction('frontend/element_ready/bdt-hover-video.accordion', widgetInstaVideoAccordion); }); }(jQuery, window.elementorFrontend)); /** * End hover video widget script */
[+]
..
[-] ep-animated-heading.min.js
[edit]
[-] ep-faq.js
[edit]
[-] ep-testimonial-slider.min.js
[edit]
[-] ep-step-flow.js
[edit]
[-] ep-tabs.min.js
[edit]
[-] ep-scrollnav.js
[edit]
[-] ep-audio-player.min.js
[edit]
[-] ep-tutor-lms.min.js
[edit]
[-] ep-news-ticker.js
[edit]
[-] ep-offcanvas.min.js
[edit]
[-] ep-iconnav.min.js
[edit]
[-] ep-honeycombs.js
[edit]
[-] ep-circle-info.js
[edit]
[-] ep-iconnav.js
[edit]
[-] ep-honeycombs.min.js
[edit]
[-] ep-faq.min.js
[edit]
[-] ep-qrcode.js
[edit]
[-] ep-fancy-slider.js
[edit]
[-] ep-advanced-post-tab.js
[edit]
[-] ep-advanced-progress-bar.min.js
[edit]
[-] ep-business-hours.js
[edit]
[-] ep-step-flow.min.js
[edit]
[-] ep-lottie-icon-box.min.js
[edit]
[-] ep-advanced-divider.js
[edit]
[-] ep-vertical-menu.js
[edit]
[-] ep-logo-grid.js
[edit]
[-] ep-accordion.min.js
[edit]
[-] ep-advanced-gmap.min.js
[edit]
[-] ep-user-register.js
[edit]
[-] ep-contact-form.min.js
[edit]
[-] ep-vertical-menu.min.js
[edit]
[-] ep-woocommerce.min.js
[edit]
[-] ep-helpdesk.min.js
[edit]
[-] ep-scroll-button.min.js
[edit]
[-] ep-advanced-counter.js
[edit]
[-] ep-twitter-slider.js
[edit]
[-] ep-fancy-tabs.min.js
[edit]
[-] ep-image-accordion.js
[edit]
[-] ep-advanced-counter.min.js
[edit]
[-] ep-user-register.min.js
[edit]
[-] ep-twitter-carousel.js
[edit]
[-] ep-video-gallery.js
[edit]
[-] ep-time-zone.min.js
[edit]
[-] ep-source-code.min.js
[edit]
[-] ep-advanced-progress-bar.js
[edit]
[-] ep-tags-cloud.js
[edit]
[-] ep-timeline.min.js
[edit]
[-] ep-reading-progress.js
[edit]
[-] ep-testimonial-carousel.min.js
[edit]
[-] ep-lottie-image.js
[edit]
[-] ep-portfolio-carousel.js
[edit]
[-] ep-circle-menu.js
[edit]
[-] ep-tabs.js
[edit]
[-] ep-toggle.min.js
[edit]
[-] ep-search.js
[edit]
[-] ep-custom-carousel.js
[edit]
[-] ep-chart.js
[edit]
[-] ep-twitter-carousel.min.js
[edit]
[-] ep-advanced-icon-box.js
[edit]
[-] ep-price-table.min.js
[edit]
[-] ep-event-calendar.min.js
[edit]
[-] ep-event-calendar.js
[edit]
[-] ep-switcher.min.js
[edit]
[-] ep-image-compare.js
[edit]
[-] ep-hover-box.js
[edit]
[-] ep-contact-form.js
[edit]
[-] ep-logo-carousel.js
[edit]
[-] ep-animated-heading.js
[edit]
[-] ep-tags-cloud.min.js
[edit]
[-] ep-slideshow.min.js
[edit]
[-] ep-qrcode.min.js
[edit]
[-] ep-image-accordion.min.js
[edit]
[-] ep-time-zone.js
[edit]
[-] ep-price-table.js
[edit]
[-] ep-reading-progress.min.js
[edit]
[-] ep-image-magnifier.min.js
[edit]
[-] ep-notification.min.js
[edit]
[-] ep-marker.js
[edit]
[-] ep-table-of-content.js
[edit]
[-] ep-carousel.min.js
[edit]
[-] ep-advanced-gmap.js
[edit]
[-] ep-advanced-post-tab.min.js
[edit]
[-] ep-user-login.js
[edit]
[-] ep-cookie-consent.min.js
[edit]
[-] ep-progress-pie.js
[edit]
[-] ep-open-street-map.js
[edit]
[-] ep-lottie-icon-box.js
[edit]
[-] ep-products.min.js
[edit]
[-] ep-logo-grid.min.js
[edit]
[-] ep-slideshow.js
[edit]
[-] ep-logo-carousel.min.js
[edit]
[-] ep-post-grid-tab.js
[edit]
[-] ep-user-login.min.js
[edit]
[-] ep-accordion.js
[edit]
[-] ep-modal.js
[edit]
[-] ep-portfolio-gallery.min.js
[edit]
[-] ep-chart.min.js
[edit]
[-] ep-toggle.js
[edit]
[-] ep-threesixty-product-viewer.min.js
[edit]
[-] ep-woocommerce.js
[edit]
[-] ep-section-sticky.js
[edit]
[-] ep-post-gallery.min.js
[edit]
[-] ep-image-compare.min.js
[edit]
[-] ep-timeline.js
[edit]
[-] ep-mailchimp.min.js
[edit]
[-] ep-table-of-content.min.js
[edit]
[-] ep-hover-video.js
[edit]
[-] ep-tutor-lms.js
[edit]
[-] ep-fancy-slider.min.js
[edit]
[-] ep-mailchimp.js
[edit]
[-] ep-testimonial-carousel.js
[edit]
[-] ep-twitter-slider.min.js
[edit]
[-] ep-offcanvas.js
[edit]
[-] ep-interactive-card.min.js
[edit]
[-] ep-progress-pie.min.js
[edit]
[-] ep-particles.min.js
[edit]
[-] ep-portfolio-carousel.min.js
[edit]
[-] ep-iframe.min.js
[edit]
[-] ep-marker.min.js
[edit]
[-] ep-hover-box.min.js
[edit]
[-] ep-table.min.js
[edit]
[-] ep-post-grid-tab.min.js
[edit]
[-] ep-iframe.js
[edit]
[-] ep-slider.min.js
[edit]
[-] ep-advanced-icon-box.min.js
[edit]
[-] ep-section-sticky.min.js
[edit]
[-] ep-helpdesk.js
[edit]
[-] ep-comment.min.js
[edit]
[-] ep-custom-carousel.min.js
[edit]
[-] ep-modal.min.js
[edit]
[-] ep-post-gallery.js
[edit]
[-] ep-carousel.js
[edit]
[-] ep-news-ticker.min.js
[edit]
[-] ep-table.js
[edit]
[-] ep-image-expand.js
[edit]
[-] ep-notification.js
[edit]
[-] ep-instagram.js
[edit]
[-] ep-image-magnifier.js
[edit]
[-] ep-audio-player.js
[edit]
[-] ep-switcher.js
[edit]
[-] ep-hover-video.min.js
[edit]
[-] ep-interactive-card.js
[edit]
[-] ep-cookie-consent.js
[edit]
[-] ep-source-code.js
[edit]
[-] ep-portfolio-gallery.js
[edit]
[-] ep-image-expand.min.js
[edit]
[-] ep-particles.js
[edit]
[-] ep-open-street-map.min.js
[edit]
[-] ep-instagram.min.js
[edit]
[-] ep-panel-slider.js
[edit]
[-] ep-threesixty-product-viewer.js
[edit]
[-] ep-testimonial-slider.js
[edit]
[-] ep-advanced-divider.min.js
[edit]
[-] ep-fancy-tabs.js
[edit]
[-] ep-video-gallery.min.js
[edit]
[-] ep-scroll-button.js
[edit]
[-] ep-scrollnav.min.js
[edit]
[-] ep-circle-info.min.js
[edit]
[-] ep-comment.js
[edit]
[-] ep-products.js
[edit]
[-] ep-lottie-image.min.js
[edit]
[-] ep-slider.js
[edit]
[-] ep-search.min.js
[edit]
[-] ep-panel-slider.min.js
[edit]
[-] ep-circle-menu.min.js
[edit]
[-] ep-tooltip.js
[edit]
[-] ep-business-hours.min.js
[edit]