(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":"2217911","id":"2217911","length":"41","title":"Rozmawiamy o \"Na no\u017ce 3\"","adddatesec":"1766156842","poster_url":"https://cdnt.onnetwork.tv/poster/2/2/2217911_4.jpg","mposter_url":""},{"mid":"2217761","id":"2217761","length":"40","title":"Dzi\u0119ki przyja\u017ani Nawrockiego i Trumpa, Polska jest BEZPIECZNIEJSZA?","adddatesec":"1766151170","poster_url":"https://cdnt.onnetwork.tv/poster/2/2/2217761_4.jpg","mposter_url":""},{"mid":"2217621","id":"2217621","length":"64","title":"USA tak, Niemcy nie? Ca\u0142a prawda o wsp\u00f3\u0142pracy Niemiec z USA!","adddatesec":"1766144590","poster_url":"https://cdnt.onnetwork.tv/poster/2/2/2217621_4.jpg","mposter_url":""},{"mid":"2217544","id":"2217544","length":"84","title":"KURSKI WYRZUCONY Z PIS? Boche\u0144ski o k\u0142\u00f3tniach w partii","adddatesec":"1766141461","poster_url":"https://cdnt.onnetwork.tv/poster/2/2/2217544_4.jpg","mposter_url":""},{"mid":"2216872","id":"2216872","length":"49","title":"Mi\u0119dzy prezydentem Nawrockim, a Trumpem NIE MA CHEMII? I Podcast \"W razie W\"","adddatesec":"1766067476","poster_url":"https://cdnt.onnetwork.tv/poster/2/2/2216872_5.jpg","mposter_url":""},{"mid":"2216609","id":"2216609","length":"91","title":"Lewica obiecywa\u0142a MILION mieszka\u0144. Co zosta\u0142o z plan\u00f3w Biedronia?","adddatesec":"1766056219","poster_url":"https://cdnt.onnetwork.tv/poster/2/2/2216609_4.jpg","mposter_url":""},{"mid":"2215848","id":"2215848","length":"53","title":"\"Kiedy s\u0142yszysz pierwszy raz syren\u0119 alarmow\u0105, to Ci\u0119 tak mrozi\". Czego nie widz\u0105 kamery...","adddatesec":"1765980186","poster_url":"https://cdnt.onnetwork.tv/poster/2/2/2215848_1.jpg","mposter_url":""},{"mid":"2215445","id":"2215445","length":"41","title":"HORROR NA LUBELSZCZY\u0179NIE: Ten dom skrywa\u0142 piek\u0142o!","adddatesec":"1765965887","poster_url":"https://cdnt.onnetwork.tv/poster/2/2/2215445_2.jpg","mposter_url":""},{"mid":"2215242","id":"2215242","length":"60","title":"Prawda o Bitwie pod Mikolinem. 43 000 zabitych czy... 16?","adddatesec":"1765954924","poster_url":"https://cdnt.onnetwork.tv/poster/2/2/2215242_6.jpg","mposter_url":""},{"mid":"2214883","id":"2214883","length":"61","title":"\"Jakby nie wyszed\u0142 na balkon, to by mu si\u0119 nic nie sta\u0142o\". Wstrz\u0105saj\u0105ca relacja z Charkowa","adddatesec":"1765893193","poster_url":"https://cdnt.onnetwork.tv/poster/2/2/2214883_5.jpg","mposter_url":""}],"frid":2217911,"widgetId":2187,"devicetype":"desktop","firstmidvideo":"MjIxNzkxMSw5eDE2LDAsNTAsNTMzMCwxODQxOCwxLDAsMSw1MCwwLDAsMCwwLDEsMSwwLDAsMiwwLDAsMCwwLDAsMCwwLDAsMDswOy0xOy0xO1RMOzA7MDswOzU2LDAsMCwwLDAsMCwwOzA7MDswOzA7MDswLDA=","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: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 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,"","");