
function initVideoFallback(){document.querySelectorAll(".ts-video-wrapper").forEach(function(e){var t=e.querySelector("video"),n=e.querySelector(".nxt-fallback-img");if(t&&n){var a=t.querySelectorAll("source"),r=0,i=!1;if(!a.length||!t.canPlayType){o();return}var l=!1;if(a.forEach(function(e){var n=e.getAttribute("type");n&&t.canPlayType(n)&&(l=!0),e.addEventListener("error",function(){++r>=a.length&&o()})}),!l){o();return}t.addEventListener("canplay",function(){i||(t.style.display="block",n.style.display="none",i=!0)}),t.addEventListener("error",o),setTimeout(function(){i||0!==t.readyState||o()},8e3)}function o(){t.style.display="none",n.style.display="block"}})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",initVideoFallback):initVideoFallback();