(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=123 ; var uid="id"+iid; var playerLoaded = false ; var reelToStart = 0 ; var wConfig = {"playlistitems":[{"mid":"2088947","id":"2088947","length":"34","title":"Tak wygl\u0105da przysz\u0142o\u015b\u0107 POLA WALKI!","adddatesec":"1762262574","poster_url":"https://cdnt.onnetwork.tv/poster/2/0/2088947_1.jpg","mposter_url":""},{"mid":"2088893","id":"2088893","length":"101","title":"PRZEKR\u0118T NA 225 MILION\u00d3W? \u201cPo to by\u0142 ten dwutygodniowy rz\u0105d\u201d","adddatesec":"1762260957","poster_url":"https://cdnt.onnetwork.tv/poster/2/0/2088893_4.jpg","mposter_url":""},{"mid":"2088774","id":"2088774","length":"50","title":"Krajewski wbija szpil\u0119 Ko\u0142odziejczakowi: \"WSZYSTKO MOG\u0118\", dopiero po odej\u015bciu z rz\u0105du","adddatesec":"1762255524","poster_url":"https://cdnt.onnetwork.tv/poster/2/0/2088774_1.jpg","mposter_url":""},{"mid":"2088668","id":"2088668","length":"82","title":"Fundusz Sprawiedliwo\u015bci dzia\u0142a\u0142 POPRAWNIE za rz\u0105d\u00f3w PiS?","adddatesec":"1762250712","poster_url":"https://cdnt.onnetwork.tv/poster/2/0/2088668_1.jpg","mposter_url":""},{"mid":"2088649","id":"2088649","length":"90","title":"Dymisja dyrektora KOWR-u? \"NIE MA \u015aWI\u0118TYCH KR\u00d3W\"","adddatesec":"1762250357","poster_url":"https://cdnt.onnetwork.tv/poster/2/0/2088649_1.jpg","mposter_url":""},{"mid":"2087590","id":"2087590","length":"84","title":"NIE B\u0118DZIE uczciwego werdyktu s\u0105du ws. ZBIGNIEWA ZIOBRY?","adddatesec":"1762166501","poster_url":"https://cdnt.onnetwork.tv/poster/2/0/2087590_1.jpg","mposter_url":""},{"mid":"2006960","id":"2006960","length":"75","title":"\u017burek: \"Te reformy Ziobry, to po prostu trzeba wyrzuca\u0107 do kosza, ludzie nie zobaczyli \u017cadnej poprawy\" ","adddatesec":"1754041616","poster_url":"https://cdnt.onnetwork.tv/poster/2/0/2006960_5.jpg","mposter_url":""},{"mid":"2006938","id":"2006938","length":"111","title":"Co zrobi\u0107 z neos\u0119dziami? Waldemar \u017burek: Mamy gotowe warianty, jak b\u0119dzie zgoda koalicji na dany wariant, to ten wariant b\u0119d\u0119 robi\u0142 \u2757\u2b07\ufe0f","adddatesec":"1754040332","poster_url":"https://cdnt.onnetwork.tv/poster/2/0/2006938_4.jpg","mposter_url":""},{"mid":"2005999","id":"2005999","length":"103","title":"Miller w Radiu ZET: Trzeba stworzy\u0107 mo\u017cliwo\u015b\u0107 przeliczania g\u0142os\u00f3w","adddatesec":"1753955768","poster_url":"https://cdnt.onnetwork.tv/poster/2/0/2005999_6.jpg","mposter_url":""},{"mid":"2005964","id":"2005964","length":"125","title":"Je\u017celi koalicja b\u0119dzie tolerowa\u0142a w swoich szeregach jakich\u015b kret\u00f3w czy jak\u0105\u015b pi\u0105t\u0105 kolumn\u0119. Mam na my\u015bli pana Szymona Ho\u0142owni\u0119","adddatesec":"1753954376","poster_url":"https://cdnt.onnetwork.tv/poster/2/0/2005964_2.jpg","mposter_url":""},{"mid":"2004078","id":"2004078","length":"144","title":"Asystencja osobista. Berek w Radiu ZET: Musi by\u0107 dostosowane do tego, co jest bud\u017cetowo realne ","adddatesec":"1753778760","poster_url":"https://cdnt.onnetwork.tv/poster/2/0/2004078_2.jpg","mposter_url":""},{"mid":"1354451","id":"1354451","length":"90","title":"City break w Europie","adddatesec":"1699012448","poster_url":"https://cdnt.onnetwork.tv/poster/1/3/1354451_5.jpg","mposter_url":""},{"mid":"1273271","id":"1273271","length":"90","title":"Najpi\u0119kniejsze jeziora w Polsce","adddatesec":"1691403689","poster_url":"https://cdnt.onnetwork.tv/poster/1/2/1273271_6.jpg","mposter_url":""}],"frid":2088947,"widgetId":2187,"devicetype":"desktop","firstmidvideo":"MjA4ODk0Nyw5eDE2LDAsNTAsNTMzMCwxODQxOCwxLDAsMSw1MCwwLDAsMCwwLDEsMSwwLDAsMiwwLDAsMCwwLDAsMCwwLDAsMDswOy0xOy0xO1RMOzA7MDswOzU2LDAsMCwwLDAsMCwwOzA7MDswOzA7MDswLDA=","defsd":{"playlist":"5330","reelType":"0","reelRows":"2","reelColumns":"2","reelHeight":"300px","reelClosureButton":"159","reelListBackgroundColor":"rgba(255, 255, 255, 0)","reelListBackgroundImage":"","reelBackgroundColor":"rgba(0, 0, 0, 1)","reelBackgroundImage":"","reelBackgroundImageCustomCss":"","reelPosition":"0","reelMax":"10","reelMargin":"","reelBorder":"","reelBorderRad":"","reelMarginList":"4px","reelPadding":"","reelBorderList":"","reelBorderRadList":"5px","reelTitlePosition":"1","reelTitleCustomCss":"display: flex; justify-content:center; align-items:center; width: 80%; ","reelPaddingList":"","reelTitleColor":"rgba(0, 0, 0, 0)","reelTitleFont":"Averta Bold","reelTitleFontSize":"14","reelTitleHeight":"20%","reelTimerPosition":"3","reelTimerCustomCss":"display: none;","reelTimerColor":"rgba(255,80,0,1)","reelTimerBackground":"rgba(0,0,0,1)","reelTimerFont":"","reelTimerFontSize":"10","reelTimerMargin":"4px","reelTimerPadding":"1px 4px","reelTitleMargin":"4px 0","reelTitlePadding":"6%","reelTitleBackground":"rgba(255, 255, 255, 0)","reelBehaviourMPosterUse":"0","reelBehaviourMPosterVisibilityThreshold":"80","reelBehaviourChangeThreshold":"50","reelBehaviourMPosterMode":"1","reelBehaviourWidgetScrollMode":"0","reelBehaviourWidgetIdleScrollBy":"100","reelBehaviourWidgetIdleInterval":"2000","reelTouchScrollAxis":"N","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":"","widgets_emission_midroll_list":"","widgets_emission_midroll_select_another_ad":"","widgets_emission_periodic_first_ad_number":"afterSeconds","widgets_emission_periodic_first_ad_seconds":"15","widgets_emission_periodic_next_ads_number_interval":"afterSeconds","widgets_emission_periodic_next_ads_seconds_interval":"60","reelListPlayButtonURL":"","reelListPlayButtonCustomCss":"","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":"0","reelBehaviourSwipeupRedirect":"0","reelBehaviourSwipeupRedirectNewtab":"0","reelBehaviourSwipeupRedirectThreshold":"30","reelMovieAddDateShow":"1","reelMovieAddDatePosition":"0","reelMovieAddDateMargin":"8px 4px","reelMovieAddDatePadding":"","reelMovieAddDateColor":"rgba(255, 255, 255, 1)","reelMovieAddDateBackground":"","reelMovieAddDateFont":"\"Roboto\", sans-serif","reelMovieAddDateFontSize":"10","reelMovieAddDateCustomCss":"display: flex; flex-direction: row; align-items: flex-start; padding: 10px 0 0 10px !important; gap: 9.67px; width: 220px !important; height: 58.02px !important; background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%); transform: translate(-5px, -7px);","reelUseNewDesktop":"1","reelDesktopStylesAdditionsCss":".totalcontainerexs.wid2187.desktop .playercontainerexswrapper {\r\n background: rgba(0, 0, 0, 0.8);\r\n align-items: center;\r\n justify-content: center;\r\n flex-wrap: wrap;\r\n width: 100%;\r\n }\r\n\r\n .totalcontainerexs.wid2187.desktop::before {\r\n content: \"\";\r\n width: 8%;\r\n display: block;\r\n height: 100%;\r\n position: absolute;\r\n right: 0;\r\n top: 0;\r\n pointer-events: none;\r\n z-index: 1;\r\n }\r\n\r\n .totalcontainerexs.wid2187.desktop::after {\r\n content: \"\";\r\n width: 8%;\r\n display: block;\r\n height: 100%;\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n pointer-events: none;\r\n z-index: 1;\r\n }\r\n\r\n .totalcontainerexs.wid2187.desktop .playercontainerexs {\r\n height: 85%;\r\n }\r\n .totalcontainerexs.wid2187.desktop .playercontainerexsafterbottom {\r\n position: absolute;\r\n left: 95%;\r\n top: 80%;\r\n height: auto;\r\n display: flex;\r\n justify-content: flex-end;\r\n }\r\n .totalcontainerexs.wid2187.desktop .playercontainerexsbeforetop {\r\n position: absolute;\r\n left: 97%;\r\n top: 2%;\r\n height: auto;\r\n display: flex;\r\n justify-content: flex-end;\r\n }\r\n .totalcontainerexs.wid2187.desktop .playercontainerexsbeforeleft,\r\n .totalcontainerexs.wid2187.desktop .playercontainerexsafterright {\r\n margin: 0 25px;\r\n }\r\n .nreel,\r\n .preel,\r\n .closereel {\r\n user-select: none;\r\n cursor: pointer;\r\n width: max-content;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n\r\n .onnrscript-wrapper {\r\n width: 90%;\r\n max-width: 1240px;\r\n height: auto;\r\n margin: 0 auto;\r\n }\r\n\r\n @media screen and (max-width: 1024px) {\r\n .onnrscript-wrapper {\r\n width: 100%;\r\n }\r\n }","reelDesktopStylesAdditionsJs":"const beforetop = document.querySelector(\".playercontainerexsbeforetop\");\r\n const afterbottom = document.querySelector(\r\n \".playercontainerexsafterbottom\"\r\n );\r\n const afeterright = document.querySelector(\r\n \".playercontainerexsafterright\"\r\n );\r\n const beforeleft = document.querySelector(\r\n \".playercontainerexsbeforeleft\"\r\n );\r\n\r\n if (afeterright) {\r\n const nreel = document.createElement(\"div\");\r\n nreel.className = \"nreel\";\r\n nreel.innerHTML =\r\n ' ';\r\n\r\n nreel.addEventListener(\"click\", () => {\r\n var comTxt =\r\n \"onntv://\" +\r\n JSON.stringify({ comm: \"nextReel\", iid: afterbottom.dataset.iid });\r\n window.postMessage(comTxt, \"*\");\r\n });\r\n\r\n afeterright.appendChild(nreel);\r\n }\r\n if (beforeleft) {\r\n const preel = document.createElement(\"div\");\r\n preel.className = \"preel\";\r\n preel.innerHTML =\r\n ' ';\r\n\r\n preel.addEventListener(\"click\", () => {\r\n var comTxt =\r\n \"onntv://\" +\r\n JSON.stringify({ comm: \"prevReel\", iid: beforetop.dataset.iid });\r\n window.postMessage(comTxt, \"*\");\r\n });\r\n\r\n beforeleft.appendChild(preel);\r\n }\r\n\r\n if (beforetop) {\r\n const closereel = document.createElement(\"div\");\r\n closereel.className = \"closereel\";\r\n closereel.innerHTML =\r\n '';\r\n\r\n closereel.addEventListener(\"click\", () => {\r\n var comTxt =\r\n \"onntv://\" +\r\n JSON.stringify({\r\n comm: \"closeShorts\",\r\n iid: afterbottom.dataset.iid,\r\n });\r\n window.postMessage(comTxt, \"*\");\r\n });\r\n\r\n beforetop.appendChild(closereel);\r\n }\r\n window.addEventListener(\"message\", (e) => {\r\n if (!e.data.indexOf || e.data.indexOf(\"onntv://\") != 0) {\r\n return;\r\n }\r\n var data = JSON.parse(e.data.slice(8));\r\n });","reelBehaviourSwipeDesktop":"0"},"classToAdd":"carousel","addcss":"","isProduction":true,"debugReelsWidget":false} ; var isMobile = 0; var useNewDesktop = 1; var desktopStylingCss = `.totalcontainerexs.wid2187.desktop .playercontainerexswrapper { background: rgba(0, 0, 0, 0.8); align-items: center; justify-content: center; flex-wrap: wrap; width: 100%; } .totalcontainerexs.wid2187.desktop::before { content: ""; width: 8%; display: block; height: 100%; position: absolute; right: 0; top: 0; pointer-events: none; z-index: 1; } .totalcontainerexs.wid2187.desktop::after { content: ""; width: 8%; display: block; height: 100%; position: absolute; left: 0; top: 0; pointer-events: none; z-index: 1; } .totalcontainerexs.wid2187.desktop .playercontainerexs { height: 85%; } .totalcontainerexs.wid2187.desktop .playercontainerexsafterbottom { position: absolute; left: 95%; top: 80%; height: auto; display: flex; justify-content: flex-end; } .totalcontainerexs.wid2187.desktop .playercontainerexsbeforetop { position: absolute; left: 97%; top: 2%; height: auto; display: flex; justify-content: flex-end; } .totalcontainerexs.wid2187.desktop .playercontainerexsbeforeleft, .totalcontainerexs.wid2187.desktop .playercontainerexsafterright { margin: 0 25px; } .nreel, .preel, .closereel { user-select: none; cursor: pointer; width: max-content; display: flex; justify-content: center; align-items: center; } .onnrscript-wrapper { width: 90%; max-width: 1240px; height: auto; margin: 0 auto; } @media screen and (max-width: 1024px) { .onnrscript-wrapper { width: 100%; } }`; var desktopStylingJs = `const beforetop = document.querySelector(".playercontainerexsbeforetop"); const afterbottom = document.querySelector( ".playercontainerexsafterbottom" ); const afeterright = document.querySelector( ".playercontainerexsafterright" ); const beforeleft = document.querySelector( ".playercontainerexsbeforeleft" ); if (afeterright) { const nreel = document.createElement("div"); nreel.className = "nreel"; nreel.innerHTML = ' '; nreel.addEventListener("click", () => { var comTxt = "onntv://" + JSON.stringify({ comm: "nextReel", iid: afterbottom.dataset.iid }); window.postMessage(comTxt, "*"); }); afeterright.appendChild(nreel); } if (beforeleft) { const preel = document.createElement("div"); preel.className = "preel"; preel.innerHTML = ' '; preel.addEventListener("click", () => { var comTxt = "onntv://" + JSON.stringify({ comm: "prevReel", iid: beforetop.dataset.iid }); window.postMessage(comTxt, "*"); }); beforeleft.appendChild(preel); } if (beforetop) { const closereel = document.createElement("div"); closereel.className = "closereel"; closereel.innerHTML = ''; closereel.addEventListener("click", () => { var comTxt = "onntv://" + JSON.stringify({ comm: "closeShorts", iid: afterbottom.dataset.iid, }); window.postMessage(comTxt, "*"); }); beforetop.appendChild(closereel); } window.addEventListener("message", (e) => { if (!e.data.indexOf || e.data.indexOf("onntv://") != 0) { return; } var data = JSON.parse(e.data.slice(8)); });`; 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:1000;display:none; }' + ' #playerPreviewContainer div.playercontainerexs.'+widgetClass+', #totalcontainerdesktop'+uid+' div.playercontainerexs.'+widgetClass+'{ position:absolute;top:0;left:0;z-index:1000;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:1000;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:1000;display:none; }'; nefrag = '
' + nefrag; } else { nstylet += ' div.playercontainerexswrapper{ width:auto;height:100%;position:fixed;top:0;left:0;z-index:1000;display:none;}' + ' div.playercontainerexs.'+widgetClass+'{ z-index:1001;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 wid2187 reelPosition0 " + (isMobile ? "mobile" : "desktop") ; } else { tcontainer.className = "totalcontainerexs widshorts wid2187 reelPosition0" ; } 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 ; } }catch(e){} },false); if ((cId!="") && document.getElementById( cId )){ insertWidget( document.getElementById( cId ) , false ); }else if (document.currentScript && document.currentScript.parentElement){ insertWidget( document.currentScript , true ); } })(2187,"","");