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 vsnele214035 = document.scripts[document.scripts.length - 1]; var vsniframe214035 = document.createElement('iframe'); vsniframe214035.src = protocol + '://vsn1.phx.icastcenter.com/vsn-embed.cgi?protocol='+protocol+'&rand=214035&sid=icastondemand&trans=disabled&dvr=disabled&path=icastondemand/episode2.smil/playlist.m3u8&autostart=false&width=480&height=270&k=&coderequest=1&s=1&pid=&serverid=&poster=//livewebdj.com/podcasts/videos/episode2.screenshot.jpg'; vsniframe214035.scrolling = 'no'; vsniframe214035.width = '480'; vsniframe214035.height = '270'; vsniframe214035.id = 'vsnicastiframeicastondemand214035'; vsniframe214035.setAttribute('frameborder', '0'); vsniframe214035.setAttribute('allowFullScreen', ''); vsnele214035.parentNode.insertBefore(vsniframe214035,vsnele214035); function resizeRoutine214035() { if (!ondemand) { console.log('resizing'); console.log('resize: ' + vsnele214035.parentNode.parentElement.clientWidth * .5625); vsniframe214035.style.width = vsnele214035.parentNode.clientWidth + "px"; vsniframe214035.style.height = (vsnele214035.parentNode.clientWidth * .5625) + "px"; } } resizeRoutine214035(); window.addEventListener('mousedown', function() { var f = document.getElementById('vsnicastiframeicastondemand214035'); f.contentWindow.postMessage("hideContext|", '*'); }, true); window.addEventListener('resize', function() { resizeRoutine214035(); }, true); vsn_r = '214035';