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 vsnele691450 = document.scripts[document.scripts.length - 1]; var vsniframe691450 = document.createElement('iframe'); vsniframe691450.src = protocol + '://vsn1.phx.icastcenter.com/vsn-embed.cgi?protocol='+protocol+'&rand=691450&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'; vsniframe691450.scrolling = 'no'; vsniframe691450.width = '480'; vsniframe691450.height = '270'; vsniframe691450.id = 'vsnicastiframeicastondemand691450'; vsniframe691450.setAttribute('frameborder', '0'); vsniframe691450.setAttribute('allowFullScreen', ''); vsnele691450.parentNode.insertBefore(vsniframe691450,vsnele691450); function resizeRoutine691450() { if (!ondemand) { console.log('resizing'); console.log('resize: ' + vsnele691450.parentNode.parentElement.clientWidth * .5625); vsniframe691450.style.width = vsnele691450.parentNode.clientWidth + "px"; vsniframe691450.style.height = (vsnele691450.parentNode.clientWidth * .5625) + "px"; } } resizeRoutine691450(); window.addEventListener('mousedown', function() { var f = document.getElementById('vsnicastiframeicastondemand691450'); f.contentWindow.postMessage("hideContext|", '*'); }, true); window.addEventListener('resize', function() { resizeRoutine691450(); }, true); vsn_r = '691450';