function t_zeroGallery__getURLByVideoType(videoURL, videoType, videoHash) {
1414 if (videoType === 'vimeo') { 1415 if (videoHash) return `https://player.vimeo.com/video/${videoURL}?h=${videoHash}&api=1&autoplay=1`; 1416 return `https://player.vimeo.com/video/${videoURL}?h=&api=1&autoplay=1`; 1418 if (videoType === 'youtube') return `https://www.youtube.com/embed/${videoURL}?autoplay=1&enablejsapi=1`; 1419 if (videoType === 'rutube') { 1420 if (videoHash) return `https://rutube.ru/play/embed/${videoURL}?p=${videoHash}&autoplay=true`; 1421 return `https://rutube.ru/play/embed/${videoURL}?autoplay=true`; 1423 if (videoType === 'vkvideo') { 1424 const [oid, id, hash] = videoURL ? videoURL.split('_') : ['_', '_']; 1425 return `https://vkvideo.ru/video_ext.php?oid=${oid}&id=${id}${hash ? `&hash=${hash}` : ''}&autoplay=1&js_api=1`; 1427 if (videoType === 'kinescope') return `https://kinescope.io/embed/${videoURL}?autoplay=1`; 1428 return videoURL || ''; 1431window.tilda_zero_gallery_js_ver = 1; 1434 * Проверяет включен ли lazyload(проект -> все блоки -> элемент) 1436 * @param {HTMLElement} elem - текущий элемент 1437 * @param {boolean} isHasJQuery - флаг на присутвие JQuery в элементe 1439 * @returns {boolean} 1441function t_zeroGallery__isLazyLoadingOnElem(elem, isHasJQuery) { 1442 var isLazy = window.lazy === 'y'; 1444 var allRecords = document.getElementById('allrecords'); 1445 isLazy = allRecords ? allRecords.getAttribute('data-tilda-lazy') === 'yes' : false; 1447 if (!isLazy) return false; 1448 return t396_elem__getFieldValue(isHasJQuery ? $(elem) : elem, 'lazyoff') !== 'y'; 1451function t_zeroGallery__getVideoKeys() { 1452 return ['li_vimeo', 'li_youtube', 'li_mp4', 'li_webm', 'li_rutube', 'li_vkvideo', 'li_kinescope', 'li_iframe']; 1456 * Экранирует html в строке для безопасности 1458 * @param {string} unsafe - строка с html 1459 * @returns {string} - экраннированная html 1461function t_zeroGallery__escapeHtml(unsafe) { 1463 .replace(/&/g, '&') 1464 .replace(/</g, '<') 1465 .replace(/>/g, '>') 1466 .replace(/"/g, '"') 1467 .replace(/'/g, ''');