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