var embedId = {jw:[],yt:[],dm:[]};function pauseVideos(vid){var players=Object.keys(embedId); players.forEach(function (key){var ids=embedId[key]; switch (key){case "jw": ids.forEach(function (id){if (id !=vid){var player = jwplayer(id); if(player.getState() === "playing"){player.pause();}}}); break; case "yt": ids.forEach(function (id){if (id !=vid){id.pauseVideo();}}); break; case "dm": ids.forEach(function (id){if (id !=vid && !id.paused){id.pause();}}); break;}});}var dmp=function(){pauseVideos(this)}function pause(){pauseVideos()}setTimeout(function(){var videoHeight = document.body.offsetWidth * (9/16); if(typeof(newsHuntAction) == "undefined"){ adjustedVideoHeight = getNewAdjustedHeight("x7u6j7y"); if(adjustedVideoHeight != null) videoHeight = adjustedVideoHeight;} var dmplayer = DM.player(document.getElementById("x7u6j7y"), {video: "x7u6j7y", height: videoHeight,width: document.body.offsetWidth});embedId.dm.push(dmplayer);dmplayer.addEventListener('playing', dmp); if(typeof(newsHuntAction) == "undefined") setInterval(function(){if(document.getElementById("x7u6j7y")) document.getElementById("x7u6j7y").style.width = "100%";}, 1000);},1000); function getNewAdjustedHeight(elementId){var calculatedHeight = null;try{var parentPaddingRight =0; var parentPaddingLeft = 0; var parentWidth = document.getElementById(elementId).parentNode.offsetWidth; try{ parentPaddingRight = +window.getComputedStyle(document.getElementById(elementId).parentNode,null).getPropertyValue("padding-right").match(/d+/)[0]; parentPaddingLeft = +window.getComputedStyle(document.getElementById(elementId).parentNode,null).getPropertyValue("padding-left").match(/d+/)[0] } catch(e){"Error in getting parent padding", e};calculatedHeight = (parentWidth - parentPaddingRight - parentPaddingLeft) * (9/16);} catch(e){console.log("Error in calculating adjusted video height", e)} console.log("new height for video is ", calculatedHeight );return calculatedHeight;}