'); styleBlock = document.querySelector('head > #annexxStyle' + numberMod + (idblock ? idblock : '')); } let t = (function() { return !Array.from(styleBlock.childNodes).some(function(e) { if (e.textContent === codestyle) { return true; } }); }()); if (t) styleBlock.insertAdjacentHTML('beforeend',codestyle); } function annexxRemoveStyle(numberMod, idblock) { let block = document.querySelectorAll('head > #annexxStyle' + numberMod + (idblock ? idblock : '')); if (block) block.forEach(e => e.remove()); } if (typeof window.arrAnnexxVideoTooltip === 'undefined') { window.arrAnnexxVideoTooltip = []; } if ('') { annexxAddStyle('011',` { display: none !important: } `,'hide-elem-onplay') } if ('') { annexxAddStyle('011',` { display: none !important: } `,'show-elem-onend') } if ('') { annexxAddStyle('011',` /* fixing the bug with resizing zero html elements in the autoscale */ { zoom: initial !important; } `) } annexxAddStyle('011',` /* Removing pop-up icons from videos in Opera */ #detach-button-host { display: none !important; } div[class*="annexx-wrapper-video-in-shape"] video:fullscreen { border-radius: 0px; object-fit: contain; } ${false ? ', {transition: opacity 300ms linear 0s; opacity: 0; pointer-events: none;} .annexx-onhover-video-show, .annexx-onhover-video-show {opacity: 1;} .annexx-onhover-video-show-pe, .annexx-onhover-video-show-pe {pointer-events: auto;}' : ''} ${false ? ', {transition: opacity .3s linear 0s; opacity: 0; pointer-events: none;} .annexx-onhover-video-show, .annexx-onhover-video-show {opacity: 1;} .annexx-onhover-video-show-pe, .annexx-onhover-video-show-pe {pointer-events: auto;}' : ''} ${'' ? ` {opacity: 0 !important; pointer-events: none !important;} ${false ? ':hover {cursor: pointer;}' : ''}` : ''} ${'' && false ? ' .tn-atom {background-color: transparent !important;}' : ''} ${'' && false ? ':hover {cursor: default;}' : ''} ${'' && false ? ' .tn-atom {background-color: transparent !important;}' : ''} ${'' ? ` {opacity: 0 !important; pointer-events: none !important;} ${false ? ':hover {cursor: pointer;}' : ''}` : ''} ${'' && false ? ' .tn-atom {background-color: transparent !important;}' : ''} ${'' && false ? ':hover {cursor: default;}' : ''} ${'' && false ? ' .tn-atom {background-color: transparent !important;}' : ''} ${'' ? ` {opacity: 0 !important; pointer-events: none !important;} ${false ? ':hover {cursor: pointer;}' : ''}` : ''} ${'' && false ? ' .tn-atom {background-color: transparent !important;}' : ''} ${'' && false ? ':hover {cursor: default;}' : ''} ${'' && false ? ' .tn-atom {background-color: transparent !important;}' : ''} ${'' && false ? ':hover {cursor: default;}' : ''} ${'' && false ? ' .tn-atom {background-color: transparent !important;}' : ''} ${'' ? ` {opacity: 0 !important; pointer-events: none !important;} ${false ? ':hover {cursor: pointer;}' : ''}` : ''} ${'' && false ? ' .tn-atom {background-color: transparent !important;}' : ''} ${'' ? ' {display: none !important;}' : ''} ${'' ? ' {display: none !important;}' : ''} .hide-preload-shape { visibility: hidden !important; pointer-events: none !important; } .anx011-show-element { opacity: 1 !important; pointer-events: all !important; } `); function getScript(url) { return new Promise(function(resolve, reject) { if (window.anxJqueryLoad) { let int = setInterval(() => { if ((window.jQuery || window.$) && /jquery@/.test(url)) { clearInterval(int); resolve(); } }, 100); } else { window.anxJqueryLoad = true; var script = document.createElement('script'); script.src = url; script.async = true; script.onload = resolve; script.onerror = reject; document.head.appendChild(script); } }); } $(function () { let d = Math.round(Math.random()*1e10), link = 'https://static.lovalogo.ru/keramograni/prew.mp4' ? (function() { let link = 'https://static.lovalogo.ru/keramograni/prew.mp4'.trim(); if (/kinescope/.test(link)) return link.split("/").filter(e => !/0p$/i.test(e)).join("/") + '/' + ('720p' !== '1080' ? '720p' : '1080p'); else return link; }()) : false, $shape = '.tn-elem__9489790411470210224069' ? $('.tn-elem__9489790411470210224069') : false, shapeArr = (function() { let arr = []; if ($shape) { '.tn-elem__9489790411470210224069'.replace(/\s/g,'').split(/,\s|,/g).forEach(function(e) { arr.push(e); }); } return arr; }()), $previewvideo = '' ? $('') : false, previewOnPause = false, roundshape = '', videoShadow = '-webkit-box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 1) !important;', defaultShadow = '-webkit-box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 1) !important;', inlinecontrols = false, preloader = '' ? '' : false, preloaderWidth = '20' ? '20' : false, $shapePlayClick = '' ? $('') : false, $shapePlayAnalytic = '' ? $('') : false, $shapePlayHover = '' ? $('') : false, playVideoFromStart = 'none' !== 'none' ? 'none' : 'none', playVideoFromStartState = false, playVideoWhenMouseleave = true, playOnloadPage = true, playVideoTimeout = 0 * 1000, playVideoUnmuteLoad = false, playVideoUnmuteClick = false, playVideoLoop = true, removeelementload = '' ? '' : false, $shapePauseClick = '' ? $('') : false, $shapePauseHover = '' ? $('') : false, $shapeFullscreen = '' ? $('') : false, pauseVideoWhenMouseover = false, switchElementPlayPause = false, switchElementPlayPauseLoad = 'play', switchElementPlayPauseFirst = switchElementPlayPause ? true : false, switchElementShowOnhoverVideo = false, switchElementUnmuteOnhoverVideo = false, playVideoVisibleOnScreen = false, playVideoVisibleOnScreenAlways = false, playVideoVisibleOnScreenOffset = 0, stopVideoVisibleOnScreen = false, fixVisibleTouch = false, $shapeUnmuteClick = '' ? $('') : false, $shapeMuteClick = '' ? $('') : false, $shapeMuteHover = '' ? $('') : false, $shapeUnmuteHover = '' ? $('') : false, switchElementMuteUnmute = false, switchElementMuteUnmuteLoad = 'unmute', $shapeUnmuteAnalytic = '' ? $('') : false, actionPlayAnotherVideo = 'mute', actionOpenPopup = 'none', adaptiveFrom = 0, adaptiveTo = 20000, adaptiveCheck = adaptiveFrom < adaptiveTo ? ((adaptiveFrom < (window.matchMedia("(orientation: portrait)").matches ? window.outerWidth : window.innerWidth) && (window.outerWidth ? adaptiveFrom < window.outerWidth : true) && adaptiveTo > (window.matchMedia("(orientation: portrait)").matches ? window.outerWidth : window.innerWidth) && (window.outerWidth ? adaptiveTo > window.outerWidth : true)) ? true : false) : true, userFunctionNamePlay = '', userFunctionNamePause = '', userFunctionNameEnd = '', isSafari = (function() { let ua = navigator.userAgent; if (/safari/gi.test(ua) && !/chrome/gi.test(ua)) return true; else return false; })(), isMobile = (function() { let ua = navigator.userAgent; if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(ua) || (!/windows/i.test(ua) && /safari/i.test(ua) && navigator.maxTouchPoints > 1)) return true; else return false; }()), timeoutReady = false, playHTML = false, $showElemOnplay = '' ? $('') : false, $hideElemOnplay = '' ? $('') : false, $showElemOnend = '' ? $('') : false; if ($previewvideo && $previewvideo.find('.tn-atom').data('original')) { $previewvideo.find('.tn-atom').each(el => $(el).css('background-image','url(' + $(el).data('original') + ')')); } if ($showElemOnplay) { annexxAddStyle('011',` { transition: opacity 500ms linear; } .hide-elem-onplay { opacity: 0 !important; pointer-events: none !important; } `); $showElemOnplay.addClass('hide-elem-onplay'); annexxRemoveStyle('011','hide-elem-onplay'); } if ($hideElemOnplay) { annexxAddStyle('011',` { transition: opacity 500ms linear; } .hide-elem-onplay { opacity: 0 !important; pointer-events: none !important; } `); } if ($showElemOnend) { annexxAddStyle('011',` { transition: opacity 500ms linear; } .show-elem-onend { opacity: 0; pointer-events: none !important; } `); $showElemOnend.addClass('show-elem-onend'); annexxRemoveStyle('011','show-elem-onend'); } if ($shapePlayAnalytic) { $shapePlayAnalytic.find('.tn-atom').removeAttr('href'); } if (false && false) $shapePlayClick.css('opacity', 1); if (false && false) { if (switchElementMuteUnmute) { if (switchElementMuteUnmuteLoad === 'unmute') $shapeUnmuteClick.css('opacity', 1); else if (switchElementMuteUnmuteLoad === 'mute') $shapeMuteClick.css('opacity', 1); } else $shapeMuteClick.css('opacity', 1); } if ($shapeUnmuteAnalytic) { $shapeUnmuteAnalytic.find('.tn-atom').removeAttr('href'); } shapeArr.forEach(function(e) { /*if (isSafari) annexxAddStyle('011',`${e} .tn-atom {display: contents !important;}`);*/ if (false) annexxAddStyle('011',`${e}, ${e} video::-webkit-media-controls-fullscreen-button, ${e} video::-webkit-media-controls-play-button, ${e} video::-webkit-media-controls-timeline, ${e} video::-webkit-media-controls-current-time-display, ${e} video::-webkit-media-controls-time-remaining-display, ${e} video::-webkit-media-controls-mute-button, ${e} video::-webkit-media-controls-toggle-closed-captions-button, ${e} video::-webkit-media-controls-volume-slider {cursor: none;}`); annexxAddStyle('011',`video {-webkit-mask-image: -webkit-radial-gradient(white, black); -webkit-backface-visibility: hidden; -moz-backface-visibility: hidden;}`); if ('rgba(0, 0, 0, 0)' !== 'rgba(0, 0, 0, 0)') { annexxAddStyle('011',` ${e} .toned-video { position: absolute; top: 0; width: 100%; height: 100%; z-index: 1; background-color: ${(function() { if (!/rgb/.test('rgba(0, 0, 0, 0)')) return '#'; else return ''; })()}rgba(0, 0, 0, 0); } `); } if (100 !== 100 || 100 !== 100) { annexxAddStyle('011',` ${e} { ${(function(){ return $(e).data("animate-sbs-event") ? "" : "overflow: hidden;"; }())} border-radius:${(function() { return getComputedStyle($(e).find(".tn-atom")[0]).borderRadius; }())}; } ${e} .tn-atom, ${e} .tn-atom__sbs-anim-wrapper { overflow: hidden; } `); } }); function addVideoShapeBorder() { annexxRemoveStyle('011','annexx-video-border' + d); shapeArr.forEach(function(e) { let t = '', el = document.querySelector(e) ? document.querySelector(e).querySelector('.tn-atom') : ''; if (el) { annexxAddStyle('011',` ${e} .tn-atom {border-width: 0 !important; border-color: transparent !important;} ${e} .tn-atom video, ${e} .tn-atom .toned-video {${(function() { if (getComputedStyle(el).borderStyle !== undefined) t += 'border-style:' + getComputedStyle(el).borderStyle + ';'; if (getComputedStyle(el).borderWidth !== undefined) t += 'border-width:' + Math.ceil(parseFloat(getComputedStyle(el).borderWidth)) + 'px;'; if (getComputedStyle(el).borderRadius !== undefined) t += 'border-radius:' + getComputedStyle(el).borderRadius + ';'; if (getComputedStyle(el).borderColor !== undefined) t += 'border-color:' + getComputedStyle(el).borderColor + ';'; return t; }())} } `,'annexx-video-border' + d); } }); } addVideoShapeBorder(); window.addEventListener('resize', addVideoShapeBorder); if (adaptiveCheck && $shape && link) { function fixImgSrc(i,e) { let $img = $(e).find('img[data-original]'); if ($img.length) $img.attr('src',$img.data('original')); } if ($shapePlayClick) $shapePlayClick.each(fixImgSrc); if ($shapePauseClick) $shapePauseClick.each(fixImgSrc); if ($shapeUnmuteClick) $shapeUnmuteClick.each(fixImgSrc); if ($shapeMuteClick) $shapeMuteClick.each(fixImgSrc); if ($shapeMuteHover) $shapeMuteHover.each(fixImgSrc); if ($shapeUnmuteHover) $shapeUnmuteHover.each(fixImgSrc); if ((userFunctionNamePlay || userFunctionNamePause || userFunctionNameEnd) && !window.arrAnnexxVideoTooltip.userFunction) window.arrAnnexxVideoTooltip.userFunction = []; function playV(el, unmuteClick, playVideoFromStart) { let action = false; $shape.find('video').data('mobileHasPlay', true); setTimeout(function () { playHTML = false; }, 500); if (userFunctionNamePlay) { window.arrAnnexxVideoTooltip.userFunction.forEach(function(e) { if (e === userFunctionNamePlay) window[e](); }); } if (el) { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d && el.el === e.el) { fixVisibleTouch = true; /*e.el.play().then(function() {}).catch(e => {});*/ e.el.play(); if (!e.buttonMute) { setTimeout(function () { e.el.muted = false; },200); } } else { if (e.service === 'direct')actionDirectVideo(e); else if (e.service === 'youtube') e.el.pauseVideo(); else if (e.service === 'vimeo') e.el.pause(); } }); } else { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d) { if (playVideoFromStart === 'once' && !playVideoFromStartState) { setTimeout(function() { playVideoFromStartState = true; }, 200); e.el.currentTime = 0; } else if (playVideoFromStart === 'always')e.el.currentTime = 0; e.el.play(); if (unmuteClick){ setTimeout(function () { e.el.muted = false; if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.removeClass("anx011-show-element"); } },200); } } else { if (e.service === 'direct')actionDirectVideo(e); else if (e.service === 'youtube') e.el.pauseVideo(); else if (e.service === 'vimeo') e.el.pause(); } }); } function actionDirectVideo(e) { action = true; switch (e.actionPlayAnotherVideo) { case 'mute': e.el.muted = true; e.buttonMute = true; if (switchElementMuteUnmute) { if (e.elements.shapeMuteClick) e.elements.shapeMuteClick.removeClass("anx011-show-element"); if (e.elements.shapeUnmuteClick) e.elements.shapeUnmuteClick.addClass("anx011-show-element"); } break; case 'pause': setTimeout(function() { e.el.pause(); if (switchElementPlayPause) { if (e.elements.shapePauseClick) e.elements.shapePauseClick.removeClass("anx011-show-element"); if (e.elements.shapePlayClick) { e.elements.shapePlayClick.addClass("anx011-show-element"); e.elements.shapePlayClick.css("display",""); } } }, 100); break; case 'pauseandstart': setTimeout(function() { e.el.pause(); e.el.currentTime = 0; if (switchElementPlayPause) { if (e.elements.shapePauseClick) e.elements.shapePauseClick.removeClass("anx011-show-element"); if (e.elements.shapePlayClick) { e.elements.shapePlayClick.addClass("anx011-show-element"); e.elements.shapePlayClick.css("display",""); } } }, 100); break; } } if (switchElementPlayPause && !action) { if (switchElementPlayPauseFirst) { setTimeout(function() { switchElementPlayPauseFirst = false; }, 500); } else { if ($shapePlayClick) $shapePlayClick.removeClass("anx011-show-element"); if ($shapePauseClick) { $shapePauseClick.addClass("anx011-show-element"); $shapePauseClick.css("display",""); } }; } } function pauseVAddon() { if (userFunctionNamePause) { window.arrAnnexxVideoTooltip.userFunction.forEach(function(e) { if (e === userFunctionNamePause) window[e](); }); } if (switchElementPlayPause) { if ($shapePauseClick) $shapePauseClick.removeClass("anx011-show-element"); if ($shapePlayClick) { $shapePlayClick.addClass("anx011-show-element"); $shapePlayClick.css("display",""); } } } function pauseV() { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d) { e.el.pause(); } }); } function mute() { /* playVideoUnmuteClick = false; */ window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d) { e.el.muted = true; e.buttonMute = true; } }); if (switchElementMuteUnmute) { if ($shapeMuteClick) $shapeMuteClick.removeClass("anx011-show-element"); if ($shapeUnmuteClick) $shapeUnmuteClick.addClass("anx011-show-element"); } } function unmute() { window.arrAnnexxVideoTooltip.forEach(function(e) { if (e.playElClick === d) { e.el.muted = false; e.buttonMute = false; } }); if (switchElementMuteUnmute) { if ($shapeUnmuteClick) $shapeUnmuteClick.removeClass("anx011-show-element"); if ($shapeMuteClick) $shapeMuteClick.addClass("anx011-show-element"); } } function playOnTimeout(e) { e.muted = true; if (isMobile)setTimeout(playV, 200); else playV(); } annexxAddStyle('011',` .t396__elem.tn-elem.annexx-wrapper-video-in-shape${d} { ${0 ? 'transform: rotate(' + 0 + 'deg);' : ''} } .t396__elem.tn-elem.annexx-wrapper-video-in-shape${d} .tn-atom { ${!false ? 'object-fit: cover;' : ''} ${false ? 'background-color: transparent !important;' : ''} ${100 !== 100 ? `transform: scale(100%) ${isSafari ? 'translateZ(0)' : ''};` : ''} transition: transform 0ms linear; } .t396__elem.tn-elem.annexx-wrapper-video-in-shape${d} .tn-atom:hover { ${`transform: scale(100%) ${isSafari ? 'translateZ(0)' : ''}; transition: transform 0ms linear 0ms;`} } ${false ? `.annexx-wrapper-video-in-shape${d} video::-webkit-media-controls-play-button, .annexx-wrapper-video-in-shape${d} video::-webkit-media-controls-overlay-play-button {display: none;}` : ''} .annexx-wrapper-video-in-shape${d} video { ${!false ? 'object-fit: cover;' : ''} ${false ? '' : 'height: 100%;'} width: 100%; height: 100%; position: ${!false && false ? 'static' : 'absolute'}; top: 0; left: 0; ${videoShadow !== defaultShadow ? videoShadow : ''} ${'' && '' !== '-1' ? `border-radius: ${"".replaceAll(/\s/gi,"").split(",").map(e => e + "px").join(" ")} !important;` : ''} ${(function() { return false ? `object-position:${0 + (function(){ let posX = ''; if (/:/.test(posX)) { let arrW = ''.replace(/[^\d|,|:|\.|\-]/gi,'').split(',').map(e => e.split(':').map(e => +e)).sort((a,b) => a[0] - b[0]), ww = navigator.maxTouchPoints ? window.outerWidth : window.innerWidth, p = 0; arrW.forEach(e => { if (ww >= e[0]) { p = e[1]; return true; } else return false; }); return p; } else return +posX; }())}px ${0 + (function(){ let posY = ''; if (/:/.test(posY)) { let arrW = ''.replace(/[^\d|,|:|\.|\-]/gi,'').split(',').map(e => e.split(':').map(e => +e)).sort((a,b) => a[0] - b[0]), ww = navigator.maxTouchPoints ? window.outerWidth : window.innerWidth, p = 0; arrW.forEach(e => { if (ww >= e[0]) { p = e[1]; return true; } else return false; }); return p; } else return +posY; }())}px;` : ''; }())} } ${'' && '' !== '-1' ? `.annexx-wrapper-video-in-shape${d}, .annexx-wrapper-video-in-shape${d} .tn-atom {border-radius: ${''.replaceAll(/\s/gi,"").split(",").map(e => e + "px").join(" ")} !important;}` : ''} ${(function() { if ('rgba(0, 0, 0, 0)' !== 'rgba(0, 0, 0, 0)') { return `.t396__elem.tn-elem.annexx-wrapper-video-in-shape${d} .toned-video { ${'' && '' !== '-1' ? `border-radius: ${''.replaceAll(/\s/gi,"").split(",").map(e => e + "px").join(" ")} !important;` : ''} ${0 ? 'transform: rotate(' + 0 + 'deg); z-index: 1' : ''} }`; } else return ''; }())} `); if ('-webkit-box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 1) !important;' !== defaultShadow) { annexxAddStyle('011',` @media screen and (max-width: 1200px) { .annexx-wrapper-video-in-shape${d} video { ${'-webkit-box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 1) !important;'} } } `); } if ('-webkit-box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 1) !important;' !== defaultShadow) { annexxAddStyle('011',` @media screen and (max-width: 960px) { .annexx-wrapper-video-in-shape${d} video { ${'-webkit-box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 1) !important;'} } } `); } if ('-webkit-box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 1) !important;' !== defaultShadow) { annexxAddStyle('011',` @media screen and (max-width: 640px) { .annexx-wrapper-video-in-shape${d} video { ${'-webkit-box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 1) !important;'} } } `); } if ('-webkit-box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 1) !important;' !== defaultShadow) { annexxAddStyle('011',` @media screen and (max-width: 480px) { .annexx-wrapper-video-in-shape${d} video { ${'-webkit-box-shadow: 0px 0px 0px 0px rgba(255, 255, 255, 1) !important;'} } } `); } annexxAddStyle('011',` ${(function() { if ('' && '' !== '-1') { return ` @media screen and (max-width: 1200px) { .annexx-wrapper-video-in-shape${d}, .annexx-wrapper-video-in-shape${d} .tn-atom, .annexx-wrapper-video-in-shape${d} video { border-radius: ${"".replaceAll(/\s/gi,"").split(",").map(e => e + "px").join(" ")} !important; } ${(function() { if ('rgba(0, 0, 0, 0)' !== 'rgba(0, 0, 0, 0)') { return `.annexx-wrapper-video-in-shape${d} .toned-video { border-radius: ${"".replaceAll(/\s/gi,"").split(",").map(e => e + "px").join(" ")} !important; }`; } else return ''; }())} } `; } else return ''; }())} ${(function() { if ('' && '' !== '-1') { return ` @media screen and (max-width: 960px) { .annexx-wrapper-video-in-shape${d}, .annexx-wrapper-video-in-shape${d} .tn-atom, .annexx-wrapper-video-in-shape${d} video { border-radius: ${"".replaceAll(/\s/gi,"").split(",").map(e => e + "px").join(" ")} !important; } ${(function() { if ('rgba(0, 0, 0, 0)' !== 'rgba(0, 0, 0, 0)') { return `.annexx-wrapper-video-in-shape${d} .toned-video { border-radius: ${"".replaceAll(/\s/gi,"").split(",").map(e => e + "px").join(" ")} !important; }`; } else return ''; }())} } `; } else return ''; }())} ${(function() { if ('' && '' !== '-1') { return ` @media screen and (max-width: 640px) { .annexx-wrapper-video-in-shape${d}, .annexx-wrapper-video-in-shape${d} .tn-atom, .annexx-wrapper-video-in-shape${d} video { border-radius: ${"".replaceAll(/\s/gi,"").split(",").map(e => e + "px").join(" ")} !important; } ${(function() { if ('rgba(0, 0, 0, 0)' !== 'rgba(0, 0, 0, 0)') { return `.annexx-wrapper-video-in-shape${d} .toned-video { border-radius: ${"".replaceAll(/\s/gi,"").split(",").map(e => e + "px").join(" ")} !important; }`; } else return ''; }())} } `; } else return ''; }())} ${(function() { if ('' && '' !== '-1') { return ` @media screen and (max-width: 480px) { .annexx-wrapper-video-in-shape${d}, .annexx-wrapper-video-in-shape${d} .tn-atom, .annexx-wrapper-video-in-shape${d} video { border-radius: ${"".replaceAll(/\s/gi,"").split(",").map(e => e + "px").join(" ")} !important; } ${(function() { if ('rgba(0, 0, 0, 0)' !== 'rgba(0, 0, 0, 0)') { return `.annexx-wrapper-video-in-shape${d} .toned-video { border-radius: ${"".replaceAll(/\s/gi,"").split(",").map(e => e + "px").join(" ")} !important; }`; } else return ''; }())} } `; } else return ''; }())} `); if (preloader) { shapeArr.forEach(function(e) { annexxAddStyle('011',`${e} .annexx-preloader-video-shape { position: absolute; top: 0; left: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; } ${e} .annexx-preloader-video-shape img { width: ${/%/.test(preloaderWidth) ? preloaderWidth : preloaderWidth + "px"}; } `); }); } let ll = $shape.length; function fixSizeVideoShape() { let shape = document.querySelectorAll('.annexx-wrapper-video-in-shape' + d); shape.forEach(function(e) { let tnatom = e.querySelector('.tn-atom'); /* исправил */ /* tnatom.style.width = getComputedStyle(e).width; */ /* tnatom.style.height = getComputedStyle(e).height; */ tnatom.style.width = ""; tnatom.style.height = ""; }); } if (isSafari) { shapeArr.forEach(e => { let el = document.querySelector(e + " .tn-atom"); if (el) { let tr = getComputedStyle(document.querySelector(e + " .tn-atom")).transform; if (tr !== "none") { annexxAddStyle('011',` ${e} .media-controls { width: 100% !important; height: 100% !important; } ${e} .controls-bar.bottom { top: unset !important; bottom: 0 !important; } `); } } }); } new Promise(function(resolve, reject) { $shape.each(function(i,e) { let $e = $(e), $tnatom = $e.find('.tn-atom'), autoplay = playOnloadPage && !playVideoTimeout && !playVideoVisibleOnScreen; $e.addClass('annexx-wrapper-video-in-shape' + d); fixSizeVideoShape(); $tnatom.html(`${preloader ? `
` : ''}
`); 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"); if ($previewvideo) { if (previewOnPause) $previewvideo.css("display",""); } } } 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'); if (v.paused) $shapePlayClick.addClass('anx011-show-element'); else $shapePauseClick.addClass('anx011-show-element'); timeout = setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show anx011-show-element'); setTimeout(function() { $shapePlayClick.add($shapePauseClick).removeClass('annexx-onhover-video-show-pe anx011-show-element'); },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 <= docViewBottom + (elemHeight / 2) && elemTop >= 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 < docViewTop) e.el.currentTime = 0; }); } }); } if (playVideoTimeout && playVideoVisibleOnScreen) { window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick && e.playElClick === d) { $(window).on('mousemove.screenPlayStart' + d + ' scroll.screenPlayStart' + d, function() { if (e.el.paused && isScrolledIntoView(e.el)) { function alwaysVideoOnScroll() { $(window).on('scroll.screenPlayStart' + d, function() { if (isScrolledIntoView(e.el)) { if (false) { e.el.muted = true; e.buttonMute = true; playV(e); } } }); } if (isMobile) { let int = setInterval(function() { if (rv) { firstLoadVideo(); clearInterval(int); setTimeout(function () { $shape.find('video').each(function(i,e) { playOnTimeout(e); }); timeoutReady = true; if (playVideoVisibleOnScreenAlways) alwaysVideoOnScroll(); }, playVideoTimeout); if (fixVisibleTouch) { $(window).off('mousemove.screenPlayStart' + d + ' scroll.screenPlayStart' + d); } } }, 500); } else { setTimeout(function () { $shape.find('video').each(function(i,e) { playOnTimeout(e); }); timeoutReady = true; if (playVideoVisibleOnScreenAlways) alwaysVideoOnScroll(); }, playVideoTimeout); $(window).off('mousemove.screenPlayStart' + d + ' scroll.screenPlayStart' + d); } } }); } }); } else if (playVideoTimeout) { if (isMobile) { let int = setInterval(function() { if (rv) { firstLoadVideo(); clearInterval(int); setTimeout(function () { $shape.find('video').each(function(i,e) { playOnTimeout(e); }); timeoutReady = true; }, playVideoTimeout); } }, 500); } else { setTimeout(function () { $shape.find('video').each(function(i,e) { playOnTimeout(e); }); timeoutReady = true; }, playVideoTimeout); } } else if (playVideoVisibleOnScreen) { window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick && e.playElClick === d) { $(window).on('scroll.screenPlayStart' + d, function() { if (isScrolledIntoView(e.el)) { if (e.el.paused) { e.el.muted = true; e.buttonMute = true; playV(e); if (!playVideoVisibleOnScreenAlways) { if (isMobile) { if (fixVisibleTouch) { $(window).off('scroll.screenPlayStart' + d); } } else { $(window).off('scroll.screenPlayStart' + d); } } } } }); } }) }; if (stopVideoVisibleOnScreen) { window.arrAnnexxVideoTooltip.forEach(function(e,i) { if (e.playElClick && e.playElClick === d) { $(window).on('scroll', function() { if (!e.el.paused && !isScrolledIntoView(e.el)) pauseV(); }); } }) } let rv = false, tabSwitch = false; document.addEventListener("visibilitychange", () => { 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(); }); } }); }); } }); }());