(function (widget,cId,vids){ var _ONND_URL_EMBED = "https://video.onnetwork.tv" ; var iid=Date.now() * Math.floor( 1 + Math.random() * 100 ); var uid="id"+iid; var widgetAdded=false ; var mobile = 0 ; var loadercss = null ; var nstylet = ' div.totalcontainerexs{ display:flex;flex-direction:column;width:100%;margin:0px;height:auto;box-sizing:border-box;align-items:stretch; background-color:transparent ;}' + ' div.playercontainerexs{ width:100%;height:auto;display:block;aspect-ratio: 16 /9 ; }' + ' div.widgetcontainerexs{ width:100%;height:auto;min-height:100%;display:block; }' + ' div.widgetcontainerexs>div{ position:relative;display:block;width:100%;height:0px;min-height:100%;left:0px;top:0px;border:none;margin:0px;padding:0px;overflow:hidden;padding-bottom:0%; }' + ' div.widgetcontainerexs.wid'+widget+'>div{ padding-bottom:0%; }' + ' div.widgetcontainerexs>div>iframe{ position:absolute;display:block;width:100%;height:100%;left:0px;top:0px;border:none;margin:0px;padding:0px;overflow:hidden; }' ; nstylet = nstylet + "\n" + loadercss ; var nefrag = '
' + '
' + '
' + '' + '
' ; function insertWidget( container , ib ){ var nstyle = document.createElement( "style" ); nstyle.innerHTML = nstylet ; var tcontainer = document.createElement( "div" ); tcontainer.className = "totalcontainerexs wid223 desktop "+(mobile?"mobile":"desktop") ; tcontainer.innerHTML = nefrag ; document.body.appendChild( nstyle ); if (ib){ container.parentElement.insertBefore( tcontainer , document.currentScript ); } else{ container.appendChild( tcontainer ); } } window.addEventListener("message",(e)=>{ try{ if (!e.data.indexOf || (e.data.indexOf("onntv://")!=0)){ return ; } var com = {} ; try{ com = JSON.parse( e.data.substr( 8 ) ); }catch(e){ com = {} ; } switch (com.comm){ case "widgetloaded": if(parseInt(com.iid)==iid && !widgetAdded){ var pscript = document.createElement( "script" ); pscript.src = _ONND_URL_EMBED + '/embed.php?mid='+com.subject+'&iid='+iid+'&cId=p'+uid+'&widget='+widget+vids ; pscript.async = true ; document.body.appendChild( pscript ); widgetAdded = true ; } break ; } }catch(e){} },false); if ((cId!="") && document.getElementById( cId )){ insertWidget( document.getElementById( cId ) , false ); }else if (document.currentScript && document.currentScript.parentElement){ insertWidget( document.currentScript , true ); } })(223,"","");