var ondemand = 0; window.addEventListener('message', function(event) { if (~event.origin.indexOf('icastcenter.com')) { var returnData = event.data.split('|'); if (returnData[0] == "setsize") { //alert('setsize: ' + returnData[1] + ': ' + returnData[2]); document.getElementById(returnData[1]).style.width = returnData[2] + "px"; } } else { console.log("Not authorized"); return; } }); var protocol = 'http'; if (location.protocol === 'https:') { protocol = 'https'; } var vsnele292020 = document.scripts[document.scripts.length - 1]; var vsniframe292020 = document.createElement('iframe'); vsniframe292020.src = protocol + '://vsn1.phx.icastcenter.com/vsn-embed.cgi?protocol='+protocol+'&rand=292020&sid=whwt&trans=disabled&dvr=disabled&path=whwt/whwt/playlist.m3u8&autostart=false&width=480&height=270&k=&coderequest=1&s=1&pid=&serverid=&poster='; vsniframe292020.scrolling = 'no'; vsniframe292020.width = '480'; vsniframe292020.height = '270'; vsniframe292020.id = 'vsnicastiframewhwt292020'; vsniframe292020.setAttribute('frameborder', '0'); vsniframe292020.setAttribute('allowFullScreen', ''); vsnele292020.parentNode.insertBefore(vsniframe292020,vsnele292020); function resizeRoutine292020() { if (!ondemand) { console.log('resizing'); console.log('resize: ' + vsnele292020.parentNode.parentElement.clientWidth * .5625); vsniframe292020.style.width = vsnele292020.parentNode.clientWidth + "px"; vsniframe292020.style.height = (vsnele292020.parentNode.clientWidth * .5625) + "px"; } } resizeRoutine292020(); window.addEventListener('mousedown', function() { var f = document.getElementById('vsnicastiframewhwt292020'); f.contentWindow.postMessage("hideContext|", '*'); }, true); window.addEventListener('resize', function() { resizeRoutine292020(); }, true); vsn_r = '292020';