(function (widget,cId,vids){ var _ONND_URL_EMBED = "https://video.onnetwork.tv" ; var _ONND_URL_CDN_EMBED = "https://cdn.onnetwork.tv" ; var overwrites = "" var iid=20241 ; var uid="id"+iid; var playerLoaded = false ; var reelToStart = 0 ; var wConfig = {"playlistitems":[{"mid":"2324000","id":"2324000","length":"58","title":"Peter Magyar dzi\u0119kuje W\u0119grom. \"Bez was by si\u0119 to nie uda\u0142o\"","adddatesec":"1776062302","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2324000_5.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2347296","id":"2347296","length":"61","title":"Krzyki w Sejmie. \"Przeznaczcie te pieni\u0105dze na s\u0142u\u017cb\u0119 zdrowia!\"","adddatesec":"1777367066","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2347296_5.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2323934","id":"2323934","length":"75","title":"Sensacyjny wynik wybor\u00f3w na W\u0119grzech!","adddatesec":"1776059278","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2323934_4.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2354538","id":"2354538","length":"93","title":"Czy op\u0142aca sie\u0328 jeszcze kre\u0328cic\u0301 teledyski? Lanberry mo\u0301wi o budz\u0307ecie","adddatesec":"1777979184","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2354538_3.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2354485","id":"2354485","length":"59","title":"Lanberry o zarobkach z ZAiKS-u. Mog\u0142aby sie\u0328 utrzymywac\u0301 tylko z tantiem","adddatesec":"1777976903","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2354485_5.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2352985","id":"2352985","length":"88","title":"Tusk apeluje do Nawrockiego i opozycji. \"Zanim zabior\u0105 si\u0119 za majstrowanie nowej konstytucji...\"","adddatesec":"1777879026","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2352985_3.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2347257","id":"2347257","length":"109","title":"D\u0119bska gra w \"Lalce\". To j\u0105 przerazi\u0142o","adddatesec":"1777365055","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2347257_6.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2348082","id":"2348082","length":"52","title":"\u0141atwogang i Bedoes podzi\u0119kowali darczy\u0144com. \"Nie wykorzystamy tego dla siebie. Nigdy\"","adddatesec":"1777441227","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2348082_2.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2348794","id":"2348794","length":"87","title":"Odznaczenie dla \u0141ukasza Litewki. Order odebra\u0142 ojciec zmar\u0142ego","adddatesec":"1777463301","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2348794_5.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2357080","id":"2357080","length":"84","title":"Po\u0142owa ameryka\u0144skich m\u0119\u017cczyzn obstawia zak\u0142ady sportowe, wielu wp\u0119dza to w d\u0142ugi","adddatesec":"1778149794","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2357080_6.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2339000","id":"2339000","length":"68","title":"Micha\u0142 Szpak o spotkaniach z fanami. \"Chc\u0105 ze mn\u0105 zdj\u0119cia, jak sprz\u0105tam po swoim psie\"","adddatesec":"1776772032","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2339000_6.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2347529","id":"2347529","length":"90","title":"Rusowicz wprost o rozwodzie. \"Za wolno\u015b\u0107 zap\u0142aci\u0142am prawie sze\u015b\u0107 zer\"","adddatesec":"1777375737","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2347529_1.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2322970","id":"2322970","length":"74","title":"Wiec Orbana dzie\u0144 przed wyborami na W\u0119grzech","adddatesec":"1775992188","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2322970_6.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2347297","id":"2347297","length":"66","title":"\"Brudne \u0142apy precz!\". Frysztak przedstawi\u0142 trzy apele","adddatesec":"1777367126","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2347297_1.jpg","pubcatdesc":"Unset","mposter_url":""},{"mid":"2348767","id":"2348767","length":"23","title":"Pogrzeb \u0141ukasza Litewki. T\u0142umy \u017cegnaj\u0105 pos\u0142a Lewicy","adddatesec":"1777462999","poster_url":"https://cdnt.onnetwork.tv/poster/2/3/2348767_1.jpg","pubcatdesc":"Unset","mposter_url":""}],"frid":2324000,"widgetId":1657,"devicetype":"desktop","isIos":0,"firstmidvideo":"MjMyNDAwMCw5eDE2LDAsNTAsNDQ0MCwxNjY5NywwLDAsMSw1MCwwLDAsMCwwLDEsMSwwLDAsNCwwLDAsMCwxLDAsMCwwLDAsMDswOy0xOy0xO1RMOzA7MDswOzU2LDAsMCwxLDAsMCwwOzA7MDswOzA7MDswLDA=","defsd":{"playlist":"4440","reelType":"0","reelRows":"2","reelColumns":"2","reelHeight":"300px","reelClosureButton":"31","reelListBackgroundColor":"rgba(255, 255, 255, 1)","reelListBackgroundImage":"","reelBackgroundColor":"rgba(0, 0, 0, 1)","reelBackgroundImage":"","reelBackgroundImageCustomCss":"background: linear-gradient(rgb(0 0 0), rgba(0, 0, 0, 0));","reelPosition":"2","reelMax":"15","reelMargin":"0%","reelBorder":"none","reelBorderRad":"0%","reelMarginList":"5px","reelPadding":"0%","reelBorderList":"none","reelBorderRadList":"10px","reelTitlePosition":"1","reelTitleCustomCss":" display: flex; justify-content:center; align-items:center; background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 30%, rgba(0, 0, 0, 0.7) 100%);","reelPaddingList":"0px","reelTitleColor":"rgba(255, 255, 255, 1)","reelTitleFont":"CalibreWeb, sans-serif","reelTitleFontSize":"10","reelTitleHeight":"20%","reelTimerPosition":"1","reelTimerCustomCss":"border-radius:4px","reelTimerColor":"rgba(255, 255, 255, 1)","reelTimerBackground":"rgba(13, 12, 12, 0.4)","reelTimerFont":"CalibreWeb, sans-serif","reelTimerFontSize":"8","reelTimerMargin":"4px","reelTimerPadding":"1px 4px","reelTitleMargin":"0px","reelTitlePadding":"5%","reelTitleBackground":"rgba(13, 12, 12, 0)","reelBehaviourMPosterUse":"1","reelBehaviourMPosterVisibilityThreshold":"50","reelBehaviourChangeThreshold":"10","reelBehaviourMPosterMode":"0","reelBehaviourWidgetScrollMode":"2","reelBehaviourWidgetIdleScrollBy":"10","reelBehaviourWidgetIdleInterval":"1","reelTouchScrollAxis":"Y","reelBehaviourShowFirstReelMode":"0","reelNoNextPosterSwipe":"1","ads_emission_selectr":"1","widgets_emission_preroll_select_first_ad":"1","widgets_emission_preroll_list":"","widgets_emission_preroll_select_another_ad":"1","widgets_emission_midroll_select_first_ad":"1","widgets_emission_midroll_list":"","widgets_emission_midroll_select_another_ad":"1","widgets_emission_periodic_first_ad_number":"afterSeconds","widgets_emission_periodic_first_ad_seconds":"60","widgets_emission_periodic_next_ads_number_interval":"afterSeconds","widgets_emission_periodic_next_ads_seconds_interval":"120","reelListPlayButtonURL":"https://static.im-g.pl/im/1/31394/m31394041,PLAYNAKARUZELE.svg","reelListPlayButtonCustomCss":"width: 50px; height: 50px; transform: translate(-50%, -50%)","reelListPlayButtonSvgShow":"0","reelListPlayButtonSvgWidth":"30","reelListPlayButtonSvgTop":"50","reelListPlayButtonSvgLeft":"50","reelListPlayButtonSvgFill":"rgba(255,255,255,0)","reelListPlayButtonSvgWcpCircleStroke":"rgba(255,255,255,0.8)","reelListPlayButtonSvgWcpTriangleFill":"rgba(255,255,255,0.8)","reelBehaviourInfiniteMPoster":"1"},"classToAdd":"carousel","addcss":"","isProduction":true,"debugReelsWidget":false} ; var isMobile = 0; var useNewDesktop = 0; var desktopStylingCss = ``; var desktopStylingJs = ``; var widgetClass = 'wid' + widget ; if (!useNewDesktop) { var nstylet = (isMobile ? 'body.ONNovhByReel { overflow: hidden !important; position: fixed !important;}' : '') + ' div.totalcontainerexs.'+widgetClass+'{ position:relative;display:flex;flex-direction:column;justify-content:center;width:100%;margin:0px;height:auto;box-sizing:border-box;align-items:stretch; background-color:transparent;}' + ' div.playercontainerexs.'+widgetClass+'{ width:100%;height:100%;position:fixed;top:0;left:0;z-index:2147483647;display:none; }' + ' #playerPreviewContainer div.playercontainerexs.'+widgetClass+', #totalcontainerdesktop'+uid+' div.playercontainerexs.'+widgetClass+'{ position:absolute;top:0;left:0;z-index:2147483647;display:none; }' + ' #totalcontainerdesktop'+uid+' { height: 100%; }' + ' div.widgetcontainerexs.'+widgetClass+'{ width:100%;height:auto;display:block; }' + ' div.widgetcontainerexs.'+widgetClass+'>div{ position:relative;display:block;width:100%;height:100%;left:0px;top:0px;border:none;margin:0px;padding:0px;overflow:hidden;}' + ' div.widgetcontainerexs.'+widgetClass+'>div>div{ position:absolute;display:block;width:100%;height:100%;left:0px;top:0px;border:none;margin:0px;padding:0px;overflow:hidden; }' + ' .playercontainerexs.'+widgetClass+' > div > div, .playercontainerexs.'+widgetClass+' > div > div > iframe { box-sizing: border-box !important; }' + ' .reelPosition0 > .playercontainerexs.'+widgetClass+' > div { width:100% !important;height:100% !important;min-width:100% !important;min-height:100% !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }'+ ' .reelPosition0 > .playercontainerexs.'+widgetClass+' > div > div { width:100% !important;height:100% !important;min-width:100% !important;min-height:100% !important;'+ ' max-width:100% !important;max-height:100% !important; }'+ ' .reelPosition0 > .playercontainerexs.'+widgetClass+' > div > div > iframe { width:100% !important;height:100% !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }' + ' .reelPosition1 > .playercontainerexs.'+widgetClass+' { flex-direction: column; justify-content: flex-start; align-items: stretch; }' + ' .reelPosition1 > .playercontainerexs.'+widgetClass+' > div { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }'+ ' .reelPosition1 > .playercontainerexs.'+widgetClass+' > div > div { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important; }'+ ' .reelPosition1 > .playercontainerexs.'+widgetClass+' > div > div > iframe { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }' + ' .reelPosition2 > .playercontainerexs.'+widgetClass+' { flex-direction: column; justify-content: center; align-items: stretch; }' + ' .reelPosition2 > .playercontainerexs.'+widgetClass+' > div { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }'+ ' .reelPosition2 > .playercontainerexs.'+widgetClass+' > div > div { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important; }'+ ' .reelPosition2 > .playercontainerexs.'+widgetClass+' > div > div > iframe { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }' + ' .reelPosition3 > .playercontainerexs.'+widgetClass+' { flex-direction: column; justify-content: flex-end; align-items: stretch; }' + ' .reelPosition3 > .playercontainerexs.'+widgetClass+' > div { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }'+ ' .reelPosition3 > .playercontainerexs.'+widgetClass+' > div > div { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important; }'+ ' .reelPosition3 > .playercontainerexs.'+widgetClass+' > div > div > iframe { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }' ; var nefrag = '
' + '
' + '
' + '
' ; } else { var nstylet = (isMobile ? 'body.ONNovhByReel { overflow: hidden !important; position: fixed !important;}' : '') + ' div.totalcontainerexs.'+widgetClass+'{ position:relative;display:flex;flex-direction:column;justify-content:center;width:100%;margin:0px;height:auto;box-sizing:border-box;align-items:stretch; background-color:transparent;}' + ' #playerPreviewContainer div.playercontainerexs.'+widgetClass+'{ position:absolute;top:0;left:0;z-index:2147483647;display:none; }' + ' div.widgetcontainerexs.'+widgetClass+'{ width:100%;height:auto;display:block; }' + ' div.widgetcontainerexs.'+widgetClass+'>div{ position:relative;display:block;width:100%;height:100%;left:0px;top:0px;border:none;margin:0px;padding:0px;overflow:hidden;}' + ' div.widgetcontainerexs.'+widgetClass+'>div>div{ position:absolute;display:block;width:100%;height:100%;left:0px;top:0px;border:none;margin:0px;padding:0px;overflow:hidden; }' + ' .playercontainerexs.'+widgetClass+' > div > div, .playercontainerexs.'+widgetClass+' > div > div > iframe { box-sizing: border-box !important; }' + ' .reelPosition0 > .playercontainerexs.'+widgetClass+' > div { width:100% !important;height:100% !important;min-width:100% !important;min-height:100% !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }'+ ' .reelPosition0 > .playercontainerexs.'+widgetClass+' > div > div { width:100% !important;height:100% !important;min-width:100% !important;min-height:100% !important;'+ ' max-width:100% !important;max-height:100% !important; }'+ ' .reelPosition0 > .playercontainerexs.'+widgetClass+' > div > div > iframe { width:100% !important;height:100% !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }' + ' .reelPosition1 > .playercontainerexs.'+widgetClass+' { flex-direction: column; justify-content: flex-start; align-items: stretch; }' + ' .reelPosition1 > .playercontainerexs.'+widgetClass+' > div { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }'+ ' .reelPosition1 > .playercontainerexs.'+widgetClass+' > div > div { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important; }'+ ' .reelPosition1 > .playercontainerexs.'+widgetClass+' > div > div > iframe { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }' + ' .reelPosition2 > .playercontainerexs.'+widgetClass+' { flex-direction: column; justify-content: center; align-items: stretch; }' + ' .reelPosition2 > .playercontainerexs.'+widgetClass+' > div { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }'+ ' .reelPosition2 > .playercontainerexs.'+widgetClass+' > div > div { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important; }'+ ' .reelPosition2 > .playercontainerexs.'+widgetClass+' > div > div > iframe { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }' + ' .reelPosition3 > .playercontainerexs.'+widgetClass+' { flex-direction: column; justify-content: flex-end; align-items: stretch; }' + ' .reelPosition3 > .playercontainerexs.'+widgetClass+' > div { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }'+ ' .reelPosition3 > .playercontainerexs.'+widgetClass+' > div > div { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important; }'+ ' .reelPosition3 > .playercontainerexs.'+widgetClass+' > div > div > iframe { width:100% !important;height:auto !important;min-width:100% !important;min-height:auto !important;'+ ' max-width:100% !important;max-height:100% !important;padding:0 !important;margin:0 !important; }' ; var nefrag = '
' + '
' + '
' ; if (isMobile) { nstylet += ' div.playercontainerexs.'+widgetClass+'{ width:100%;height:100%;position:fixed;top:0;left:0;z-index:2147483647;display:none; }'; nefrag = '
' + nefrag; } else { nstylet += ' div.playercontainerexswrapper{ width:auto;height:100%;position:fixed;top:0;left:0;z-index:2147483646;display:none;}' + ' div.playercontainerexs.'+widgetClass+'{ z-index:2147483647;display:none; aspect-ratio: 9/16; }'; nefrag = '
' + '
' + '
' + '
' + '
' + '
' + '
' + nefrag; } } var ONNScrollFixedPos = 0; function ONNdisableFixedScroll() { if (!isMobile) { return; } if (document.body.classList.contains("ONNovhByReel")) { return; } ONNScrollFixedPos = window.pageYOffset; document.body.style.top = "-" + ONNScrollFixedPos + "px"; document.body.classList.add("ONNovhByReel"); } function ONNenableFixedScroll() { if (!isMobile) { return; } document.body.style.top = ""; document.body.classList.remove("ONNovhByReel"); window.scrollTo({ top: ONNScrollFixedPos, behavior: "instant" }); } var widgetPlayer = null; function insertWidget( container , ib ){ var nstyle = document.createElement( "style" ); nstyle.innerHTML = nstylet ; nstyle.dataset['cfasync']="false"; var tcontainer = document.createElement( "div" ); tcontainer.innerHTML = nefrag ; if (useNewDesktop) { tcontainer.className = "totalcontainerexs widshorts wid1657 reelPosition2 " + (isMobile ? "mobile" : "desktop") ; } else { tcontainer.className = "totalcontainerexs widshorts wid1657 reelPosition2" ; } tcontainer.dataset['cfasync']="false"; if (!isMobile && !useNewDesktop) { tcontainer.id = "totalcontainerdesktop"+uid; } document.body.appendChild( nstyle ); if (ib){ container.parentElement.insertBefore( tcontainer , document.currentScript ); } else{ container.appendChild( tcontainer ); } var wmc=document.getElementById('ld'+uid); if(wmc){ import( "https://cdn.onnetwork.tv/js/widgets/widgetShortslist.js?s="+Date.now() ).then(({WidgetPlayer})=>{ wConfig['uid'] = uid; wConfig['iid'] = iid ; wConfig['cId'] = 'ld'+uid ; if(wConfig.defsd.reelBehaviourShowFirstReelMode==1){ console.log("opacity"); wmc.style.opacity='0'; } playerCont = document.getElementById('p'+uid); widgetPlayer = new WidgetPlayer(wConfig, wmc, playerCont); if (desktopStylingCss != "") { try { const std = document.createElement("style"); std.type="text/css" ; std.innerHTML = desktopStylingCss; std.id = "ONNdesktopStylingCssWidget"+iid; document.body.appendChild(std); } catch(dsce){ console.log(dsce); } } if (desktopStylingJs != "") { try{Function('"use strict";'+desktopStylingJs+';')();}catch(dsje){ console.log(dsje); } } if (useNewDesktop) { try{ document.querySelector(".onnwrapperbuttons-prev")?.addEventListener("click", () => { widgetPlayer.playPrevMovie(); }); }catch(e){} try{ document.querySelector(".onnwrapperbuttons-next")?.addEventListener("click", () => { widgetPlayer.playNextMovie(); }); }catch(e){} } }); } } 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){ // TOCHECK - Wydaje mi się, że punktu widzenia zależności widget-player komunikacja jest taka jak powinna być, // ale na pewno nie jest najszybsza jakaby mogła być, bo wysyła komendy asynchronicznie. Teraz wygląda to tak: // Swiped in player -> postMessage -> receive here in nextReel/prevReel -> call widgetPlayer playNextMovie/playPrevMovie -> // -> change inner properties, related to current playing reel position in playlist -> send startShort command -> send startmovie message to player and play another vid case "moviecompleted" : if (parseInt(com.iid) != iid){ break ; } case "nextReel": if (parseInt(com.iid) == iid){ if (widgetPlayer != null && typeof widgetPlayer.playNextMovie == "function") { widgetPlayer.playNextMovie(); } } break; case "prevReel": if (parseInt(com.iid) == iid){ if (widgetPlayer != null && typeof widgetPlayer.playPrevMovie == "function") { widgetPlayer.playPrevMovie(); } } break; case "playerLoaded" : if (parseInt(com.iid) == iid){ playerLoaded = true ; if(wConfig.defsd.reelBehaviourShowFirstReelMode==1){ console.log( "revopacity" ); wmc=document.getElementById('ld'+uid); if(wmc){wmc.style.opacity='';} } if(reelToStart>0){ var pc = document.getElementById( "pid"+com.iid ); if(pc){ pc.style.display = "flex" ; if (!isMobile && useNewDesktop) { try { var pcw = document.querySelector( ".playercontainerexswrapper" ); pcw.style.display = "flex" ; } catch(ew){} } window.ONTVsendCommand("startmovie",parseInt(com.iid),parseInt(reelToStart)); } ONNdisableFixedScroll(); reelToStart = 0 ; } } break ; case "startShort": if(parseInt(com.iid)==iid){ if(!playerLoaded){ reelToStart = com.subject ; break ; } var pc = document.getElementById( "pid"+com.iid ); if(pc){ pc.style.display = "flex" ; if (!isMobile && useNewDesktop) { try { var pcw = document.querySelector( ".playercontainerexswrapper" ); pcw.style.display = "flex" ; } catch(ew){} } window.ONTVsendCommand("startmovie",parseInt(com.iid),parseInt(com.subject)); } ONNdisableFixedScroll(); } break ; case "startnextshort" : if(parseInt(com.iid)==iid){ var pc = document.getElementById( "pid"+com.iid ); if (pc && widgetPlayer != null && typeof widgetPlayer.playNextMovie == "function") { pc.style.display = "flex" ; if (!isMobile && useNewDesktop) { try { var pcw = document.querySelector( ".playercontainerexswrapper" ); pcw.style.display = "flex" ; } catch(ew){} } widgetPlayer.playNextMovie(); widgetPlayer.signalReelOpen(0); } } break ; case "closeShorts": if(parseInt(com.iid)==iid){ var pc = document.getElementById( "pid"+com.iid ); if(pc){ window.ONTVsendCommand("pause",parseInt(com.iid)); pc.style.display = "none" ; if (!isMobile && useNewDesktop) { try { var pcw = document.querySelector( ".playercontainerexswrapper" ); pcw.style.display = "none" ; } catch(ew){} } } ONNenableFixedScroll(); } break ; case "widgetloaded": if(parseInt(com.iid)==iid){ var pscript = document.createElement( "script" ); pscript.src = _ONND_URL_EMBED + '/embed.php?mid='+com.subject+'&iid='+iid+'&cId=p'+uid+'&widget='+widget+vids+overwrites ; pscript.async = true ; document.body.appendChild( pscript ); } break ; case "scrollReelList": if(parseInt(com.iid)==iid){ if (com.subject == "+") { widgetPlayer.scrollListNext(); } else if (com.subject == "-") { widgetPlayer.scrollListPrev(); } } 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 ); } if (typeof window.ONTVScrollReelList != "function") { window.ONTVScrollReelList = function(iid, d) { window.postMessage("onntv://" + JSON.stringify({sender: "onntv",sscript: "widget",comm: "scrollReelList",iid: iid,subject: d}), "*"); } } })(1657,"","");