'); } else { if (zeroMenuBlock.closest('header')) document.querySelector('header').insertAdjacentHTML('afterbegin','
'); else document.querySelector('#allrecords').insertAdjacentHTML('afterbegin','
'); } let zeroMenuElem = zeroMenuBlock.querySelectorAll('.t396__elem'), elemShow = document.querySelectorAll('.tn-elem__6945769021705774421312, .tn-elem__6945769021704620520825'), bgBlock = document.querySelector('#annexxMenuSecondBlock' + d), defTransBlock = getComputedStyle(zeroMenuBlock).transition, defTransBg = getComputedStyle(bgBlock).transition, closeelem = '.tn-elem__6945769031705774525343, .tn-elem__6945769031704621270770' ? document.querySelectorAll('.tn-elem__6945769031705774525343, .tn-elem__6945769031704621270770') : false, reverseanimelem = '' ? document.querySelectorAll('') : false, mouseoverReady = true, showProgress = false, isMobile = (function() { let ua = navigator.userAgent; if(/Android|webOS|iPhone|iPad|iPod/i.test(ua) || (!/windows/i.test(ua) && /safari/i.test(ua) && navigator.maxTouchPoints > 1)) return true; else return false; }()), elemTarget, elemexternalclick = '' ? document.querySelectorAll('') : false, elemexternalhover = '' ? document.querySelectorAll('') : false, elemShowScroll = '' ? document.querySelector('') : false, offsetShowScroll = 0, elemShowOnOpenMenu = '' ? document.querySelectorAll('') : false, elemHideOnOpenMenu = '.tn-elem__6945769021705771126884, .tn-elem__6945769021705774421312, .tn-elem__6945769021704620520825' ? document.querySelectorAll('.tn-elem__6945769021705771126884, .tn-elem__6945769021705774421312, .tn-elem__6945769021704620520825') : false, userFunctionNameOpen = '', userFunctionNameClose = '', firstFixElemMouseMoveAnim = false; if (elemShowOnOpenMenu) { elemShowOnOpenMenu.forEach(e => e.classList.add('element-015-hide-on-menu')); } annexxRemoveStyle('015', ds + 'elem-show-on-open-menu'); annexxRemoveStyle('015', ds + 'elem-hide-on-open-menu'); function reverseAnim() { if (reverseanimelem) { setTimeout(function() { if (!zeroMenuBlock.classList.contains('annexx-zero-015-show-block')) { reverseanimelem.forEach(e => { if (e.classList.contains('js-sbs-anim-trigger_hover')) e.classList.remove('t-sbs-anim_started'); else if (!e.classList.contains('t-sbs-anim_reversed')) t_animationSBS__actionOnEnd([e]); }); } }, 300 + 100); } } clearInterval(window.intremoveStartAnimsetTimeout); window.intremoveStartAnimsetTimeout = setInterval(() => { annexxZeroSecondMenu.forEach(e => { e.block.querySelectorAll('.t396__elem[data-animate-sbs-event]').forEach(el => el.classList.remove('t-sbs-anim_started')); e.block.querySelectorAll('.t-animate').forEach(el => el.classList.remove('t-animate_started')); }); }, 500); setTimeout(() => { clearInterval(window.intremoveStartAnimsetTimeout); }, 2e3); function showBlock(menuEl) { setTimeout(function() { if (showProgress) { return false; } let hasShowClass = zeroMenuBlock.classList.contains('annexx-zero-015-show-block'); showProgress = true; zeroMenuElem.forEach(function(e) { e.style.pointerEvents = 'none'; }); setTimeout(function() { /* закрыть все меню на этом уровне */ let blockElement = menuEl.closest('.r'); annexxZeroSecondMenu.forEach(e => { if (Array.from(e.elemshow).some(el => el.closest('.r') === blockElement) && e.block !== zeroMenuBlock && e.block.classList.contains('annexx-zero-015-show-block') && !e.block.classList.contains('annexx-zero-015-widget')) e.function.closeBlock(); }); showProgress = false; if ('click' !== "hoverout" ) { zeroMenuElem.forEach(function(e) { e.style.pointerEvents = ''; }); } },300); /* Restart animation at zero > */ clearInterval(window.intremoveStartAnimsetTimeout); if (!bgBlock.style.opacity) { annexxZeroSecondMenu.forEach(e => { let bl = e.block, elemAnimSbs = bl.querySelectorAll('.t396__elem[data-animate-sbs-event]'), elemAnimBasic = bl.querySelectorAll('.t-animate'); elemAnimBasic.forEach(e => { if (!bl.classList.contains('annexx-zero-015-show-block')) { e.style.transitionDuration = '0s'; e.classList.remove('t-animate_started'); } if (zeroMenuBlock === bl) { setTimeout(() => { e.style.transitionDuration = ''; e.classList.add('t-animate_started'); }, 300 * 1.5); } }); elemAnimSbs.forEach(e => { if (!bl.classList.contains('annexx-zero-015-show-block')) { e.style.transitionDuration = '0s'; e.classList.remove('t-sbs-anim_started', 't-sbs-anim_reversed', 't-sbs-anim_playing'); } if (zeroMenuBlock === bl) { e.style.transitionDuration = ''; if (e.dataset.animateSbsEvent !== 'hover' && e.dataset.animateSbsEvent !== 'click') e.classList.add('t-sbs-anim_started'); } }); setTimeout(function() { t396_init(bl.id.replace(/\D/g,'')); },100); }); } /* > Restart animation at zero */ if ('block' === 'block') { document.body.classList.add('body-no-scroll'); document.body.classList.remove('t-body_scrollable-fix-for-android'); zeroMenuBlock.style.cursor = 'pointer'; zeroMenuBlock.querySelector('.t396').style.cursor = 'initial'; if (isMobile && isSafari && getComputedStyle(document.body).overflow !== "hidden") { document.body.style.overflow = "hidden"; document.body.style.height = "100%"; document.body.style.width = "100%"; } if (isMobile && isSafari && getComputedStyle(document.body).position !== "fixed") { document.body.style.bottom = window.scrollY + "px"; document.body.style.position = "fixed"; document.body.style.height = "100%"; document.body.style.width = "100%"; } } if ('none' !== 'none') { let zoom = menuEl.closest('.t396__elem') ? menuEl.closest('.t396__elem').style.zoom : menuEl.closest('.r') ? menuEl.closest('.r').style.zoom : false, top = 'none' === 'top' ? menuEl.getBoundingClientRect().top : menuEl.getBoundingClientRect().top + menuEl.getBoundingClientRect().height; zeroMenuBlock.style.paddingTop = (zoom ? top * zoom : top) + 'px'; zeroMenuBlock.style.top = '0px'; } if (true && '' && !zeroMenuBlock.classList.contains('annexx-zero-015-show-block')) { annexxRemoveStyle('015', d); let top,bottom,right,left; switch ('top-left') { case 'top-left': top = (0 - verticalMove) + 'px !important'; left = (0 + horizontalMove) + 'px !important'; annexxAddStyle('015', ` { top: ${top}; left: ${left}; right: unset !important; bottom: unset !important; } `, d); break; case 'top-right': top = (0 - verticalMove) + 'px !important'; right = (0 - horizontalMove) + 'px !important'; annexxAddStyle('015', ` { top: ${top}; right: ${right}; left: unset !important; bottom: unset !important; } `, d); break; case 'bottom-right': bottom = (0 + verticalMove) + 'px !important'; right = (0 - horizontalMove) + 'px !important'; annexxAddStyle('015', ` { bottom: ${bottom}; right: ${right}; left: unset !important; top: unset !important; } `, d); break; case 'bottom-left': bottom = (0 + verticalMove) + 'px !important'; left = (0 + horizontalMove) + 'px !important'; annexxAddStyle('015', ` { bottom: ${bottom}; left: ${left}; right: unset !important; top: unset !important; } `, d); break; } } let closestBlock = menuEl.closest('.annexx-zero-015-show-block'), zIndexClosestBlock = closestBlock ? +closestBlock.style.zIndex : false, header = zeroMenuBlock.closest('#t-header'); zeroMenuBlock.style.zIndex = 0 ? 0 : zIndexClosestBlock ? zIndexClosestBlock + 2 : closestBlock ? 200 + 2 : 200; if (header && +getComputedStyle(header).zIndex && +getComputedStyle(header).zIndex window.innerHeight) { zeroMenuBlock.style.height = 'none' !== 'none' ? (window.innerHeight - parseInt(zeroMenuBlock.style.paddingTop)) + 'px' : '100vh'; zeroMenuBlock.style.overflowY = 'scroll'; } if (!false && 'block' !== 'hideall' && 'click' !== 'hoverout') { zeroMenuBlock.style.pointerEvents = 'all'; } bgBlock.style.zIndex = 0 ? 0 - 1 : closestBlock ? zIndexClosestBlock + 1 : closestBlock ? 200 + 1 : 200 - 1; bgBlock.classList.add('annexx-zero-bg-015-show-block'); if ('animate__fadeIn' !== "animate__fadeIn") zeroMenuBlock.style.opacity = 1; if (!hasShowClass) { zeroMenuBlock.classList.add('animate__animated', 'animate__fadeIn'); if (userFunctionNameOpen) { window.annexxZeroSecondMenuFunction.forEach(function(e) { if (e.name === userFunctionNameOpen) e(); }); } setTimeout(function() { if ('animate__fadeIn' === "animate__fadeIn") zeroMenuBlock.style.opacity = 1; zeroMenuBlock.classList.remove('animate__animated', 'animate__fadeIn'); }, 300); } if (!false && 'click' !== "hoverout") { setTimeout(function () { bgBlock.style.pointerEvents = 'all'; }, 100); } let videoelem = '' ? document.querySelectorAll(' video') : false; if (videoelem && videoelem.length) { switch ('none') { case 'tostart': window.arrAnnexxVideoTooltip.forEach(function(e) { videoelem.forEach(function(el) { if (el === e.el) { e.function.pauseV(); e.el.currentTime = 0; if ('click' === 'click' && false) e.el.muted = false; else e.function.mute(); } }); }); break; case 'resume': window.arrAnnexxVideoTooltip.forEach(function(e) { videoelem.forEach(function(el) { if (el === e.el) { e.function.playV(); if ('click' === 'click' && false) e.el.muted = false; else e.function.mute(); } }); }); break; case 'resumefromstart': window.arrAnnexxVideoTooltip.forEach(function(e) { videoelem.forEach(function(el) { if (el === e.el) { e.el.currentTime = 0; e.function.playV(); if ('click' === 'click' && false) e.el.muted = false; else e.function.mute(); } }); }); break; } } if (elemShowOnOpenMenu) { elemShowOnOpenMenu.forEach(e => e.classList.remove('element-015-hide-on-menu')); } if (elemHideOnOpenMenu) { elemHideOnOpenMenu.forEach(e => e.classList.add('element-015-hide-on-menu')); } if (!true) window.dispatchEvent(new CustomEvent('resize')); setTimeout(function() { t_animationExt__init(); t_animationExt__wrapFixEls(); let fixElemMouseMoveAnim = zeroMenuBlock.querySelectorAll('.t396__elem[data-animate-prx="mouse"] .tn-atom__prx-wrapper'); if (fixElemMouseMoveAnim.length && firstFixElemMouseMoveAnim) fixElemMouseMoveAnim.forEach(el => { el = el.previousSibling; if (el) el.remove(); }); firstFixElemMouseMoveAnim = true; let htmlscroll = document.querySelector("html[data-overlayscrollbars]"); if (htmlscroll && document.querySelector(".annexx-zero-015-show-block:not(.annexx-zero-015-widget)") && 'block' !== 'hideall') htmlscroll.style.overflow = "hidden"; },200); }, 20); } function closeBlock() { setTimeout(function() { if (showProgress || !zeroMenuBlock.classList.contains('annexx-zero-015-show-block')) return false; let hasBottom = document.body.style.bottom; showProgress = true; /* Restart animation at zero > */ let elemAnimSbs = zeroMenuBlock.querySelectorAll('.t396__elem[data-animate-sbs-event]'), elemAnimBasic = zeroMenuBlock.querySelectorAll('.t-animate'); elemAnimSbs.forEach(function(e) { e.classList.remove('t-sbs-anim_started'); }); if (reverseanimelem) { reverseanimelem.forEach(e => { let clElem = e.classList; if (clElem.contains('t-sbs-anim_started') && (clElem.contains('js-sbs-anim-trigger_hover') || !clElem.contains('t-sbs-anim_reversed') || e.triggerElems)) reverseAnim(); }); } /* > Restart animation at zero */ zeroMenuBlock.style.transition = 'opacity 200ms linear 0s'; bgBlock.style.transition = 'opacity 200ms linear 0s'; bgBlock.style.pointerEvents = ''; setTimeout(function() { zeroMenuBlock.style.transition = ''; bgBlock.style.transition = ''; bgBlock.style.opacity = ''; }, 200); zeroMenuBlock.scrollTo(0,0); zeroMenuBlock.style.height = ''; zeroMenuBlock.style.overflowY = ''; zeroMenuBlock.style.pointerEvents = ''; zeroMenuBlock.style.opacity = 1; zeroMenuElem.forEach(el => { el = el.querySelector('.tn-atom'); if (el) el.style.pointerEvents = ''}); bgBlock.style.opacity = 1; zeroMenuBlock.classList.add('animate__animated', 'animate__fadeOut'); setTimeout(function() { zeroMenuBlock.classList.remove('annexx-zero-015-show-block'); bgBlock.classList.remove('annexx-zero-bg-015-show-block'); zeroMenuBlock.classList.remove('animate__animated', 'animate__fadeOut'); annexxZeroSecondMenu.forEach(e => { let bl = e.block, elemAnimSbs = bl.querySelectorAll('.t396__elem[data-animate-sbs-event]'), elemAnimBasic = bl.querySelectorAll('.t-animate'); setTimeout(function () { elemAnimBasic.forEach(e => { if (!bl.classList.contains('annexx-zero-015-show-block')) { e.style.transitionDuration = '0s'; e.classList.remove('t-animate_started'); } }); elemAnimSbs.forEach(e => { if (!bl.classList.contains('annexx-zero-015-show-block')) { e.style.transitionDuration = '0s'; e.classList.remove('t-sbs-anim_started', 't-sbs-anim_reversed', 't-sbs-anim_playing'); } }); }, 200); }); zeroMenuBlock.style.opacity = ''; if (isMobile && isSafari && getComputedStyle(document.body).overflow === "hidden" && !annexxZeroSecondMenu.some(e => e.block.classList.contains('annexx-zero-015-show-block') && !e.block.classList.contains('annexx-zero-015-widget'))) { document.body.style.overflow = ""; document.body.style.bottom = ""; document.body.style.height = ""; document.body.style.width = ""; } if (isMobile && isSafari && getComputedStyle(document.body).position === "fixed" && hasBottom && !annexxZeroSecondMenu.some(e => e.block.classList.contains('annexx-zero-015-show-block') && !e.block.classList.contains('annexx-zero-015-widget'))) { document.body.style.position = ""; window.scroll(0, parseInt(hasBottom)); document.body.style.bottom = ""; document.body.style.height = ""; document.body.style.width = ""; } if (userFunctionNameClose) { window.annexxZeroSecondMenuFunction.forEach(function(e) { if (e.name === userFunctionNameClose) e(); }); } let fixElemMouseMoveAnim = zeroMenuBlock.querySelectorAll('.t396__elem[data-animate-prx="mouse"] .tn-atom__prx-wrapper'); if (fixElemMouseMoveAnim.length) fixElemMouseMoveAnim.forEach(el => el.classList.remove('tn-atom__prx-wrapper')); setTimeout(function() { showProgress = false; }, 300); if ('block' === 'block') { if (!annexxZeroSecondMenu.some(e => e.block.classList.contains('annexx-zero-015-show-block') && e.blockScroll)) document.body.classList.remove('body-no-scroll'); document.querySelector('#allrecords').style.height = ''; zeroMenuBlock.style.cursor = ''; zeroMenuBlock.querySelector('.t396').style.cursor = ''; } setTimeout(function() { if (!annexxZeroSecondMenu.some(e => e.block.classList.contains('annexx-zero-015-show-block') && !e.block.classList.contains('annexx-zero-015-widget'))) { annexxZeroSecondMenu.forEach(e => e.bgBlock.style.pointerEvents = ''); } }, 200); let htmlscroll = document.querySelector("html[data-overlayscrollbars]"); if (htmlscroll && !document.querySelector(".annexx-zero-015-show-block:not(.annexx-zero-015-widget)")) htmlscroll.style.overflow = ""; },300); let videoelem = '' ? document.querySelectorAll(' video') : false; if (videoelem && videoelem.length) { window.arrAnnexxVideoTooltip.forEach(function(e) { videoelem.forEach(function(el) { if (el === e.el) { if ('none' !== 'none') e.function.pauseV(); else e.function.mute(); } }); }); } let header = zeroMenuBlock.closest('#t-header'); if (header && +getComputedStyle(header).zIndex === +zeroMenuBlock.style.zIndex) annexxRemoveStyle('015', ds + 'header-zindex');; if (elemShowOnOpenMenu) { elemShowOnOpenMenu.forEach(e => e.classList.add('element-015-hide-on-menu')); } if (elemHideOnOpenMenu) { elemHideOnOpenMenu.forEach(e => e.classList.remove('element-015-hide-on-menu')); } }, 20); } if (-1 !== -1) { setTimeout(function() { showBlock(elemShow[0]); }, -1 * 1000); } switch ('click') { case 'click': elemShow.forEach(e => { e.addEventListener('click', function(e) { elemTarget = e.target; if (true && zeroMenuBlock.classList.contains("annexx-zero-015-show-block")) { closeBlock(); } else { showBlock(elemTarget); } }); }); break; case 'hover': /* for windows tablets was checked && !navigator.maxTouchPoints , removed due to a bug */ if (!isMobile) { elemShow.forEach(e => { e.addEventListener('mouseover', function(e) { elemTarget = e.target; if (true && zeroMenuBlock.classList.contains("annexx-zero-015-show-block")) { closeBlock(); } else { showBlock(elemTarget); } }); }); } else { elemShow.forEach(e => { e.addEventListener('touchstart', function(e) { elemTarget = e.target; if (true && zeroMenuBlock.classList.contains("annexx-zero-015-show-block")) { closeBlock(); } else { showBlock(elemTarget); } }); }); } break; case 'hoverout': /* for windows tablets was checked && !navigator.maxTouchPoints , removed due to a bug */ if (!isMobile) { elemShow.forEach(elem => { elem.addEventListener('mouseenter', function(e) { elemTarget = e.target; if (true && zeroMenuBlock.classList.contains("annexx-zero-015-show-block")) { closeBlock(); } else { showBlock(elemTarget); } }); elem.addEventListener('mouseleave', function(e) { closeBlock(); }); }); } else { let int = setInterval(function() { if (window.annexxZeroSecondMenu) { clearInterval(int); if (!window.annexxZeroSecondMenu.hoveroutTouchMobileReady) { window.annexxZeroSecondMenu.hoveroutTouchMobileReady = true; document.addEventListener('touchstart', function(e) { let target = e.target.closest('.t396__elem'), close = false; window.annexxZeroSecondMenu.some(el => { if (el.menuelemShowAction === "hoverout" && Array.from(el.elemshow).some(ell => ell === target)) { if (!el.block.classList.contains('annexx-zero-015-show-block')) { close = true; el.function.showBlock(target); } return true; } }); if (!close) { window.annexxZeroSecondMenu.forEach(el => { if (el.menuelemShowAction === "hoverout" && el.block.classList.contains('annexx-zero-015-show-block')) { el.function.closeBlock(); } }); } }); } } }, 500); } break; } if ('') { document.addEventListener("click", function(e) { let link = e.target.closest('a'); if (link && link.getAttribute("href") === '') { e.preventDefault(); elemTarget = e.target; if (true && zeroMenuBlock.classList.contains("annexx-zero-015-show-block")) { closeBlock(); } else { showBlock(elemTarget); } } }); } if (true && !false) { zeroMenuElem.forEach(function(e) { let link = e.querySelector('a'); if (link && e.dataset.elemType && e.dataset.elemType !== "form") { e.addEventListener('click',function() { window.annexxZeroSecondMenu.forEach(function(e) { if (e.block.classList.contains('annexx-zero-015-show-block')) { if (isMobile && isSafari && getComputedStyle(document.body).position === "fixed") { document.body.style.position = ""; } e.function.closeBlock(); } }); }); } }); if (isMobile) { let int = setInterval(function() { if (typeof t270_scrollToEl === "function") { clearInterval(int); t270_scrollToEl = function (hash, offset) { if (document.body.getAttribute('data-scroll')) return; let timeoutTime = document.body.classList.contains('body-no-scroll') ? 300 : 0; setTimeout(function () { var scrollTargetY = t270_getTarget(hash, offset); if (!scrollTargetY) return; var html = document.querySelector('html'); var body = document.body; var documentHeight = Math.max(body.scrollHeight, body.offsetHeight, body.clientHeight, html.offsetHeight); var scrollY = window.scrollY || document.documentElement.scrollTop; var speed = 2000; var time = Math.max(.1, Math.min(Math.abs(scrollY - scrollTargetY) / speed, .8)); var currentTime = 0; function t270_easeInQuad(pos) { return Math.pow(pos, 2) } function t270_animationScroll() { currentTime += 1 / 60; var newDocumentHeight = Math.max(body.scrollHeight, body.offsetHeight, body.clientHeight, html.offsetHeight); if (documentHeight = docViewTop - (elemHeight / 2)); }; window['annexx-015-scroll' + d] = function() { if (isScrolledIntoView(elemShowScroll)) { showBlock(elemShow[0]); window.removeEventListener('scroll', window['annexx-015-scroll' + d]); } }; window.addEventListener('scroll', window['annexx-015-scroll' + d]); } if (!window.annexxZeroSecondMenu) window.annexxZeroSecondMenu = []; window.annexxZeroSecondMenu.push({ d: d, block: zeroMenuBlock, elemshow: elemShow, menuelemShowAction: 'click', bgBlock: bgBlock, blockScroll: 'block' === 'block', closeelem: closeelem, closeoutside: true, reverseanimelem: reverseanimelem, menuelemCloseAction: 'click', elemexternalclick: elemexternalclick, elemexternalhover: elemexternalhover, function: { closeBlock: closeBlock, showBlock: showBlock, reverseAnim: reverseAnim } }); if (elemexternalclick) { if (!window.annexxZeroSecondMenu.elemexternalclickArr) window.annexxZeroSecondMenu.elemexternalclickArr = []; elemexternalclick.forEach(el => { if (window.annexxZeroSecondMenu.elemexternalclickArr.every(arrEl => arrEl !== el)) window.annexxZeroSecondMenu.elemexternalclickArr.push(el); }); } if (elemexternalhover) { if (!window.annexxZeroSecondMenu.elemexternalhoverArr) window.annexxZeroSecondMenu.elemexternalhoverArr = []; elemexternalhover.forEach(el => { if (window.annexxZeroSecondMenu.elemexternalhoverArr.every(arrEl => arrEl !== el)) window.annexxZeroSecondMenu.elemexternalhoverArr.push(el); }); } if ('click' === "hoverout" && !window.annexxZeroSecondMenu.hoveroutScrollHideReady && !isMobile) { window.annexxZeroSecondMenu.hoveroutScrollHideReady = true; window.addEventListener('scroll', function() { if (!window.annexxZeroSecondMenu.some(el => el.block.classList.contains('annexx-zero-015-show-block'))) return false; window.annexxZeroSecondMenu.some(el => { if (el.menuelemShowAction === "hoverout" && el.block.classList.contains('annexx-zero-015-show-block')) { el.function.closeBlock(); return true; } }); }); } if (!window.annexxZeroSecondMenu.pointerReady) { window.annexxZeroSecondMenu.pointerReady = true; document.addEventListener('pointermove', function(e) { if (!window.annexxZeroSecondMenu.some(el => el.block.classList.contains('annexx-zero-015-show-block'))) return false; let pointerEl = document.elementsFromPoint(e.clientX, e.clientY), bgArr = []; pointerEl.every(function(elStep) { if(elStep.classList.contains('annexx-zero-bg-015-show-block')) bgArr.push(elStep); elStep = elStep.closest('.t396__elem') ? elStep.closest('.t396__elem') : elStep; if (elStep.classList.contains('t396__elem')) { function closeBGMenu() { bgArr.forEach(elArr => { window.annexxZeroSecondMenu.some(function(elemBG) { if (elemBG.bgBlock === elArr && !Array.from(elemBG.elemshow).some(e => e === elStep) && !elemBG.block.classList.contains('annexx-zero-015-widget')) { elemBG.function.closeBlock(); return true; } }); }); } /* elements showing the menu unit */ window.annexxZeroSecondMenu.some(function(elemTnatom) { Array.from(elemTnatom.elemshow).some(el => { if (el === elStep && elemTnatom.menuelemShowAction === 'hover' && !elemTnatom.block.classList.contains('annexx-zero-015-show-block')) { closeBGMenu(); elStep.dispatchEvent(new CustomEvent('mouseover')); if (elStep.classList.contains('js-sbs-anim-trigger_hover')) elStep.dispatchEvent(new CustomEvent('mouseenter')); return true; } }); }); /* elements hiding the menu unit */ window.annexxZeroSecondMenu.some(function(elemTnatom) { if (!elemTnatom.closeelem) return false; Array.from(elemTnatom.closeelem).some(el => { if (el === elStep && elemTnatom.menuelemCloseAction === 'hover') { closeBGMenu(); elStep.dispatchEvent(new CustomEvent('mouseover')); return true; } }); }); /* hover external elements */ if (window.annexxZeroSecondMenu.elemexternalhoverArr) { window.annexxZeroSecondMenu.elemexternalhoverArr.some(function(elemTnatom) { if (elemTnatom === elStep && window.annexxZeroSecondMenu.some(el => (el.elemexternalhover ? Array.from(el.elemexternalhover).some(ell => ell === elStep) : false) && el.bgBlock.classList.contains('annexx-zero-bg-015-show-block'))) { closeBGMenu(); let link = elemTnatom.querySelector('a'); if (link) link.dispatchEvent(new CustomEvent('mouseover')); else elStep.dispatchEvent(new CustomEvent('mouseover')); if (elStep.classList.contains(".js-sbs-anim-trigger_hover")) t_animationSBS__playAnimation(elStep, false); return true; } }); } return false; } return true; }); }); if (true) { document.addEventListener('click', function(e) { let target = e.target.closest('.r'); if (window.annexxZeroSecondMenu.some(el => el.block.classList.contains('annexx-zero-015-show-block')) && !window.annexxZeroSecondMenu.some(e => target === e.block)) window.annexxZeroSecondMenu.forEach(e => { if (e.closeoutside && e.block.classList.contains('annexx-zero-015-show-block') && !e.block.classList.contains('annexx-zero-015-widget') && e.menuelemCloseAction === "hover") e.function.closeBlock(); }); }); } } function clickEvent(e) { if (!e.isTrusted || e.target.closest(".t-input-group_da") || !window.annexxZeroSecondMenu.some(el => el.block.classList.contains('annexx-zero-015-show-block'))) return false; let pointerEl = document.elementsFromPoint(e.clientX, e.clientY), bgClose = false; pointerEl.every(function(elStep) { elStep = elStep.closest('.t396__elem') ? elStep.closest('.t396__elem') : elStep; if (elStep.classList.contains('t396__elem')) { /* elements showing the menu unit */ window.annexxZeroSecondMenu.some(function(elemTnatom) { Array.from(elemTnatom.elemshow).some(el => { if ((el === elStep || el.querySelector('.tn-atom') === elStep) && (!bgClose || true)) { if (elemTnatom.menuelemShowAction === 'click') elStep.dispatchEvent(new CustomEvent('click')); else if (elemTnatom.menuelemShowAction === 'hover' && navigator.maxTouchPoints) elStep.dispatchEvent(new CustomEvent('touchstart')); } return true; }); }); /* elements hiding the menu unit */ window.annexxZeroSecondMenu.some(function(elemTnatom) { if (!elemTnatom.closeelem) return false; Array.from(elemTnatom.closeelem).some(el => { if (el === elStep) { if (elemTnatom.menuelemCloseAction === 'click') elStep.dispatchEvent(new CustomEvent('click')); else if (elemTnatom.menuelemCloseAction === 'hover') elStep.dispatchEvent(new CustomEvent('hover')); } return true; }); }); /* clickable external elements */ if (window.annexxZeroSecondMenu.elemexternalclickArr) { window.annexxZeroSecondMenu.elemexternalclickArr.some(function(elemTnatom) { if (elemTnatom === elStep) { let link = elemTnatom.querySelector('a'); if (link) link.click(); else elStep.dispatchEvent(new CustomEvent('click')); return true; } }); } return false; } else if (elStep.classList.contains('annexx-zero-bg-015-show-block')) { window.annexxZeroSecondMenu.some(function(elemBg) { if (elemBg.bgBlock === elStep) { if (!pointerEl.some(el => Array.from(elemBg.elemshow).indexOf(el) !== -1 && elemBg.menuelemShowAction === 'click') && !elemBg.block.classList.contains('annexx-zero-015-widget')) elemBg.function.closeBlock(); else bgClose = true; return true; } }); } return true; }); } zeroMenuBlock.addEventListener('click', clickEvent); bgBlock.addEventListener('click', clickEvent); }); } }());
Digitall Group сombines different areas with niche expertise
@2024
{group}
` : ''} `); let v = $e.find('video')[0], f = function() { annexxAddStyle('011','.' + e.className.replace(/\s+/g,'.') + ' {display:table;}'); let $removeelementload = $(''); if ($removeelementload.length) $('').remove(); window.arrAnnexxVideoTooltip.push({'el': $e.find('video')[0], 'service': 'direct','modtype': '011', 'playElClick': d, 'buttonMute': 'no','actionPlayAnotherVideo': actionPlayAnotherVideo,'actionOpenPopup': actionOpenPopup, 'actionCloseTab': 'mute,pause'.split(','), elements: {shapePlayClick: $shapePlayClick, shapePlayHover: $shapePlayHover,shapePauseClick: $shapePauseClick, shapePauseHover: $shapePauseHover, shapeUnmuteClick: $shapeUnmuteClick, shapeMuteClick: $shapeMuteClick, shapeMuteHover: $shapeMuteHover, shapeUnmuteHover: $shapeUnmuteHover}, 'switchElementMuteUnmute': switchElementMuteUnmute, function: {playV: playV, pauseV: pauseV, mute: mute}}); ll--; if (!ll) resolve(); if (userFunctionNameEnd) { v.addEventListener('ended', function() { window.arrAnnexxVideoTooltip.userFunction.forEach(function(e) { if (e === userFunctionNameEnd) window[e](); }); }); } if (autoplay){ v.muted = true; function pl() { try { v.play(); } catch (e) {} } pl(); setTimeout(pl,1e3); } v.removeEventListener('canplay', f); function showElemOnplay() { if ($showElemOnplay) { $showElemOnplay.removeClass('hide-elem-onplay'); } if ($hideElemOnplay) { $hideElemOnplay.addClass('hide-elem-onplay'); } if (false) { this.removeEventListener('play',showElemOnplay); this.removeEventListener('pause',hideElemOnplay); } if ($previewvideo) { $previewvideo.addClass("hide-preload-shape"); if (!previewOnPause) $previewvideo = false; } } function hideElemOnplay() { if ($showElemOnplay) { $showElemOnplay.addClass('hide-elem-onplay'); } if ($hideElemOnplay) { $hideElemOnplay.removeClass('hide-elem-onplay'); } if ($previewvideo) { $previewvideo.removeClass("hide-preload-shape"); } } function showElemOnend() { if ($showElemOnend) { $showElemOnend.removeClass('show-elem-onend'); } this.removeEventListener('ended', showElemOnend); } v.addEventListener('play', showElemOnplay); v.addEventListener('pause', function() { if (this.closest(".t396__elem") && !this.closest(".t396__elem").classList.contains("hide-elem-onplay")) hideElemOnplay(); }); v.addEventListener('ended', showElemOnend); if ($shapeFullscreen) { $shapeFullscreen.on('click', () => { if (!document.fullscreen) { v.play(); v.muted = false; if (v.requestFullscreen) { v.requestFullscreen(); } else if (v.webkitEnterFullscreen()) { v.webkitEnterFullscreen()(); } } }); document.addEventListener("fullscreenchange", e => { if (!document.fullscreen) v.muted = true; }); } /* После обновления стал скакать зум видео */ /* $tnatom.css('zoom','inherit'); */ setTimeout(function() { $tnatom.css('zoom',''); if (!true) window.dispatchEvent(new CustomEvent('resize')); v.addEventListener('webkitfullscreenchange', function(e) { let fullscreen = e.target.webkitDisplayingFullscreen !== undefined ? e.target.webkitDisplayingFullscreen : 'nowebkit'; if (fullscreen !== 'nowebkit') { if (fullscreen) {v.style.objectFit = 'contain';} else {v.style.objectFit = '';} } }); },200); }; if ((false && isMobile) || false) setTimeout(() => f(),2e3); else if (true) { v.addEventListener('canplay', f); setTimeout(() => { if (v.readyState === 0) { v.removeEventListener('canplay', f); f(); } },1e3); } else { v.addEventListener('loadedmetadata', f); /*v.muted = true;*/ } if ('rgba(0, 0, 0, 0.6)' !== 'rgba(0, 0, 0, 0)') { e.querySelector('.tn-atom').insertAdjacentHTML('afterBegin','
'); } if (switchElementShowOnhoverVideo && $shapePlayClick && $shapePlayClick.length && $shapePauseClick && $shapePauseClick.length) { let timeout, firstHover = false; function mousemoveShow() { if (false && false&& !firstHover) { firstHover = true; $shapePlayClick.css('opacity', ''); } if (timeout) clearTimeout(timeout); if (!$shapePlayClick.hasClass('annexx-onhover-video-show')) $shapePlayClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); if (!$shapePauseClick.hasClass('annexx-onhover-video-show')) $shapePauseClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); timeout = setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show'); setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show-pe') },300); },2000); } if ($previewvideo) $previewvideo.on('mousemove', mousemoveShow); $e.on('mousemove', mousemoveShow); } if (switchElementUnmuteOnhoverVideo && $shapeUnmuteClick && $shapeUnmuteClick.length && $shapeMuteClick && $shapeMuteClick.length) { let timeout, firstHover = false; function mousemoveShow() { if (false && false&& !firstHover) { firstUnmuteHover = true; if (switchElementMuteUnmute) { if (switchElementMuteUnmuteLoad === 'unmute') $shapeUnmuteClick.css('opacity', ''); else if (switchElementMuteUnmuteLoad === 'mute') $shapeMuteClick.css('opacity', ''); } else $shapeUnmuteClick.css('opacity', ''); } if (timeout) clearTimeout(timeout); if (!$shapeUnmuteClick.hasClass('annexx-onhover-video-show')) $shapeUnmuteClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); if (!$shapeMuteClick.hasClass('annexx-onhover-video-show')) $shapeMuteClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); timeout = setTimeout(function() { $shapeUnmuteClick.add($shapeMuteClick).removeClass('annexx-onhover-video-show'); setTimeout(function() { $shapeUnmuteClick.add($shapeMuteClick).removeClass('annexx-onhover-video-show-pe') },300); },2000); } if ($previewvideo) $previewvideo.on('mousemove', mousemoveShow); $e.on('mousemove', mousemoveShow); } setTimeout(function() { /*Закомментировал блок ниже, так как тильда вроде попарвила масштабирование*/ /*if (/opr/i.test(navigator.userAgent) && false) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d}:not(.t-animate), .annexx-wrapper-video-in-shape${d} .tn-atom__scale-wrapper { overflow: hidden; } .t396__elem.tn-elem.annexx-wrapper-video-in-shape${d}:not(.t-animate) .tn-atom__scale-wrapper { transform: none !important; } `); } else if (/firefox/i.test(navigator.userAgent)) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d} .tn-atom__scale-wrapper { overflow: hidden; } `); } else if (!false && !/opr/i.test(navigator.userAgent) && !false) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d} { overflow: hidden; } `); }*/ let $tab = $('.t395__tab, .t397__tab'), videoBlockId = +$e.closest('.r').attr('id').replace(/\D+/,''), $tabVideo = $tab.filter((i,e) => $(e).data('tab-rec-ids').toString().split(',').some(e => +e === videoBlockId)); if ($tabVideo.length) { function processTab() { if ($tabVideo[0].classList.value.indexOf('tab_active') !== -1) { let action = 'mute,pause'.split(','); if (action.some(e => e === 'mute')) v.muted = true; else v.muted = false; if (action.some(e => e === 'pause')) v.pause(); else v.play(); if (action.some(e => e === 'start')) v.currentTime = 0; } else { let action = 'mute,pause'.split(','); if (action.some(e => e === 'mute')) v.muted = true; else v.muted = false; if (action.some(e => e === 'pause')) v.pause(); else v.play(); } } let config = { attributes: true, childList: false, characterData: false, }; observer = new MutationObserver(processTab); observer.observe($tabVideo[0], config); } /* Баг с тем что не применяется автоскейл тильды к шейпам с видео*/ /*function autoscaleVideoFix() { setTimeout(function(){ if ($e.closest('.t396__artboard_scale').length && !e.style.zoom) { $e.css('transform','scale(' + window.tn_scale_factor + ')'); } },1e3); } autoscaleVideoFix(); $(window).on("resize", autoscaleVideoFix);*/ },500); }); }).then(function() { if (!window.annexxTabClickPauseVideo) window.annexxTabClickPauseVideo = true; $('.t395__tab').on("click", e => { if ($(e.target).hasClass("t395__tab_active")) return false; $(e.target) .closest(".t395__tab") .siblings(".t395__tab:not('.t395__tab_active')") .each((i,el) => { let id = "rec" + $(el).data("tab-rec-ids"); arrAnnexxVideoTooltip.forEach((e) => { if ($(e.el).closest(".r").attr("id") === id) e.function.pauseV(); }); }); }); let intFixSizeVideoShape; window.addEventListener('resize', function() { clearTimeout(intFixSizeVideoShape); intFixSizeVideoShape = setTimeout(fixSizeVideoShape, 500); }); $shape.find('.annexx-preloader-video-shape').fadeOut(500, function() { $(this).remove(); }); function isScrolledIntoView(elem,alwaysToStart) { let tnelem = elem.closest(".tn-elem"), docViewTop = window.pageYOffset, docViewBottom = docViewTop + window.innerHeight, elemHeight = elem.clientHeight, elemTop = parseInt(getComputedStyle(elem.closest(".t396__elem")).top) + elem.closest(".r").getBoundingClientRect().top + window.scrollY + (isMobile ? window.innerHeight / 2 : 0), elemBottom = elemTop + elemHeight, inViewport = elemBottom + playVideoVisibleOnScreenOffset = docViewTop - (elemHeight / 2); return inViewport; }; if (false && !(isSafari && isMobile)) { window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick && e.playElClick === d) { $(window).on('scroll', function() { let docViewTop = window.pageYOffset, docViewBottom = docViewTop + window.innerHeight, elemHeight = e.el.clientHeight, elemTop = e.el.getBoundingClientRect().top + window.scrollY, elemBottom = elemTop + elemHeight; if (elemTop > docViewBottom || elemBottom { tabSwitch = true; setTimeout(() => { tabSwitch = false; },1e3); }); window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick === d) { e.el.addEventListener('play', function(e) { if (tabSwitch) return false; if (!playHTML) { if (!playVideoVisibleOnScreen) { window.arrAnnexxVideoTooltip.forEach(el => { if (el.el === e.target) playV(el); }); } playHTML = true; } if (switchElementPlayPause) { if (switchElementPlayPauseFirst) { setTimeout(function() { switchElementPlayPauseFirst = false; }, 1e3); } else { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } }; } }); e.el.addEventListener('pause', function() { pauseVAddon(); }); e.el.addEventListener('volumechange', function(e) { if (!e.target.muted || !e.target.volume) { unmute(); if (!e.target.paused) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick !== d) { setTimeout(function () { e.el.muted = true; if (e.switchElementMuteUnmute) { if (e.elements.shapeMuteClick) e.elements.shapeMuteClick.hide(); if (e.elements.shapeUnmuteClick) e.elements.shapeUnmuteClick.css('display', 'table'); } },200); } }); } } else mute(); }); } }); if (!switchElementPlayPause) { if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } else { switch (switchElementPlayPauseLoad) { case 'play': if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } break; case 'pause': if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } break; } } function checkPlayed() { let r = false; window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && !e.el.paused) r = true; }); return r; } let toc; if($shapePlayClick) { let toc; $shapePlayClick.on('click', function() { if (false && checkPlayed()) { clearTimeout(toc); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } return false; } if (false) { $shapePlayClick.hide(); if ($shapePlayHover) $shapePlayHover.hide(); $shape.find('video').attr('controls',''); } clearTimeout(toc); toc = setTimeout(function() { playV(undefined, playVideoUnmuteClick, playVideoFromStart); },0); if (switchElementPlayPause) { $shapePlayClick.hide(); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } if ($shapePlayAnalytic) { let $el = $shapePlayAnalytic.find('a'); Tilda.sendEventToStatistics($el.data('tilda-event-name'), $el.text()); } }); } let toh; if ($shapePlayHover) { $shapePlayHover.on('mouseover', function() { if (false && checkPlayed()) { clearTimeout(toh); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } return false; } if (false) { if ($shapePlayClick) $shapePlayClick.hide(); $shapePlayHover.hide(); $shape.find('video').attr('controls',''); } if (playVideoTimeout && !timeoutReady) return false; clearTimeout(toh); toh = setTimeout(function() { playV(undefined, undefined, playVideoFromStart); },0); if (switchElementPlayPause) { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } }); if (!playVideoWhenMouseleave) { $shapePlayHover.on('mouseout', function() { if (playVideoTimeout && !timeoutReady) return false; window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d){ clearTimeout(toh); pauseV(); if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } } }); }); } } if ($shapePauseClick) { $shapePauseClick.on('click', function() { clearTimeout(toc); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } }); } if ($shapePauseHover) { $shapePauseHover.on('mouseover', function() { clearTimeout(toh); pauseV(); }); if (pauseVideoWhenMouseover) { $shapePauseHover.on('mouseout', function() { if (playVideoTimeout && !timeoutReady) return false; toh = setTimeout(function() { playV(); },0); if (switchElementPlayPause) { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } }); } } if ($shapeMuteClick){ $shapeMuteClick.on('click', function() { playVideoUnmuteClick = false; mute(); }); } if ($shapeUnmuteClick){ $shapeUnmuteClick.on('click', function() { playVideoUnmuteClick = true; unmute(); }); if ($shapeUnmuteAnalytic) { let $el = $shapeUnmuteAnalytic.find('a'); Tilda.sendEventToStatistics($el.data('tilda-event-name'), $el.text()); } } if ($shapeMuteHover)$shapeMuteHover.on('mouseover', mute); if ($shapeUnmuteHover)$shapeUnmuteHover.on('mouseover', unmute); if (!switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } else { switch (switchElementMuteUnmuteLoad) { case 'mute': if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); break; case 'unmute': if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); break; } } let g = Math.round(Math.random()*1e10); setTimeout(function() { if ((playOnloadPage || playVideoTimeout || playVideoVisibleOnScreen) && !$shape.find('video').data('mobileHasPlay')) { if (isMobile) $('body').on('touchstart.loadVideo' + g, firstLoadVideo); else $('body').on('click.loadVideo' + g, firstLoadVideo); } },500); function firstLoadVideo() { let c = function () { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && e.el.paused) { let l = e.el; l.muted = true; l.play().then(() => { l.pause(); if ($(l).attr('autoplay'))playV(); }); } }); }; c(); if (isMobile) $('body').off('touchstart.loadVideo' + g); else $('body').off('click.loadVideo' + g); rv = true; /* return c(); */ } function popupShowAction(mutationList, observer) { mutationList.forEach(function(mutation) { switch(mutation.type) { case 'attributes': if ($('body').hasClass('t-body_popupshowed')) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.service === 'direct') { switch (e.actionOpenPopup) { case 'mute': e.el.muted = true; e.el.play(); e.buttonMute = true; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } break; case 'pause': e.el.pause(); if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } break; case 'start': e.el.muted = true; e.el.currentTime = 0; setTimeout(() => { if (e.el.paused) e.el.play(); }, 200); e.buttonMute = true; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } break; } } }); } break; } }); } let observerOptions = { childList: false, attributes: true, subtree: false }, observer = new MutationObserver(popupShowAction); observer.observe($('body')[0], observerOptions); $(document).on('click', '.t-popup', function() { if (!$(this).hasClass('t-popup_show')) { this.querySelectorAll('video').forEach(function(e) { e.pause(); }); } }); }); } }); }());
logo
web
name
packaging
branding
cmm
` : ''} `); let v = $e.find('video')[0], f = function() { annexxAddStyle('011','.' + e.className.replace(/\s+/g,'.') + ' {display:table;}'); let $removeelementload = $(''); if ($removeelementload.length) $('').remove(); window.arrAnnexxVideoTooltip.push({'el': $e.find('video')[0], 'service': 'direct','modtype': '011', 'playElClick': d, 'buttonMute': 'no','actionPlayAnotherVideo': actionPlayAnotherVideo,'actionOpenPopup': actionOpenPopup, 'actionCloseTab': 'mute,pause'.split(','), elements: {shapePlayClick: $shapePlayClick, shapePlayHover: $shapePlayHover,shapePauseClick: $shapePauseClick, shapePauseHover: $shapePauseHover, shapeUnmuteClick: $shapeUnmuteClick, shapeMuteClick: $shapeMuteClick, shapeMuteHover: $shapeMuteHover, shapeUnmuteHover: $shapeUnmuteHover}, 'switchElementMuteUnmute': switchElementMuteUnmute, function: {playV: playV, pauseV: pauseV, mute: mute}}); ll--; if (!ll) resolve(); if (userFunctionNameEnd) { v.addEventListener('ended', function() { window.arrAnnexxVideoTooltip.userFunction.forEach(function(e) { if (e === userFunctionNameEnd) window[e](); }); }); } if (autoplay){ v.muted = true; function pl() { try { v.play(); } catch (e) {} } pl(); setTimeout(pl,1e3); } v.removeEventListener('canplay', f); function showElemOnplay() { if ($showElemOnplay) { $showElemOnplay.removeClass('hide-elem-onplay'); } if ($hideElemOnplay) { $hideElemOnplay.addClass('hide-elem-onplay'); } if (false) { this.removeEventListener('play',showElemOnplay); this.removeEventListener('pause',hideElemOnplay); } if ($previewvideo) { $previewvideo.addClass("hide-preload-shape"); if (!previewOnPause) $previewvideo = false; } } function hideElemOnplay() { if ($showElemOnplay) { $showElemOnplay.addClass('hide-elem-onplay'); } if ($hideElemOnplay) { $hideElemOnplay.removeClass('hide-elem-onplay'); } if ($previewvideo) { $previewvideo.removeClass("hide-preload-shape"); } } function showElemOnend() { if ($showElemOnend) { $showElemOnend.removeClass('show-elem-onend'); } this.removeEventListener('ended', showElemOnend); } v.addEventListener('play', showElemOnplay); v.addEventListener('pause', function() { if (this.closest(".t396__elem") && !this.closest(".t396__elem").classList.contains("hide-elem-onplay")) hideElemOnplay(); }); v.addEventListener('ended', showElemOnend); if ($shapeFullscreen) { $shapeFullscreen.on('click', () => { if (!document.fullscreen) { v.play(); v.muted = false; if (v.requestFullscreen) { v.requestFullscreen(); } else if (v.webkitEnterFullscreen()) { v.webkitEnterFullscreen()(); } } }); document.addEventListener("fullscreenchange", e => { if (!document.fullscreen) v.muted = true; }); } /* После обновления стал скакать зум видео */ /* $tnatom.css('zoom','inherit'); */ setTimeout(function() { $tnatom.css('zoom',''); if (!true) window.dispatchEvent(new CustomEvent('resize')); v.addEventListener('webkitfullscreenchange', function(e) { let fullscreen = e.target.webkitDisplayingFullscreen !== undefined ? e.target.webkitDisplayingFullscreen : 'nowebkit'; if (fullscreen !== 'nowebkit') { if (fullscreen) {v.style.objectFit = 'contain';} else {v.style.objectFit = '';} } }); },200); }; if ((false && isMobile) || false) setTimeout(() => f(),2e3); else if (true) { v.addEventListener('canplay', f); setTimeout(() => { if (v.readyState === 0) { v.removeEventListener('canplay', f); f(); } },1e3); } else { v.addEventListener('loadedmetadata', f); /*v.muted = true;*/ } if ('rgba(0,0,0,0)' !== 'rgba(0, 0, 0, 0)') { e.querySelector('.tn-atom').insertAdjacentHTML('afterBegin','
'); } if (switchElementShowOnhoverVideo && $shapePlayClick && $shapePlayClick.length && $shapePauseClick && $shapePauseClick.length) { let timeout, firstHover = false; function mousemoveShow() { if (false && false&& !firstHover) { firstHover = true; $shapePlayClick.css('opacity', ''); } if (timeout) clearTimeout(timeout); if (!$shapePlayClick.hasClass('annexx-onhover-video-show')) $shapePlayClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); if (!$shapePauseClick.hasClass('annexx-onhover-video-show')) $shapePauseClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); timeout = setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show'); setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show-pe') },300); },2000); } if ($previewvideo) $previewvideo.on('mousemove', mousemoveShow); $e.on('mousemove', mousemoveShow); } if (switchElementUnmuteOnhoverVideo && $shapeUnmuteClick && $shapeUnmuteClick.length && $shapeMuteClick && $shapeMuteClick.length) { let timeout, firstHover = false; function mousemoveShow() { if (false && false&& !firstHover) { firstUnmuteHover = true; if (switchElementMuteUnmute) { if (switchElementMuteUnmuteLoad === 'unmute') $shapeUnmuteClick.css('opacity', ''); else if (switchElementMuteUnmuteLoad === 'mute') $shapeMuteClick.css('opacity', ''); } else $shapeUnmuteClick.css('opacity', ''); } if (timeout) clearTimeout(timeout); if (!$shapeUnmuteClick.hasClass('annexx-onhover-video-show')) $shapeUnmuteClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); if (!$shapeMuteClick.hasClass('annexx-onhover-video-show')) $shapeMuteClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); timeout = setTimeout(function() { $shapeUnmuteClick.add($shapeMuteClick).removeClass('annexx-onhover-video-show'); setTimeout(function() { $shapeUnmuteClick.add($shapeMuteClick).removeClass('annexx-onhover-video-show-pe') },300); },2000); } if ($previewvideo) $previewvideo.on('mousemove', mousemoveShow); $e.on('mousemove', mousemoveShow); } setTimeout(function() { /*Закомментировал блок ниже, так как тильда вроде попарвила масштабирование*/ /*if (/opr/i.test(navigator.userAgent) && false) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d}:not(.t-animate), .annexx-wrapper-video-in-shape${d} .tn-atom__scale-wrapper { overflow: hidden; } .t396__elem.tn-elem.annexx-wrapper-video-in-shape${d}:not(.t-animate) .tn-atom__scale-wrapper { transform: none !important; } `); } else if (/firefox/i.test(navigator.userAgent)) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d} .tn-atom__scale-wrapper { overflow: hidden; } `); } else if (!false && !/opr/i.test(navigator.userAgent) && !false) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d} { overflow: hidden; } `); }*/ let $tab = $('.t395__tab, .t397__tab'), videoBlockId = +$e.closest('.r').attr('id').replace(/\D+/,''), $tabVideo = $tab.filter((i,e) => $(e).data('tab-rec-ids').toString().split(',').some(e => +e === videoBlockId)); if ($tabVideo.length) { function processTab() { if ($tabVideo[0].classList.value.indexOf('tab_active') !== -1) { let action = 'mute,pause'.split(','); if (action.some(e => e === 'mute')) v.muted = true; else v.muted = false; if (action.some(e => e === 'pause')) v.pause(); else v.play(); if (action.some(e => e === 'start')) v.currentTime = 0; } else { let action = 'mute,pause'.split(','); if (action.some(e => e === 'mute')) v.muted = true; else v.muted = false; if (action.some(e => e === 'pause')) v.pause(); else v.play(); } } let config = { attributes: true, childList: false, characterData: false, }; observer = new MutationObserver(processTab); observer.observe($tabVideo[0], config); } /* Баг с тем что не применяется автоскейл тильды к шейпам с видео*/ /*function autoscaleVideoFix() { setTimeout(function(){ if ($e.closest('.t396__artboard_scale').length && !e.style.zoom) { $e.css('transform','scale(' + window.tn_scale_factor + ')'); } },1e3); } autoscaleVideoFix(); $(window).on("resize", autoscaleVideoFix);*/ },500); }); }).then(function() { if (!window.annexxTabClickPauseVideo) window.annexxTabClickPauseVideo = true; $('.t395__tab').on("click", e => { if ($(e.target).hasClass("t395__tab_active")) return false; $(e.target) .closest(".t395__tab") .siblings(".t395__tab:not('.t395__tab_active')") .each((i,el) => { let id = "rec" + $(el).data("tab-rec-ids"); arrAnnexxVideoTooltip.forEach((e) => { if ($(e.el).closest(".r").attr("id") === id) e.function.pauseV(); }); }); }); let intFixSizeVideoShape; window.addEventListener('resize', function() { clearTimeout(intFixSizeVideoShape); intFixSizeVideoShape = setTimeout(fixSizeVideoShape, 500); }); $shape.find('.annexx-preloader-video-shape').fadeOut(500, function() { $(this).remove(); }); function isScrolledIntoView(elem,alwaysToStart) { let tnelem = elem.closest(".tn-elem"), docViewTop = window.pageYOffset, docViewBottom = docViewTop + window.innerHeight, elemHeight = elem.clientHeight, elemTop = parseInt(getComputedStyle(elem.closest(".t396__elem")).top) + elem.closest(".r").getBoundingClientRect().top + window.scrollY + (isMobile ? window.innerHeight / 2 : 0), elemBottom = elemTop + elemHeight, inViewport = elemBottom + playVideoVisibleOnScreenOffset = docViewTop - (elemHeight / 2); return inViewport; }; if (false && !(isSafari && isMobile)) { window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick && e.playElClick === d) { $(window).on('scroll', function() { let docViewTop = window.pageYOffset, docViewBottom = docViewTop + window.innerHeight, elemHeight = e.el.clientHeight, elemTop = e.el.getBoundingClientRect().top + window.scrollY, elemBottom = elemTop + elemHeight; if (elemTop > docViewBottom || elemBottom { tabSwitch = true; setTimeout(() => { tabSwitch = false; },1e3); }); window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick === d) { e.el.addEventListener('play', function(e) { if (tabSwitch) return false; if (!playHTML) { if (!playVideoVisibleOnScreen) { window.arrAnnexxVideoTooltip.forEach(el => { if (el.el === e.target) playV(el); }); } playHTML = true; } if (switchElementPlayPause) { if (switchElementPlayPauseFirst) { setTimeout(function() { switchElementPlayPauseFirst = false; }, 1e3); } else { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } }; } }); e.el.addEventListener('pause', function() { pauseVAddon(); }); e.el.addEventListener('volumechange', function(e) { if (!e.target.muted || !e.target.volume) { unmute(); if (!e.target.paused) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick !== d) { setTimeout(function () { e.el.muted = true; if (e.switchElementMuteUnmute) { if (e.elements.shapeMuteClick) e.elements.shapeMuteClick.hide(); if (e.elements.shapeUnmuteClick) e.elements.shapeUnmuteClick.css('display', 'table'); } },200); } }); } } else mute(); }); } }); if (!switchElementPlayPause) { if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } else { switch (switchElementPlayPauseLoad) { case 'play': if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } break; case 'pause': if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } break; } } function checkPlayed() { let r = false; window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && !e.el.paused) r = true; }); return r; } let toc; if($shapePlayClick) { let toc; $shapePlayClick.on('click', function() { if (false && checkPlayed()) { clearTimeout(toc); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } return false; } if (false) { $shapePlayClick.hide(); if ($shapePlayHover) $shapePlayHover.hide(); $shape.find('video').attr('controls',''); } clearTimeout(toc); toc = setTimeout(function() { playV(undefined, playVideoUnmuteClick, playVideoFromStart); },0); if (switchElementPlayPause) { $shapePlayClick.hide(); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } if ($shapePlayAnalytic) { let $el = $shapePlayAnalytic.find('a'); Tilda.sendEventToStatistics($el.data('tilda-event-name'), $el.text()); } }); } let toh; if ($shapePlayHover) { $shapePlayHover.on('mouseover', function() { if (false && checkPlayed()) { clearTimeout(toh); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } return false; } if (false) { if ($shapePlayClick) $shapePlayClick.hide(); $shapePlayHover.hide(); $shape.find('video').attr('controls',''); } if (playVideoTimeout && !timeoutReady) return false; clearTimeout(toh); toh = setTimeout(function() { playV(undefined, undefined, playVideoFromStart); },0); if (switchElementPlayPause) { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } }); if (!playVideoWhenMouseleave) { $shapePlayHover.on('mouseout', function() { if (playVideoTimeout && !timeoutReady) return false; window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d){ clearTimeout(toh); pauseV(); if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } } }); }); } } if ($shapePauseClick) { $shapePauseClick.on('click', function() { clearTimeout(toc); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } }); } if ($shapePauseHover) { $shapePauseHover.on('mouseover', function() { clearTimeout(toh); pauseV(); }); if (pauseVideoWhenMouseover) { $shapePauseHover.on('mouseout', function() { if (playVideoTimeout && !timeoutReady) return false; toh = setTimeout(function() { playV(); },0); if (switchElementPlayPause) { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } }); } } if ($shapeMuteClick){ $shapeMuteClick.on('click', function() { playVideoUnmuteClick = false; mute(); }); } if ($shapeUnmuteClick){ $shapeUnmuteClick.on('click', function() { playVideoUnmuteClick = true; unmute(); }); if ($shapeUnmuteAnalytic) { let $el = $shapeUnmuteAnalytic.find('a'); Tilda.sendEventToStatistics($el.data('tilda-event-name'), $el.text()); } } if ($shapeMuteHover)$shapeMuteHover.on('mouseover', mute); if ($shapeUnmuteHover)$shapeUnmuteHover.on('mouseover', unmute); if (!switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } else { switch (switchElementMuteUnmuteLoad) { case 'mute': if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); break; case 'unmute': if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); break; } } let g = Math.round(Math.random()*1e10); setTimeout(function() { if ((playOnloadPage || playVideoTimeout || playVideoVisibleOnScreen) && !$shape.find('video').data('mobileHasPlay')) { if (isMobile) $('body').on('touchstart.loadVideo' + g, firstLoadVideo); else $('body').on('click.loadVideo' + g, firstLoadVideo); } },500); function firstLoadVideo() { let c = function () { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && e.el.paused) { let l = e.el; l.muted = true; l.play().then(() => { l.pause(); if ($(l).attr('autoplay'))playV(); }); } }); }; c(); if (isMobile) $('body').off('touchstart.loadVideo' + g); else $('body').off('click.loadVideo' + g); rv = true; /* return c(); */ } function popupShowAction(mutationList, observer) { mutationList.forEach(function(mutation) { switch(mutation.type) { case 'attributes': if ($('body').hasClass('t-body_popupshowed')) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.service === 'direct') { switch (e.actionOpenPopup) { case 'mute': e.el.muted = true; e.el.play(); e.buttonMute = true; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } break; case 'pause': e.el.pause(); if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } break; case 'start': e.el.muted = true; e.el.currentTime = 0; setTimeout(() => { if (e.el.paused) e.el.play(); }, 200); e.buttonMute = true; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } break; } } }); } break; } }); } let observerOptions = { childList: false, attributes: true, subtree: false }, observer = new MutationObserver(popupShowAction); observer.observe($('body')[0], observerOptions); $(document).on('click', '.t-popup', function() { if (!$(this).hasClass('t-popup_show')) { this.querySelectorAll('video').forEach(function(e) { e.pause(); }); } }); }); } }); }());
CREATIVES
Our story started 15 years ago when we began as design agency for startups and gradually have been gaining experience in related areas. At present, we unite top niche experts around digital products. From brand strategy to web development to digital marketing, beautiful design isn't just what we do; it's our life's work
01 – About Us
|
02 – Capabilities
design
Fueled by strategy and backed by strong technical ability and experience, we execute designs that are purposeful as well as beautiful
LET'S GO!
branding
LET'S GO!
LET'S GO!
ui/ux
identity
LET'S GO!
packaging
web
We have over 15 years' experience creating user focused and highly effective websites using agile principles
e-com
LET'S GO!
web studio
Create a seamless shopping experience online in different sales channels via delivering an omnichannel strategy: online business, retail network and b2b sales
LET'S GO!
LET'S GO!
development
seo optimization
LET'S GO!
online-store
LET'S GO!
mobile development
LET'S GO!
social com
pro
Combining strategy, creativity, technical ability and years of knowledge we help clients create and manage integrated digital channels that engage customers. With the focus on achieving the results they require
LET'S GO!
LET'S GO!
design systems
digital marketing
LET'S GO!
gtm strategy
orm
We monitor conversations on client's behalf and help to come up with responses for negative publicity. We keep you informed of how people view your brand or business
LET'S GO!
LET'S GO!
SEO services
Reputation Management
{ online Reputation Management }
02 – Capabilities
design
Fueled by strategy and backed by strong technical ability and experience, we execute designs that are purposeful as well as beautiful
e-com
Create a seamless shopping experience online in different sales channels via delivering an omnichannel strategy: online business, retail network and b2b sales
web
We have over 15 years' experience creating user focused and highly effective websites using agile principles
pro
Combining strategy, creativity, technical ability and years of knowledge we help clients create and manage integrated digital channels that engage customers. With the focus on achieving the results they require
orm
We monitor conversations on client's behalf and help to come up with responses for negative publicity. We keep you informed of how people view your brand or business
LET'S GO!
branding
LET'S GO!
ui/ux
LET'S GO!
identity
LET'S GO!
packaging
LET'S GO!
online-store
LET'S GO!
mobile development
LET'S GO!
social com
LET'S GO!
LET'S GO!
web studio
LET'S GO!
development
LET'S GO!
LET'S GO!
seo optimization
design systems
digital marketing
LET'S GO!
gtm strategy
LET'S GO!
Reputation Management
LET'S GO!
SEO services
{ online Reputation Management }
Our mission is to design and build digital products, curate user experiences, invest in bright ideas and turn complex problems into growth opportunities
03 – Our Differenties
bene
fits
niche expertise
Digitall is a group of divisions with focus on key digital areas. Niche expertise allows us to make every aspect of the product win, also knowledge base and out of the box thinking all together come up with creative breakthroughts
proper
handoff
Being in sync and knowing the peculiarities of each other work, we minimize headaches and risks and guarantee approriate design-to-development handoff
niche expertise
Digitall is a group of divisions with focus on key digital areas. Niche expertise allows us to make every aspect of the product win, also knowledge base and out of the box thinking all together come up with creative breakthroughts
proper
handoff
Being in sync and knowing the peculiarities of each other work, we minimize headaches and risks and guarantee approriate design-to-development handoff
We guide web brands, across platforms and places, through agile design and digital experience
logo
packaging
cases
04 – Portfolio
web
name
web
logo
name
logo
packaging
web
branding
logo
packaging
web
ecom
logo
branding
web
web
packaging
logo
logo
web
branding
logo
packaging
web
ecom
` : ''} `); let v = $e.find('video')[0], f = function() { annexxAddStyle('011','.' + e.className.replace(/\s+/g,'.') + ' {display:table;}'); let $removeelementload = $(''); if ($removeelementload.length) $('').remove(); window.arrAnnexxVideoTooltip.push({'el': $e.find('video')[0], 'service': 'direct','modtype': '011', 'playElClick': d, 'buttonMute': 'no','actionPlayAnotherVideo': actionPlayAnotherVideo,'actionOpenPopup': actionOpenPopup, 'actionCloseTab': 'mute,pause'.split(','), elements: {shapePlayClick: $shapePlayClick, shapePlayHover: $shapePlayHover,shapePauseClick: $shapePauseClick, shapePauseHover: $shapePauseHover, shapeUnmuteClick: $shapeUnmuteClick, shapeMuteClick: $shapeMuteClick, shapeMuteHover: $shapeMuteHover, shapeUnmuteHover: $shapeUnmuteHover}, 'switchElementMuteUnmute': switchElementMuteUnmute, function: {playV: playV, pauseV: pauseV, mute: mute}}); ll--; if (!ll) resolve(); if (userFunctionNameEnd) { v.addEventListener('ended', function() { window.arrAnnexxVideoTooltip.userFunction.forEach(function(e) { if (e === userFunctionNameEnd) window[e](); }); }); } if (autoplay){ v.muted = true; function pl() { try { v.play(); } catch (e) {} } pl(); setTimeout(pl,1e3); } v.removeEventListener('canplay', f); function showElemOnplay() { if ($showElemOnplay) { $showElemOnplay.removeClass('hide-elem-onplay'); } if ($hideElemOnplay) { $hideElemOnplay.addClass('hide-elem-onplay'); } if (false) { this.removeEventListener('play',showElemOnplay); this.removeEventListener('pause',hideElemOnplay); } if ($previewvideo) { $previewvideo.addClass("hide-preload-shape"); if (!previewOnPause) $previewvideo = false; } } function hideElemOnplay() { if ($showElemOnplay) { $showElemOnplay.addClass('hide-elem-onplay'); } if ($hideElemOnplay) { $hideElemOnplay.removeClass('hide-elem-onplay'); } if ($previewvideo) { $previewvideo.removeClass("hide-preload-shape"); } } function showElemOnend() { if ($showElemOnend) { $showElemOnend.removeClass('show-elem-onend'); } this.removeEventListener('ended', showElemOnend); } v.addEventListener('play', showElemOnplay); v.addEventListener('pause', function() { if (this.closest(".t396__elem") && !this.closest(".t396__elem").classList.contains("hide-elem-onplay")) hideElemOnplay(); }); v.addEventListener('ended', showElemOnend); if ($shapeFullscreen) { $shapeFullscreen.on('click', () => { if (!document.fullscreen) { v.play(); v.muted = false; if (v.requestFullscreen) { v.requestFullscreen(); } else if (v.webkitEnterFullscreen()) { v.webkitEnterFullscreen()(); } } }); document.addEventListener("fullscreenchange", e => { if (!document.fullscreen) v.muted = true; }); } /* После обновления стал скакать зум видео */ /* $tnatom.css('zoom','inherit'); */ setTimeout(function() { $tnatom.css('zoom',''); if (!true) window.dispatchEvent(new CustomEvent('resize')); v.addEventListener('webkitfullscreenchange', function(e) { let fullscreen = e.target.webkitDisplayingFullscreen !== undefined ? e.target.webkitDisplayingFullscreen : 'nowebkit'; if (fullscreen !== 'nowebkit') { if (fullscreen) {v.style.objectFit = 'contain';} else {v.style.objectFit = '';} } }); },200); }; if ((false && isMobile) || false) setTimeout(() => f(),2e3); else if (true) { v.addEventListener('canplay', f); setTimeout(() => { if (v.readyState === 0) { v.removeEventListener('canplay', f); f(); } },1e3); } else { v.addEventListener('loadedmetadata', f); /*v.muted = true;*/ } if ('rgba(0,0,0,0)' !== 'rgba(0, 0, 0, 0)') { e.querySelector('.tn-atom').insertAdjacentHTML('afterBegin','
'); } if (switchElementShowOnhoverVideo && $shapePlayClick && $shapePlayClick.length && $shapePauseClick && $shapePauseClick.length) { let timeout, firstHover = false; function mousemoveShow() { if (false && false&& !firstHover) { firstHover = true; $shapePlayClick.css('opacity', ''); } if (timeout) clearTimeout(timeout); if (!$shapePlayClick.hasClass('annexx-onhover-video-show')) $shapePlayClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); if (!$shapePauseClick.hasClass('annexx-onhover-video-show')) $shapePauseClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); timeout = setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show'); setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show-pe') },300); },2000); } if ($previewvideo) $previewvideo.on('mousemove', mousemoveShow); $e.on('mousemove', mousemoveShow); } if (switchElementUnmuteOnhoverVideo && $shapeUnmuteClick && $shapeUnmuteClick.length && $shapeMuteClick && $shapeMuteClick.length) { let timeout, firstHover = false; function mousemoveShow() { if (false && false&& !firstHover) { firstUnmuteHover = true; if (switchElementMuteUnmute) { if (switchElementMuteUnmuteLoad === 'unmute') $shapeUnmuteClick.css('opacity', ''); else if (switchElementMuteUnmuteLoad === 'mute') $shapeMuteClick.css('opacity', ''); } else $shapeUnmuteClick.css('opacity', ''); } if (timeout) clearTimeout(timeout); if (!$shapeUnmuteClick.hasClass('annexx-onhover-video-show')) $shapeUnmuteClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); if (!$shapeMuteClick.hasClass('annexx-onhover-video-show')) $shapeMuteClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); timeout = setTimeout(function() { $shapeUnmuteClick.add($shapeMuteClick).removeClass('annexx-onhover-video-show'); setTimeout(function() { $shapeUnmuteClick.add($shapeMuteClick).removeClass('annexx-onhover-video-show-pe') },300); },2000); } if ($previewvideo) $previewvideo.on('mousemove', mousemoveShow); $e.on('mousemove', mousemoveShow); } setTimeout(function() { /*Закомментировал блок ниже, так как тильда вроде попарвила масштабирование*/ /*if (/opr/i.test(navigator.userAgent) && false) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d}:not(.t-animate), .annexx-wrapper-video-in-shape${d} .tn-atom__scale-wrapper { overflow: hidden; } .t396__elem.tn-elem.annexx-wrapper-video-in-shape${d}:not(.t-animate) .tn-atom__scale-wrapper { transform: none !important; } `); } else if (/firefox/i.test(navigator.userAgent)) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d} .tn-atom__scale-wrapper { overflow: hidden; } `); } else if (!false && !/opr/i.test(navigator.userAgent) && !false) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d} { overflow: hidden; } `); }*/ let $tab = $('.t395__tab, .t397__tab'), videoBlockId = +$e.closest('.r').attr('id').replace(/\D+/,''), $tabVideo = $tab.filter((i,e) => $(e).data('tab-rec-ids').toString().split(',').some(e => +e === videoBlockId)); if ($tabVideo.length) { function processTab() { if ($tabVideo[0].classList.value.indexOf('tab_active') !== -1) { let action = 'mute,pause'.split(','); if (action.some(e => e === 'mute')) v.muted = true; else v.muted = false; if (action.some(e => e === 'pause')) v.pause(); else v.play(); if (action.some(e => e === 'start')) v.currentTime = 0; } else { let action = 'mute,pause'.split(','); if (action.some(e => e === 'mute')) v.muted = true; else v.muted = false; if (action.some(e => e === 'pause')) v.pause(); else v.play(); } } let config = { attributes: true, childList: false, characterData: false, }; observer = new MutationObserver(processTab); observer.observe($tabVideo[0], config); } /* Баг с тем что не применяется автоскейл тильды к шейпам с видео*/ /*function autoscaleVideoFix() { setTimeout(function(){ if ($e.closest('.t396__artboard_scale').length && !e.style.zoom) { $e.css('transform','scale(' + window.tn_scale_factor + ')'); } },1e3); } autoscaleVideoFix(); $(window).on("resize", autoscaleVideoFix);*/ },500); }); }).then(function() { if (!window.annexxTabClickPauseVideo) window.annexxTabClickPauseVideo = true; $('.t395__tab').on("click", e => { if ($(e.target).hasClass("t395__tab_active")) return false; $(e.target) .closest(".t395__tab") .siblings(".t395__tab:not('.t395__tab_active')") .each((i,el) => { let id = "rec" + $(el).data("tab-rec-ids"); arrAnnexxVideoTooltip.forEach((e) => { if ($(e.el).closest(".r").attr("id") === id) e.function.pauseV(); }); }); }); let intFixSizeVideoShape; window.addEventListener('resize', function() { clearTimeout(intFixSizeVideoShape); intFixSizeVideoShape = setTimeout(fixSizeVideoShape, 500); }); $shape.find('.annexx-preloader-video-shape').fadeOut(500, function() { $(this).remove(); }); function isScrolledIntoView(elem,alwaysToStart) { let tnelem = elem.closest(".tn-elem"), docViewTop = window.pageYOffset, docViewBottom = docViewTop + window.innerHeight, elemHeight = elem.clientHeight, elemTop = parseInt(getComputedStyle(elem.closest(".t396__elem")).top) + elem.closest(".r").getBoundingClientRect().top + window.scrollY + (isMobile ? window.innerHeight / 2 : 0), elemBottom = elemTop + elemHeight, inViewport = elemBottom + playVideoVisibleOnScreenOffset = docViewTop - (elemHeight / 2); return inViewport; }; if (false && !(isSafari && isMobile)) { window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick && e.playElClick === d) { $(window).on('scroll', function() { let docViewTop = window.pageYOffset, docViewBottom = docViewTop + window.innerHeight, elemHeight = e.el.clientHeight, elemTop = e.el.getBoundingClientRect().top + window.scrollY, elemBottom = elemTop + elemHeight; if (elemTop > docViewBottom || elemBottom { tabSwitch = true; setTimeout(() => { tabSwitch = false; },1e3); }); window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick === d) { e.el.addEventListener('play', function(e) { if (tabSwitch) return false; if (!playHTML) { if (!playVideoVisibleOnScreen) { window.arrAnnexxVideoTooltip.forEach(el => { if (el.el === e.target) playV(el); }); } playHTML = true; } if (switchElementPlayPause) { if (switchElementPlayPauseFirst) { setTimeout(function() { switchElementPlayPauseFirst = false; }, 1e3); } else { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } }; } }); e.el.addEventListener('pause', function() { pauseVAddon(); }); e.el.addEventListener('volumechange', function(e) { if (!e.target.muted || !e.target.volume) { unmute(); if (!e.target.paused) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick !== d) { setTimeout(function () { e.el.muted = true; if (e.switchElementMuteUnmute) { if (e.elements.shapeMuteClick) e.elements.shapeMuteClick.hide(); if (e.elements.shapeUnmuteClick) e.elements.shapeUnmuteClick.css('display', 'table'); } },200); } }); } } else mute(); }); } }); if (!switchElementPlayPause) { if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } else { switch (switchElementPlayPauseLoad) { case 'play': if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } break; case 'pause': if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } break; } } function checkPlayed() { let r = false; window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && !e.el.paused) r = true; }); return r; } let toc; if($shapePlayClick) { let toc; $shapePlayClick.on('click', function() { if (false && checkPlayed()) { clearTimeout(toc); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } return false; } if (false) { $shapePlayClick.hide(); if ($shapePlayHover) $shapePlayHover.hide(); $shape.find('video').attr('controls',''); } clearTimeout(toc); toc = setTimeout(function() { playV(undefined, playVideoUnmuteClick, playVideoFromStart); },0); if (switchElementPlayPause) { $shapePlayClick.hide(); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } if ($shapePlayAnalytic) { let $el = $shapePlayAnalytic.find('a'); Tilda.sendEventToStatistics($el.data('tilda-event-name'), $el.text()); } }); } let toh; if ($shapePlayHover) { $shapePlayHover.on('mouseover', function() { if (false && checkPlayed()) { clearTimeout(toh); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } return false; } if (false) { if ($shapePlayClick) $shapePlayClick.hide(); $shapePlayHover.hide(); $shape.find('video').attr('controls',''); } if (playVideoTimeout && !timeoutReady) return false; clearTimeout(toh); toh = setTimeout(function() { playV(undefined, undefined, playVideoFromStart); },0); if (switchElementPlayPause) { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } }); if (!playVideoWhenMouseleave) { $shapePlayHover.on('mouseout', function() { if (playVideoTimeout && !timeoutReady) return false; window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d){ clearTimeout(toh); pauseV(); if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } } }); }); } } if ($shapePauseClick) { $shapePauseClick.on('click', function() { clearTimeout(toc); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } }); } if ($shapePauseHover) { $shapePauseHover.on('mouseover', function() { clearTimeout(toh); pauseV(); }); if (pauseVideoWhenMouseover) { $shapePauseHover.on('mouseout', function() { if (playVideoTimeout && !timeoutReady) return false; toh = setTimeout(function() { playV(); },0); if (switchElementPlayPause) { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } }); } } if ($shapeMuteClick){ $shapeMuteClick.on('click', function() { playVideoUnmuteClick = false; mute(); }); } if ($shapeUnmuteClick){ $shapeUnmuteClick.on('click', function() { playVideoUnmuteClick = true; unmute(); }); if ($shapeUnmuteAnalytic) { let $el = $shapeUnmuteAnalytic.find('a'); Tilda.sendEventToStatistics($el.data('tilda-event-name'), $el.text()); } } if ($shapeMuteHover)$shapeMuteHover.on('mouseover', mute); if ($shapeUnmuteHover)$shapeUnmuteHover.on('mouseover', unmute); if (!switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } else { switch (switchElementMuteUnmuteLoad) { case 'mute': if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); break; case 'unmute': if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); break; } } let g = Math.round(Math.random()*1e10); setTimeout(function() { if ((playOnloadPage || playVideoTimeout || playVideoVisibleOnScreen) && !$shape.find('video').data('mobileHasPlay')) { if (isMobile) $('body').on('touchstart.loadVideo' + g, firstLoadVideo); else $('body').on('click.loadVideo' + g, firstLoadVideo); } },500); function firstLoadVideo() { let c = function () { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && e.el.paused) { let l = e.el; l.muted = true; l.play().then(() => { l.pause(); if ($(l).attr('autoplay'))playV(); }); } }); }; c(); if (isMobile) $('body').off('touchstart.loadVideo' + g); else $('body').off('click.loadVideo' + g); rv = true; /* return c(); */ } function popupShowAction(mutationList, observer) { mutationList.forEach(function(mutation) { switch(mutation.type) { case 'attributes': if ($('body').hasClass('t-body_popupshowed')) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.service === 'direct') { switch (e.actionOpenPopup) { case 'mute': e.el.muted = true; e.el.play(); e.buttonMute = true; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } break; case 'pause': e.el.pause(); if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } break; case 'start': e.el.muted = true; e.el.currentTime = 0; setTimeout(() => { if (e.el.paused) e.el.play(); }, 200); e.buttonMute = true; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } break; } } }); } break; } }); } let observerOptions = { childList: false, attributes: true, subtree: false }, observer = new MutationObserver(popupShowAction); observer.observe($('body')[0], observerOptions); $(document).on('click', '.t-popup', function() { if (!$(this).hasClass('t-popup_show')) { this.querySelectorAll('video').forEach(function(e) { e.pause(); }); } }); }); } }); }());
` : ''} `); let v = $e.find('video')[0], f = function() { annexxAddStyle('011','.' + e.className.replace(/\s+/g,'.') + ' {display:table;}'); let $removeelementload = $(''); if ($removeelementload.length) $('').remove(); window.arrAnnexxVideoTooltip.push({'el': $e.find('video')[0], 'service': 'direct','modtype': '011', 'playElClick': d, 'buttonMute': 'no','actionPlayAnotherVideo': actionPlayAnotherVideo,'actionOpenPopup': actionOpenPopup, 'actionCloseTab': 'mute,pause'.split(','), elements: {shapePlayClick: $shapePlayClick, shapePlayHover: $shapePlayHover,shapePauseClick: $shapePauseClick, shapePauseHover: $shapePauseHover, shapeUnmuteClick: $shapeUnmuteClick, shapeMuteClick: $shapeMuteClick, shapeMuteHover: $shapeMuteHover, shapeUnmuteHover: $shapeUnmuteHover}, 'switchElementMuteUnmute': switchElementMuteUnmute, function: {playV: playV, pauseV: pauseV, mute: mute}}); ll--; if (!ll) resolve(); if (userFunctionNameEnd) { v.addEventListener('ended', function() { window.arrAnnexxVideoTooltip.userFunction.forEach(function(e) { if (e === userFunctionNameEnd) window[e](); }); }); } if (autoplay){ v.muted = true; function pl() { try { v.play(); } catch (e) {} } pl(); setTimeout(pl,1e3); } v.removeEventListener('canplay', f); function showElemOnplay() { if ($showElemOnplay) { $showElemOnplay.removeClass('hide-elem-onplay'); } if ($hideElemOnplay) { $hideElemOnplay.addClass('hide-elem-onplay'); } if (false) { this.removeEventListener('play',showElemOnplay); this.removeEventListener('pause',hideElemOnplay); } if ($previewvideo) { $previewvideo.addClass("hide-preload-shape"); if (!previewOnPause) $previewvideo = false; } } function hideElemOnplay() { if ($showElemOnplay) { $showElemOnplay.addClass('hide-elem-onplay'); } if ($hideElemOnplay) { $hideElemOnplay.removeClass('hide-elem-onplay'); } if ($previewvideo) { $previewvideo.removeClass("hide-preload-shape"); } } function showElemOnend() { if ($showElemOnend) { $showElemOnend.removeClass('show-elem-onend'); } this.removeEventListener('ended', showElemOnend); } v.addEventListener('play', showElemOnplay); v.addEventListener('pause', function() { if (this.closest(".t396__elem") && !this.closest(".t396__elem").classList.contains("hide-elem-onplay")) hideElemOnplay(); }); v.addEventListener('ended', showElemOnend); if ($shapeFullscreen) { $shapeFullscreen.on('click', () => { if (!document.fullscreen) { v.play(); v.muted = false; if (v.requestFullscreen) { v.requestFullscreen(); } else if (v.webkitEnterFullscreen()) { v.webkitEnterFullscreen()(); } } }); document.addEventListener("fullscreenchange", e => { if (!document.fullscreen) v.muted = true; }); } /* После обновления стал скакать зум видео */ /* $tnatom.css('zoom','inherit'); */ setTimeout(function() { $tnatom.css('zoom',''); if (!true) window.dispatchEvent(new CustomEvent('resize')); v.addEventListener('webkitfullscreenchange', function(e) { let fullscreen = e.target.webkitDisplayingFullscreen !== undefined ? e.target.webkitDisplayingFullscreen : 'nowebkit'; if (fullscreen !== 'nowebkit') { if (fullscreen) {v.style.objectFit = 'contain';} else {v.style.objectFit = '';} } }); },200); }; if ((false && isMobile) || false) setTimeout(() => f(),2e3); else if (true) { v.addEventListener('canplay', f); setTimeout(() => { if (v.readyState === 0) { v.removeEventListener('canplay', f); f(); } },1e3); } else { v.addEventListener('loadedmetadata', f); /*v.muted = true;*/ } if ('rgba(0, 0, 0, 0)' !== 'rgba(0, 0, 0, 0)') { e.querySelector('.tn-atom').insertAdjacentHTML('afterBegin','
'); } if (switchElementShowOnhoverVideo && $shapePlayClick && $shapePlayClick.length && $shapePauseClick && $shapePauseClick.length) { let timeout, firstHover = false; function mousemoveShow() { if (false && false&& !firstHover) { firstHover = true; $shapePlayClick.css('opacity', ''); } if (timeout) clearTimeout(timeout); if (!$shapePlayClick.hasClass('annexx-onhover-video-show')) $shapePlayClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); if (!$shapePauseClick.hasClass('annexx-onhover-video-show')) $shapePauseClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); timeout = setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show'); setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show-pe') },300); },2000); } if ($previewvideo) $previewvideo.on('mousemove', mousemoveShow); $e.on('mousemove', mousemoveShow); } if (switchElementUnmuteOnhoverVideo && $shapeUnmuteClick && $shapeUnmuteClick.length && $shapeMuteClick && $shapeMuteClick.length) { let timeout, firstHover = false; function mousemoveShow() { if (false && false&& !firstHover) { firstUnmuteHover = true; if (switchElementMuteUnmute) { if (switchElementMuteUnmuteLoad === 'unmute') $shapeUnmuteClick.css('opacity', ''); else if (switchElementMuteUnmuteLoad === 'mute') $shapeMuteClick.css('opacity', ''); } else $shapeUnmuteClick.css('opacity', ''); } if (timeout) clearTimeout(timeout); if (!$shapeUnmuteClick.hasClass('annexx-onhover-video-show')) $shapeUnmuteClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); if (!$shapeMuteClick.hasClass('annexx-onhover-video-show')) $shapeMuteClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); timeout = setTimeout(function() { $shapeUnmuteClick.add($shapeMuteClick).removeClass('annexx-onhover-video-show'); setTimeout(function() { $shapeUnmuteClick.add($shapeMuteClick).removeClass('annexx-onhover-video-show-pe') },300); },2000); } if ($previewvideo) $previewvideo.on('mousemove', mousemoveShow); $e.on('mousemove', mousemoveShow); } setTimeout(function() { /*Закомментировал блок ниже, так как тильда вроде попарвила масштабирование*/ /*if (/opr/i.test(navigator.userAgent) && false) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d}:not(.t-animate), .annexx-wrapper-video-in-shape${d} .tn-atom__scale-wrapper { overflow: hidden; } .t396__elem.tn-elem.annexx-wrapper-video-in-shape${d}:not(.t-animate) .tn-atom__scale-wrapper { transform: none !important; } `); } else if (/firefox/i.test(navigator.userAgent)) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d} .tn-atom__scale-wrapper { overflow: hidden; } `); } else if (!false && !/opr/i.test(navigator.userAgent) && !false) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d} { overflow: hidden; } `); }*/ let $tab = $('.t395__tab, .t397__tab'), videoBlockId = +$e.closest('.r').attr('id').replace(/\D+/,''), $tabVideo = $tab.filter((i,e) => $(e).data('tab-rec-ids').toString().split(',').some(e => +e === videoBlockId)); if ($tabVideo.length) { function processTab() { if ($tabVideo[0].classList.value.indexOf('tab_active') !== -1) { let action = 'mute,pause'.split(','); if (action.some(e => e === 'mute')) v.muted = true; else v.muted = false; if (action.some(e => e === 'pause')) v.pause(); else v.play(); if (action.some(e => e === 'start')) v.currentTime = 0; } else { let action = 'mute,pause'.split(','); if (action.some(e => e === 'mute')) v.muted = true; else v.muted = false; if (action.some(e => e === 'pause')) v.pause(); else v.play(); } } let config = { attributes: true, childList: false, characterData: false, }; observer = new MutationObserver(processTab); observer.observe($tabVideo[0], config); } /* Баг с тем что не применяется автоскейл тильды к шейпам с видео*/ /*function autoscaleVideoFix() { setTimeout(function(){ if ($e.closest('.t396__artboard_scale').length && !e.style.zoom) { $e.css('transform','scale(' + window.tn_scale_factor + ')'); } },1e3); } autoscaleVideoFix(); $(window).on("resize", autoscaleVideoFix);*/ },500); }); }).then(function() { if (!window.annexxTabClickPauseVideo) window.annexxTabClickPauseVideo = true; $('.t395__tab').on("click", e => { if ($(e.target).hasClass("t395__tab_active")) return false; $(e.target) .closest(".t395__tab") .siblings(".t395__tab:not('.t395__tab_active')") .each((i,el) => { let id = "rec" + $(el).data("tab-rec-ids"); arrAnnexxVideoTooltip.forEach((e) => { if ($(e.el).closest(".r").attr("id") === id) e.function.pauseV(); }); }); }); let intFixSizeVideoShape; window.addEventListener('resize', function() { clearTimeout(intFixSizeVideoShape); intFixSizeVideoShape = setTimeout(fixSizeVideoShape, 500); }); $shape.find('.annexx-preloader-video-shape').fadeOut(500, function() { $(this).remove(); }); function isScrolledIntoView(elem,alwaysToStart) { let tnelem = elem.closest(".tn-elem"), docViewTop = window.pageYOffset, docViewBottom = docViewTop + window.innerHeight, elemHeight = elem.clientHeight, elemTop = parseInt(getComputedStyle(elem.closest(".t396__elem")).top) + elem.closest(".r").getBoundingClientRect().top + window.scrollY + (isMobile ? window.innerHeight / 2 : 0), elemBottom = elemTop + elemHeight, inViewport = elemBottom + playVideoVisibleOnScreenOffset = docViewTop - (elemHeight / 2); return inViewport; }; if (true && !(isSafari && isMobile)) { window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick && e.playElClick === d) { $(window).on('scroll', function() { let docViewTop = window.pageYOffset, docViewBottom = docViewTop + window.innerHeight, elemHeight = e.el.clientHeight, elemTop = e.el.getBoundingClientRect().top + window.scrollY, elemBottom = elemTop + elemHeight; if (elemTop > docViewBottom || elemBottom { tabSwitch = true; setTimeout(() => { tabSwitch = false; },1e3); }); window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick === d) { e.el.addEventListener('play', function(e) { if (tabSwitch) return false; if (!playHTML) { if (!playVideoVisibleOnScreen) { window.arrAnnexxVideoTooltip.forEach(el => { if (el.el === e.target) playV(el); }); } playHTML = true; } if (switchElementPlayPause) { if (switchElementPlayPauseFirst) { setTimeout(function() { switchElementPlayPauseFirst = false; }, 1e3); } else { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } }; } }); e.el.addEventListener('pause', function() { pauseVAddon(); }); e.el.addEventListener('volumechange', function(e) { if (!e.target.muted || !e.target.volume) { unmute(); if (!e.target.paused) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick !== d) { setTimeout(function () { e.el.muted = true; if (e.switchElementMuteUnmute) { if (e.elements.shapeMuteClick) e.elements.shapeMuteClick.hide(); if (e.elements.shapeUnmuteClick) e.elements.shapeUnmuteClick.css('display', 'table'); } },200); } }); } } else mute(); }); } }); if (!switchElementPlayPause) { if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } else { switch (switchElementPlayPauseLoad) { case 'play': if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } break; case 'pause': if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } break; } } function checkPlayed() { let r = false; window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && !e.el.paused) r = true; }); return r; } let toc; if($shapePlayClick) { let toc; $shapePlayClick.on('click', function() { if (false && checkPlayed()) { clearTimeout(toc); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } return false; } if (false) { $shapePlayClick.hide(); if ($shapePlayHover) $shapePlayHover.hide(); $shape.find('video').attr('controls',''); } clearTimeout(toc); toc = setTimeout(function() { playV(undefined, playVideoUnmuteClick, playVideoFromStart); },0); if (switchElementPlayPause) { $shapePlayClick.hide(); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } if ($shapePlayAnalytic) { let $el = $shapePlayAnalytic.find('a'); Tilda.sendEventToStatistics($el.data('tilda-event-name'), $el.text()); } }); } let toh; if ($shapePlayHover) { $shapePlayHover.on('mouseover', function() { if (false && checkPlayed()) { clearTimeout(toh); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } return false; } if (false) { if ($shapePlayClick) $shapePlayClick.hide(); $shapePlayHover.hide(); $shape.find('video').attr('controls',''); } if (playVideoTimeout && !timeoutReady) return false; clearTimeout(toh); toh = setTimeout(function() { playV(undefined, undefined, playVideoFromStart); },0); if (switchElementPlayPause) { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } }); if (!playVideoWhenMouseleave) { $shapePlayHover.on('mouseout', function() { if (playVideoTimeout && !timeoutReady) return false; window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d){ clearTimeout(toh); pauseV(); if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } } }); }); } } if ($shapePauseClick) { $shapePauseClick.on('click', function() { clearTimeout(toc); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } }); } if ($shapePauseHover) { $shapePauseHover.on('mouseover', function() { clearTimeout(toh); pauseV(); }); if (pauseVideoWhenMouseover) { $shapePauseHover.on('mouseout', function() { if (playVideoTimeout && !timeoutReady) return false; toh = setTimeout(function() { playV(); },0); if (switchElementPlayPause) { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } }); } } if ($shapeMuteClick){ $shapeMuteClick.on('click', function() { playVideoUnmuteClick = false; mute(); }); } if ($shapeUnmuteClick){ $shapeUnmuteClick.on('click', function() { playVideoUnmuteClick = true; unmute(); }); if ($shapeUnmuteAnalytic) { let $el = $shapeUnmuteAnalytic.find('a'); Tilda.sendEventToStatistics($el.data('tilda-event-name'), $el.text()); } } if ($shapeMuteHover)$shapeMuteHover.on('mouseover', mute); if ($shapeUnmuteHover)$shapeUnmuteHover.on('mouseover', unmute); if (!switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } else { switch (switchElementMuteUnmuteLoad) { case 'mute': if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); break; case 'unmute': if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); break; } } let g = Math.round(Math.random()*1e10); setTimeout(function() { if ((playOnloadPage || playVideoTimeout || playVideoVisibleOnScreen) && !$shape.find('video').data('mobileHasPlay')) { if (isMobile) $('body').on('touchstart.loadVideo' + g, firstLoadVideo); else $('body').on('click.loadVideo' + g, firstLoadVideo); } },500); function firstLoadVideo() { let c = function () { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && e.el.paused) { let l = e.el; l.muted = true; l.play().then(() => { l.pause(); if ($(l).attr('autoplay'))playV(); }); } }); }; c(); if (isMobile) $('body').off('touchstart.loadVideo' + g); else $('body').off('click.loadVideo' + g); rv = true; /* return c(); */ } function popupShowAction(mutationList, observer) { mutationList.forEach(function(mutation) { switch(mutation.type) { case 'attributes': if ($('body').hasClass('t-body_popupshowed')) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.service === 'direct') { switch (e.actionOpenPopup) { case 'mute': e.el.muted = true; e.el.play(); e.buttonMute = true; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } break; case 'pause': e.el.pause(); if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } break; case 'start': e.el.muted = true; e.el.currentTime = 0; setTimeout(() => { if (e.el.paused) e.el.play(); }, 200); e.buttonMute = true; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } break; } } }); } break; } }); } let observerOptions = { childList: false, attributes: true, subtree: false }, observer = new MutationObserver(popupShowAction); observer.observe($('body')[0], observerOptions); $(document).on('click', '.t-popup', function() { if (!$(this).hasClass('t-popup_show')) { this.querySelectorAll('video').forEach(function(e) { e.pause(); }); } }); }); } }); }());
` : ''} `); let v = $e.find('video')[0], f = function() { annexxAddStyle('011','.' + e.className.replace(/\s+/g,'.') + ' {display:table;}'); let $removeelementload = $(''); if ($removeelementload.length) $('').remove(); window.arrAnnexxVideoTooltip.push({'el': $e.find('video')[0], 'service': 'direct','modtype': '011', 'playElClick': d, 'buttonMute': 'no','actionPlayAnotherVideo': actionPlayAnotherVideo,'actionOpenPopup': actionOpenPopup, 'actionCloseTab': 'mute,pause'.split(','), elements: {shapePlayClick: $shapePlayClick, shapePlayHover: $shapePlayHover,shapePauseClick: $shapePauseClick, shapePauseHover: $shapePauseHover, shapeUnmuteClick: $shapeUnmuteClick, shapeMuteClick: $shapeMuteClick, shapeMuteHover: $shapeMuteHover, shapeUnmuteHover: $shapeUnmuteHover}, 'switchElementMuteUnmute': switchElementMuteUnmute, function: {playV: playV, pauseV: pauseV, mute: mute}}); ll--; if (!ll) resolve(); if (userFunctionNameEnd) { v.addEventListener('ended', function() { window.arrAnnexxVideoTooltip.userFunction.forEach(function(e) { if (e === userFunctionNameEnd) window[e](); }); }); } if (autoplay){ v.muted = true; function pl() { try { v.play(); } catch (e) {} } pl(); setTimeout(pl,1e3); } v.removeEventListener('canplay', f); function showElemOnplay() { if ($showElemOnplay) { $showElemOnplay.removeClass('hide-elem-onplay'); } if ($hideElemOnplay) { $hideElemOnplay.addClass('hide-elem-onplay'); } if (false) { this.removeEventListener('play',showElemOnplay); this.removeEventListener('pause',hideElemOnplay); } if ($previewvideo) { $previewvideo.addClass("hide-preload-shape"); if (!previewOnPause) $previewvideo = false; } } function hideElemOnplay() { if ($showElemOnplay) { $showElemOnplay.addClass('hide-elem-onplay'); } if ($hideElemOnplay) { $hideElemOnplay.removeClass('hide-elem-onplay'); } if ($previewvideo) { $previewvideo.removeClass("hide-preload-shape"); } } function showElemOnend() { if ($showElemOnend) { $showElemOnend.removeClass('show-elem-onend'); } this.removeEventListener('ended', showElemOnend); } v.addEventListener('play', showElemOnplay); v.addEventListener('pause', function() { if (this.closest(".t396__elem") && !this.closest(".t396__elem").classList.contains("hide-elem-onplay")) hideElemOnplay(); }); v.addEventListener('ended', showElemOnend); if ($shapeFullscreen) { $shapeFullscreen.on('click', () => { if (!document.fullscreen) { v.play(); v.muted = false; if (v.requestFullscreen) { v.requestFullscreen(); } else if (v.webkitEnterFullscreen()) { v.webkitEnterFullscreen()(); } } }); document.addEventListener("fullscreenchange", e => { if (!document.fullscreen) v.muted = true; }); } /* После обновления стал скакать зум видео */ /* $tnatom.css('zoom','inherit'); */ setTimeout(function() { $tnatom.css('zoom',''); if (!true) window.dispatchEvent(new CustomEvent('resize')); v.addEventListener('webkitfullscreenchange', function(e) { let fullscreen = e.target.webkitDisplayingFullscreen !== undefined ? e.target.webkitDisplayingFullscreen : 'nowebkit'; if (fullscreen !== 'nowebkit') { if (fullscreen) {v.style.objectFit = 'contain';} else {v.style.objectFit = '';} } }); },200); }; if ((false && isMobile) || false) setTimeout(() => f(),2e3); else if (true) { v.addEventListener('canplay', f); setTimeout(() => { if (v.readyState === 0) { v.removeEventListener('canplay', f); f(); } },1e3); } else { v.addEventListener('loadedmetadata', f); /*v.muted = true;*/ } if ('rgba(0,0,0,0)' !== 'rgba(0, 0, 0, 0)') { e.querySelector('.tn-atom').insertAdjacentHTML('afterBegin','
'); } if (switchElementShowOnhoverVideo && $shapePlayClick && $shapePlayClick.length && $shapePauseClick && $shapePauseClick.length) { let timeout, firstHover = false; function mousemoveShow() { if (false && false&& !firstHover) { firstHover = true; $shapePlayClick.css('opacity', ''); } if (timeout) clearTimeout(timeout); if (!$shapePlayClick.hasClass('annexx-onhover-video-show')) $shapePlayClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); if (!$shapePauseClick.hasClass('annexx-onhover-video-show')) $shapePauseClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); timeout = setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show'); setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show-pe') },300); },2000); } if ($previewvideo) $previewvideo.on('mousemove', mousemoveShow); $e.on('mousemove', mousemoveShow); } if (switchElementUnmuteOnhoverVideo && $shapeUnmuteClick && $shapeUnmuteClick.length && $shapeMuteClick && $shapeMuteClick.length) { let timeout, firstHover = false; function mousemoveShow() { if (false && false&& !firstHover) { firstUnmuteHover = true; if (switchElementMuteUnmute) { if (switchElementMuteUnmuteLoad === 'unmute') $shapeUnmuteClick.css('opacity', ''); else if (switchElementMuteUnmuteLoad === 'mute') $shapeMuteClick.css('opacity', ''); } else $shapeUnmuteClick.css('opacity', ''); } if (timeout) clearTimeout(timeout); if (!$shapeUnmuteClick.hasClass('annexx-onhover-video-show')) $shapeUnmuteClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); if (!$shapeMuteClick.hasClass('annexx-onhover-video-show')) $shapeMuteClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); timeout = setTimeout(function() { $shapeUnmuteClick.add($shapeMuteClick).removeClass('annexx-onhover-video-show'); setTimeout(function() { $shapeUnmuteClick.add($shapeMuteClick).removeClass('annexx-onhover-video-show-pe') },300); },2000); } if ($previewvideo) $previewvideo.on('mousemove', mousemoveShow); $e.on('mousemove', mousemoveShow); } setTimeout(function() { /*Закомментировал блок ниже, так как тильда вроде попарвила масштабирование*/ /*if (/opr/i.test(navigator.userAgent) && false) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d}:not(.t-animate), .annexx-wrapper-video-in-shape${d} .tn-atom__scale-wrapper { overflow: hidden; } .t396__elem.tn-elem.annexx-wrapper-video-in-shape${d}:not(.t-animate) .tn-atom__scale-wrapper { transform: none !important; } `); } else if (/firefox/i.test(navigator.userAgent)) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d} .tn-atom__scale-wrapper { overflow: hidden; } `); } else if (!false && !/opr/i.test(navigator.userAgent) && !false) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d} { overflow: hidden; } `); }*/ let $tab = $('.t395__tab, .t397__tab'), videoBlockId = +$e.closest('.r').attr('id').replace(/\D+/,''), $tabVideo = $tab.filter((i,e) => $(e).data('tab-rec-ids').toString().split(',').some(e => +e === videoBlockId)); if ($tabVideo.length) { function processTab() { if ($tabVideo[0].classList.value.indexOf('tab_active') !== -1) { let action = 'mute,pause'.split(','); if (action.some(e => e === 'mute')) v.muted = true; else v.muted = false; if (action.some(e => e === 'pause')) v.pause(); else v.play(); if (action.some(e => e === 'start')) v.currentTime = 0; } else { let action = 'mute,pause'.split(','); if (action.some(e => e === 'mute')) v.muted = true; else v.muted = false; if (action.some(e => e === 'pause')) v.pause(); else v.play(); } } let config = { attributes: true, childList: false, characterData: false, }; observer = new MutationObserver(processTab); observer.observe($tabVideo[0], config); } /* Баг с тем что не применяется автоскейл тильды к шейпам с видео*/ /*function autoscaleVideoFix() { setTimeout(function(){ if ($e.closest('.t396__artboard_scale').length && !e.style.zoom) { $e.css('transform','scale(' + window.tn_scale_factor + ')'); } },1e3); } autoscaleVideoFix(); $(window).on("resize", autoscaleVideoFix);*/ },500); }); }).then(function() { if (!window.annexxTabClickPauseVideo) window.annexxTabClickPauseVideo = true; $('.t395__tab').on("click", e => { if ($(e.target).hasClass("t395__tab_active")) return false; $(e.target) .closest(".t395__tab") .siblings(".t395__tab:not('.t395__tab_active')") .each((i,el) => { let id = "rec" + $(el).data("tab-rec-ids"); arrAnnexxVideoTooltip.forEach((e) => { if ($(e.el).closest(".r").attr("id") === id) e.function.pauseV(); }); }); }); let intFixSizeVideoShape; window.addEventListener('resize', function() { clearTimeout(intFixSizeVideoShape); intFixSizeVideoShape = setTimeout(fixSizeVideoShape, 500); }); $shape.find('.annexx-preloader-video-shape').fadeOut(500, function() { $(this).remove(); }); function isScrolledIntoView(elem,alwaysToStart) { let tnelem = elem.closest(".tn-elem"), docViewTop = window.pageYOffset, docViewBottom = docViewTop + window.innerHeight, elemHeight = elem.clientHeight, elemTop = parseInt(getComputedStyle(elem.closest(".t396__elem")).top) + elem.closest(".r").getBoundingClientRect().top + window.scrollY + (isMobile ? window.innerHeight / 2 : 0), elemBottom = elemTop + elemHeight, inViewport = elemBottom + playVideoVisibleOnScreenOffset = docViewTop - (elemHeight / 2); return inViewport; }; if (false && !(isSafari && isMobile)) { window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick && e.playElClick === d) { $(window).on('scroll', function() { let docViewTop = window.pageYOffset, docViewBottom = docViewTop + window.innerHeight, elemHeight = e.el.clientHeight, elemTop = e.el.getBoundingClientRect().top + window.scrollY, elemBottom = elemTop + elemHeight; if (elemTop > docViewBottom || elemBottom { tabSwitch = true; setTimeout(() => { tabSwitch = false; },1e3); }); window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick === d) { e.el.addEventListener('play', function(e) { if (tabSwitch) return false; if (!playHTML) { if (!playVideoVisibleOnScreen) { window.arrAnnexxVideoTooltip.forEach(el => { if (el.el === e.target) playV(el); }); } playHTML = true; } if (switchElementPlayPause) { if (switchElementPlayPauseFirst) { setTimeout(function() { switchElementPlayPauseFirst = false; }, 1e3); } else { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } }; } }); e.el.addEventListener('pause', function() { pauseVAddon(); }); e.el.addEventListener('volumechange', function(e) { if (!e.target.muted || !e.target.volume) { unmute(); if (!e.target.paused) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick !== d) { setTimeout(function () { e.el.muted = true; if (e.switchElementMuteUnmute) { if (e.elements.shapeMuteClick) e.elements.shapeMuteClick.hide(); if (e.elements.shapeUnmuteClick) e.elements.shapeUnmuteClick.css('display', 'table'); } },200); } }); } } else mute(); }); } }); if (!switchElementPlayPause) { if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } else { switch (switchElementPlayPauseLoad) { case 'play': if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } break; case 'pause': if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } break; } } function checkPlayed() { let r = false; window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && !e.el.paused) r = true; }); return r; } let toc; if($shapePlayClick) { let toc; $shapePlayClick.on('click', function() { if (false && checkPlayed()) { clearTimeout(toc); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } return false; } if (false) { $shapePlayClick.hide(); if ($shapePlayHover) $shapePlayHover.hide(); $shape.find('video').attr('controls',''); } clearTimeout(toc); toc = setTimeout(function() { playV(undefined, playVideoUnmuteClick, playVideoFromStart); },0); if (switchElementPlayPause) { $shapePlayClick.hide(); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } if ($shapePlayAnalytic) { let $el = $shapePlayAnalytic.find('a'); Tilda.sendEventToStatistics($el.data('tilda-event-name'), $el.text()); } }); } let toh; if ($shapePlayHover) { $shapePlayHover.on('mouseover', function() { if (false && checkPlayed()) { clearTimeout(toh); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } return false; } if (false) { if ($shapePlayClick) $shapePlayClick.hide(); $shapePlayHover.hide(); $shape.find('video').attr('controls',''); } if (playVideoTimeout && !timeoutReady) return false; clearTimeout(toh); toh = setTimeout(function() { playV(undefined, undefined, playVideoFromStart); },0); if (switchElementPlayPause) { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } }); if (!playVideoWhenMouseleave) { $shapePlayHover.on('mouseout', function() { if (playVideoTimeout && !timeoutReady) return false; window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d){ clearTimeout(toh); pauseV(); if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } } }); }); } } if ($shapePauseClick) { $shapePauseClick.on('click', function() { clearTimeout(toc); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } }); } if ($shapePauseHover) { $shapePauseHover.on('mouseover', function() { clearTimeout(toh); pauseV(); }); if (pauseVideoWhenMouseover) { $shapePauseHover.on('mouseout', function() { if (playVideoTimeout && !timeoutReady) return false; toh = setTimeout(function() { playV(); },0); if (switchElementPlayPause) { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } }); } } if ($shapeMuteClick){ $shapeMuteClick.on('click', function() { playVideoUnmuteClick = false; mute(); }); } if ($shapeUnmuteClick){ $shapeUnmuteClick.on('click', function() { playVideoUnmuteClick = true; unmute(); }); if ($shapeUnmuteAnalytic) { let $el = $shapeUnmuteAnalytic.find('a'); Tilda.sendEventToStatistics($el.data('tilda-event-name'), $el.text()); } } if ($shapeMuteHover)$shapeMuteHover.on('mouseover', mute); if ($shapeUnmuteHover)$shapeUnmuteHover.on('mouseover', unmute); if (!switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } else { switch (switchElementMuteUnmuteLoad) { case 'mute': if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); break; case 'unmute': if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); break; } } let g = Math.round(Math.random()*1e10); setTimeout(function() { if ((playOnloadPage || playVideoTimeout || playVideoVisibleOnScreen) && !$shape.find('video').data('mobileHasPlay')) { if (isMobile) $('body').on('touchstart.loadVideo' + g, firstLoadVideo); else $('body').on('click.loadVideo' + g, firstLoadVideo); } },500); function firstLoadVideo() { let c = function () { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && e.el.paused) { let l = e.el; l.muted = true; l.play().then(() => { l.pause(); if ($(l).attr('autoplay'))playV(); }); } }); }; c(); if (isMobile) $('body').off('touchstart.loadVideo' + g); else $('body').off('click.loadVideo' + g); rv = true; /* return c(); */ } function popupShowAction(mutationList, observer) { mutationList.forEach(function(mutation) { switch(mutation.type) { case 'attributes': if ($('body').hasClass('t-body_popupshowed')) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.service === 'direct') { switch (e.actionOpenPopup) { case 'mute': e.el.muted = true; e.el.play(); e.buttonMute = true; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } break; case 'pause': e.el.pause(); if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } break; case 'start': e.el.muted = true; e.el.currentTime = 0; setTimeout(() => { if (e.el.paused) e.el.play(); }, 200); e.buttonMute = true; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } break; } } }); } break; } }); } let observerOptions = { childList: false, attributes: true, subtree: false }, observer = new MutationObserver(popupShowAction); observer.observe($('body')[0], observerOptions); $(document).on('click', '.t-popup', function() { if (!$(this).hasClass('t-popup_show')) { this.querySelectorAll('video').forEach(function(e) { e.pause(); }); } }); }); } }); }());
` : ''} `); let v = $e.find('video')[0], f = function() { annexxAddStyle('011','.' + e.className.replace(/\s+/g,'.') + ' {display:table;}'); let $removeelementload = $(''); if ($removeelementload.length) $('').remove(); window.arrAnnexxVideoTooltip.push({'el': $e.find('video')[0], 'service': 'direct','modtype': '011', 'playElClick': d, 'buttonMute': 'no','actionPlayAnotherVideo': actionPlayAnotherVideo,'actionOpenPopup': actionOpenPopup, 'actionCloseTab': 'pause'.split(','), elements: {shapePlayClick: $shapePlayClick, shapePlayHover: $shapePlayHover,shapePauseClick: $shapePauseClick, shapePauseHover: $shapePauseHover, shapeUnmuteClick: $shapeUnmuteClick, shapeMuteClick: $shapeMuteClick, shapeMuteHover: $shapeMuteHover, shapeUnmuteHover: $shapeUnmuteHover}, 'switchElementMuteUnmute': switchElementMuteUnmute, function: {playV: playV, pauseV: pauseV, mute: mute}}); ll--; if (!ll) resolve(); if (userFunctionNameEnd) { v.addEventListener('ended', function() { window.arrAnnexxVideoTooltip.userFunction.forEach(function(e) { if (e === userFunctionNameEnd) window[e](); }); }); } if (autoplay){ v.muted = true; function pl() { try { v.play(); } catch (e) {} } pl(); setTimeout(pl,1e3); } v.removeEventListener('canplay', f); function showElemOnplay() { if ($showElemOnplay) { $showElemOnplay.removeClass('hide-elem-onplay'); } if ($hideElemOnplay) { $hideElemOnplay.addClass('hide-elem-onplay'); } if (false) { this.removeEventListener('play',showElemOnplay); this.removeEventListener('pause',hideElemOnplay); } if ($previewvideo) { $previewvideo.addClass("hide-preload-shape"); if (!previewOnPause) $previewvideo = false; } } function hideElemOnplay() { if ($showElemOnplay) { $showElemOnplay.addClass('hide-elem-onplay'); } if ($hideElemOnplay) { $hideElemOnplay.removeClass('hide-elem-onplay'); } if ($previewvideo) { $previewvideo.removeClass("hide-preload-shape"); } } function showElemOnend() { if ($showElemOnend) { $showElemOnend.removeClass('show-elem-onend'); } this.removeEventListener('ended', showElemOnend); } v.addEventListener('play', showElemOnplay); v.addEventListener('pause', function() { if (this.closest(".t396__elem") && !this.closest(".t396__elem").classList.contains("hide-elem-onplay")) hideElemOnplay(); }); v.addEventListener('ended', showElemOnend); if ($shapeFullscreen) { $shapeFullscreen.on('click', () => { if (!document.fullscreen) { v.play(); v.muted = false; if (v.requestFullscreen) { v.requestFullscreen(); } else if (v.webkitEnterFullscreen()) { v.webkitEnterFullscreen()(); } } }); document.addEventListener("fullscreenchange", e => { if (!document.fullscreen) v.muted = true; }); } /* После обновления стал скакать зум видео */ /* $tnatom.css('zoom','inherit'); */ setTimeout(function() { $tnatom.css('zoom',''); if (!false) window.dispatchEvent(new CustomEvent('resize')); v.addEventListener('webkitfullscreenchange', function(e) { let fullscreen = e.target.webkitDisplayingFullscreen !== undefined ? e.target.webkitDisplayingFullscreen : 'nowebkit'; if (fullscreen !== 'nowebkit') { if (fullscreen) {v.style.objectFit = 'contain';} else {v.style.objectFit = '';} } }); },200); }; if ((false && isMobile) || false) setTimeout(() => f(),2e3); else if (true) { v.addEventListener('canplay', f); setTimeout(() => { if (v.readyState === 0) { v.removeEventListener('canplay', f); f(); } },1e3); } else { v.addEventListener('loadedmetadata', f); /*v.muted = true;*/ } if ('rgba(0, 0, 0, 0)' !== 'rgba(0, 0, 0, 0)') { e.querySelector('.tn-atom').insertAdjacentHTML('afterBegin','
'); } if (switchElementShowOnhoverVideo && $shapePlayClick && $shapePlayClick.length && $shapePauseClick && $shapePauseClick.length) { let timeout, firstHover = false; function mousemoveShow() { if (false && false&& !firstHover) { firstHover = true; $shapePlayClick.css('opacity', ''); } if (timeout) clearTimeout(timeout); if (!$shapePlayClick.hasClass('annexx-onhover-video-show')) $shapePlayClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); if (!$shapePauseClick.hasClass('annexx-onhover-video-show')) $shapePauseClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); timeout = setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show'); setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show-pe') },300); },2000); } if ($previewvideo) $previewvideo.on('mousemove', mousemoveShow); $e.on('mousemove', mousemoveShow); } if (switchElementUnmuteOnhoverVideo && $shapeUnmuteClick && $shapeUnmuteClick.length && $shapeMuteClick && $shapeMuteClick.length) { let timeout, firstHover = false; function mousemoveShow() { if (false && false&& !firstHover) { firstUnmuteHover = true; if (switchElementMuteUnmute) { if (switchElementMuteUnmuteLoad === 'unmute') $shapeUnmuteClick.css('opacity', ''); else if (switchElementMuteUnmuteLoad === 'mute') $shapeMuteClick.css('opacity', ''); } else $shapeUnmuteClick.css('opacity', ''); } if (timeout) clearTimeout(timeout); if (!$shapeUnmuteClick.hasClass('annexx-onhover-video-show')) $shapeUnmuteClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); if (!$shapeMuteClick.hasClass('annexx-onhover-video-show')) $shapeMuteClick.addClass('annexx-onhover-video-show annexx-onhover-video-show-pe'); timeout = setTimeout(function() { $shapeUnmuteClick.add($shapeMuteClick).removeClass('annexx-onhover-video-show'); setTimeout(function() { $shapeUnmuteClick.add($shapeMuteClick).removeClass('annexx-onhover-video-show-pe') },300); },2000); } if ($previewvideo) $previewvideo.on('mousemove', mousemoveShow); $e.on('mousemove', mousemoveShow); } setTimeout(function() { /*Закомментировал блок ниже, так как тильда вроде попарвила масштабирование*/ /*if (/opr/i.test(navigator.userAgent) && false) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d}:not(.t-animate), .annexx-wrapper-video-in-shape${d} .tn-atom__scale-wrapper { overflow: hidden; } .t396__elem.tn-elem.annexx-wrapper-video-in-shape${d}:not(.t-animate) .tn-atom__scale-wrapper { transform: none !important; } `); } else if (/firefox/i.test(navigator.userAgent)) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d} .tn-atom__scale-wrapper { overflow: hidden; } `); } else if (!false && !/opr/i.test(navigator.userAgent) && !false) { annexxAddStyle('011',` .annexx-wrapper-video-in-shape${d} { overflow: hidden; } `); }*/ let $tab = $('.t395__tab, .t397__tab'), videoBlockId = +$e.closest('.r').attr('id').replace(/\D+/,''), $tabVideo = $tab.filter((i,e) => $(e).data('tab-rec-ids').toString().split(',').some(e => +e === videoBlockId)); if ($tabVideo.length) { function processTab() { if ($tabVideo[0].classList.value.indexOf('tab_active') !== -1) { let action = 'pause'.split(','); if (action.some(e => e === 'mute')) v.muted = true; else v.muted = false; if (action.some(e => e === 'pause')) v.pause(); else v.play(); if (action.some(e => e === 'start')) v.currentTime = 0; } else { let action = 'pause'.split(','); if (action.some(e => e === 'mute')) v.muted = true; else v.muted = false; if (action.some(e => e === 'pause')) v.pause(); else v.play(); } } let config = { attributes: true, childList: false, characterData: false, }; observer = new MutationObserver(processTab); observer.observe($tabVideo[0], config); } /* Баг с тем что не применяется автоскейл тильды к шейпам с видео*/ /*function autoscaleVideoFix() { setTimeout(function(){ if ($e.closest('.t396__artboard_scale').length && !e.style.zoom) { $e.css('transform','scale(' + window.tn_scale_factor + ')'); } },1e3); } autoscaleVideoFix(); $(window).on("resize", autoscaleVideoFix);*/ },500); }); }).then(function() { if (!window.annexxTabClickPauseVideo) window.annexxTabClickPauseVideo = true; $('.t395__tab').on("click", e => { if ($(e.target).hasClass("t395__tab_active")) return false; $(e.target) .closest(".t395__tab") .siblings(".t395__tab:not('.t395__tab_active')") .each((i,el) => { let id = "rec" + $(el).data("tab-rec-ids"); arrAnnexxVideoTooltip.forEach((e) => { if ($(e.el).closest(".r").attr("id") === id) e.function.pauseV(); }); }); }); let intFixSizeVideoShape; window.addEventListener('resize', function() { clearTimeout(intFixSizeVideoShape); intFixSizeVideoShape = setTimeout(fixSizeVideoShape, 500); }); $shape.find('.annexx-preloader-video-shape').fadeOut(500, function() { $(this).remove(); }); function isScrolledIntoView(elem,alwaysToStart) { let tnelem = elem.closest(".tn-elem"), docViewTop = window.pageYOffset, docViewBottom = docViewTop + window.innerHeight, elemHeight = elem.clientHeight, elemTop = parseInt(getComputedStyle(elem.closest(".t396__elem")).top) + elem.closest(".r").getBoundingClientRect().top + window.scrollY + (isMobile ? window.innerHeight / 2 : 0), elemBottom = elemTop + elemHeight, inViewport = elemBottom + playVideoVisibleOnScreenOffset = docViewTop - (elemHeight / 2); return inViewport; }; if (false && !(isSafari && isMobile)) { window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick && e.playElClick === d) { $(window).on('scroll', function() { let docViewTop = window.pageYOffset, docViewBottom = docViewTop + window.innerHeight, elemHeight = e.el.clientHeight, elemTop = e.el.getBoundingClientRect().top + window.scrollY, elemBottom = elemTop + elemHeight; if (elemTop > docViewBottom || elemBottom { tabSwitch = true; setTimeout(() => { tabSwitch = false; },1e3); }); window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick === d) { e.el.addEventListener('play', function(e) { if (tabSwitch) return false; if (!playHTML) { if (!playVideoVisibleOnScreen) { window.arrAnnexxVideoTooltip.forEach(el => { if (el.el === e.target) playV(el); }); } playHTML = true; } if (switchElementPlayPause) { if (switchElementPlayPauseFirst) { setTimeout(function() { switchElementPlayPauseFirst = false; }, 1e3); } else { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } }; } }); e.el.addEventListener('pause', function() { pauseVAddon(); }); e.el.addEventListener('volumechange', function(e) { if (!e.target.muted || !e.target.volume) { unmute(); if (!e.target.paused) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick !== d) { setTimeout(function () { e.el.muted = true; if (e.switchElementMuteUnmute) { if (e.elements.shapeMuteClick) e.elements.shapeMuteClick.hide(); if (e.elements.shapeUnmuteClick) e.elements.shapeUnmuteClick.css('display', 'table'); } },200); } }); } } else mute(); }); } }); if (!switchElementPlayPause) { if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } else { switch (switchElementPlayPauseLoad) { case 'play': if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } break; case 'pause': if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } break; } } function checkPlayed() { let r = false; window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && !e.el.paused) r = true; }); return r; } let toc; if($shapePlayClick) { let toc; $shapePlayClick.on('click', function() { if (false && checkPlayed()) { clearTimeout(toc); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } return false; } if (false) { $shapePlayClick.hide(); if ($shapePlayHover) $shapePlayHover.hide(); $shape.find('video').attr('controls',''); } clearTimeout(toc); toc = setTimeout(function() { playV(undefined, playVideoUnmuteClick, playVideoFromStart); },0); if (switchElementPlayPause) { $shapePlayClick.hide(); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } if ($shapePlayAnalytic) { let $el = $shapePlayAnalytic.find('a'); Tilda.sendEventToStatistics($el.data('tilda-event-name'), $el.text()); } }); } let toh; if ($shapePlayHover) { $shapePlayHover.on('mouseover', function() { if (false && checkPlayed()) { clearTimeout(toh); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } return false; } if (false) { if ($shapePlayClick) $shapePlayClick.hide(); $shapePlayHover.hide(); $shape.find('video').attr('controls',''); } if (playVideoTimeout && !timeoutReady) return false; clearTimeout(toh); toh = setTimeout(function() { playV(undefined, undefined, playVideoFromStart); },0); if (switchElementPlayPause) { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } }); if (!playVideoWhenMouseleave) { $shapePlayHover.on('mouseout', function() { if (playVideoTimeout && !timeoutReady) return false; window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d){ clearTimeout(toh); pauseV(); if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } } }); }); } } if ($shapePauseClick) { $shapePauseClick.on('click', function() { clearTimeout(toc); pauseV(); if (switchElementPlayPause) { $shapePauseClick.hide(); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } }); } if ($shapePauseHover) { $shapePauseHover.on('mouseover', function() { clearTimeout(toh); pauseV(); }); if (pauseVideoWhenMouseover) { $shapePauseHover.on('mouseout', function() { if (playVideoTimeout && !timeoutReady) return false; toh = setTimeout(function() { playV(); },0); if (switchElementPlayPause) { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } } }); } } if ($shapeMuteClick){ $shapeMuteClick.on('click', function() { playVideoUnmuteClick = false; mute(); }); } if ($shapeUnmuteClick){ $shapeUnmuteClick.on('click', function() { playVideoUnmuteClick = true; unmute(); }); if ($shapeUnmuteAnalytic) { let $el = $shapeUnmuteAnalytic.find('a'); Tilda.sendEventToStatistics($el.data('tilda-event-name'), $el.text()); } } if ($shapeMuteHover)$shapeMuteHover.on('mouseover', mute); if ($shapeUnmuteHover)$shapeUnmuteHover.on('mouseover', unmute); if (!switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } else { switch (switchElementMuteUnmuteLoad) { case 'mute': if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); break; case 'unmute': if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); break; } } let g = Math.round(Math.random()*1e10); setTimeout(function() { if ((playOnloadPage || playVideoTimeout || playVideoVisibleOnScreen) && !$shape.find('video').data('mobileHasPlay')) { if (isMobile) $('body').on('touchstart.loadVideo' + g, firstLoadVideo); else $('body').on('click.loadVideo' + g, firstLoadVideo); } },500); function firstLoadVideo() { let c = function () { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && e.el.paused) { let l = e.el; l.muted = true; l.play().then(() => { l.pause(); if ($(l).attr('autoplay'))playV(); }); } }); }; c(); if (isMobile) $('body').off('touchstart.loadVideo' + g); else $('body').off('click.loadVideo' + g); rv = true; /* return c(); */ } function popupShowAction(mutationList, observer) { mutationList.forEach(function(mutation) { switch(mutation.type) { case 'attributes': if ($('body').hasClass('t-body_popupshowed')) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.service === 'direct') { switch (e.actionOpenPopup) { case 'mute': e.el.muted = true; e.el.play(); e.buttonMute = true; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } break; case 'pause': e.el.pause(); if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } break; case 'start': e.el.muted = true; e.el.currentTime = 0; setTimeout(() => { if (e.el.paused) e.el.play(); }, 200); e.buttonMute = true; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } break; } } }); } break; } }); } let observerOptions = { childList: false, attributes: true, subtree: false }, observer = new MutationObserver(popupShowAction); observer.observe($('body')[0], observerOptions); $(document).on('click', '.t-popup', function() { if (!$(this).hasClass('t-popup_show')) { this.querySelectorAll('video').forEach(function(e) { e.pause(); }); } }); }); } }); }());
New project on the horizon?
© Digitall Group 2024. All rights reserved
web
pro