0) { publisherTargeting = new URLSearchParams(targetingParams).toString(); } input.publisherTargeting = decodeURIComponent(publisherTargeting).replaceAll(“&”, “%26”); loadPlayerHelper(input); } function onDomLoaded() { Promise.all([ asyncScriptLoader({ src: VIDEO_PLAYER_SCRIPT_LOCATION, loadWithAsync: true, attributes: [ { key: “id”, value: “VIDEO_PLAYER_SCRIPT_LOCATION”, }, ], }), USER_GEO_LOCATION_PROMISE ]).then(function ([e, userGeo]) { var userCountry = String(getCookie(“country_code”)).toUpperCase(); var userCity = userGeo.city; var userState = userGeo.state; var categorySlug = “college-basketball”.toLowerCase(); var eventSlug = “”.toLowerCase(); var placement = “”; var playerIdsObject = JSON.parse(‘{“IN”:”65cb73a54d205b8f137b665e”,”ROW”:”65cb72f657f4c7c080cee05c”}’); if (userCountry == “IN”) { playerId = playerIdsObject[“IN”]; } else { playerId = playerIdsObject[“ROW”]; } var isDesktop = “1”; var pageType = “Articlepage”; if (!isDesktop && [“articlepage”, “slideshow”, “singlepageslideshow”].includes(pageType.toLowerCase()) && userCountry == “IN” && [“others”, “delhi”, “nct of india”, “new delhi”, “mumbai”, “bombay”, “bengaluru”, “bangalore”, “kolkata”].includes(userCity.toLowerCase())) { playerId = “65e5d45dbdb3a9c5732b9bec”; } var fired = false; function load() { if (fired) return; fired = true; var playerContainer = document.getElementById(“video-player-container–“); var input = { playerContainer: playerContainer, categorySlug: categorySlug, userCountry: userCountry, placement: placement, playerId: playerId }; googletag.cmd.push(function() { window.onDvtagReady(function() { document.addEventListener(“auSegReady”, function(e) { input.audigentValue = e.detail.segments; loadPlayerWithTargeting(input); }); setTimeout(function() { loadPlayerWithTargeting(input); }, AU_KV_CHECK_TIMEOUT); }); }); document.removeEventListener(“scroll”, load); document.removeEventListener(“mousemove”, load); document.removeEventListener(“touchmove”, load); } document.addEventListener(“scroll”, load, { once: true, passive: true }); document.addEventListener(“mousemove”, load, { once: true, passive: true }); document.addEventListener(“touchmove”, load, { once: true, passive: true }); }) } })(); ]]> { const container = $(“.vidazoo-player-container”); const callback = (mutationList) => { for (const mutation of mutationList) { if (mutation.type != “attributes”) continue; if (mutation.attributeName != “data-float-active”) continue; const…
Continue reading
