Intel vydal celou sestavu procesorů Core 9. generace: modely, parametry, ceny

23. 4. 2019

Sdílet

Už od loňského října má Intel na trhu desktopové procesory Core 9. generace (neboli generace 9000). Ovšem tehdy vyšla jen část modelů, tři odemčené čipy. Potom byly ještě v lednu oznámeny verze F s deaktivovanou grafikou a levnější šestijádro Core i5-9400/9400F. Ovšem zbytek CPU stále chyběl. Celá nabídka procesorů 9. generace – jinak také Coffee Lake Refresh – nahradí osmičkovou rodinu Coffee Lake až nyní. Nakonec není datum vydání květnové, jak se dřív uvádělo, procesory byly Intelem oznámeny dnes.

Částečné a někdy i plné specifikace jsme už měli pro většinu modelů, ale nakonec je tu přece jenom pár překvapení. Velká změna u generace 9000 nastává u Core i3, z něhož se stává čip, který má čtyři jádra bez HT (čtyři vlákna), ale nyní také turbo, což generace 8000 postrádala. Nyní jde tedy už o ekvivalent někdejších čtyřjader Core i5 (do generace 7000). Kromě toho také ale vyvstaly určité nové skutečnosti také v segmentu osmijader.

Core i9

V segmentu Core i9 už Intel má na trhu Core i9-9900K a Core i9-9900KF bez grafiky. Nově teď přibude zamčené osmijádro Core i9-9900 s 65W TDP (připomeňme, že TDP platí pro základní frekvence, s aktivním vícevláknovým turbem, což je prakticky vždy, tedy zátěžová spotřeba může a asi také bude vyšší). Má zachovánu 16MB L3 cache, HT (16 vláken) a dvoukanálový řadič pamětí DDR4 s oficiální podporou 2666 MHz. Základní frekvence je 3,1 GHz, tedy o 500 MHz níž než u odemčených verzí. Turbo je pak specifické. Může být 4,9 GHz, ale také až 5,0 GHz, tedy stejné jako u top 95W modelu.

Thermal Velocity Boost na desktopu

Intel totiž u tohoto čipu přidal funkci Thermal Velocity Boost, kterou mají od loňska mobilní Core i9. To znamená, že maximální (jednovláknové) turbo je závislé od chladícího výkonu. S dobrým chladičem by tedy mělo i9-9900 boostovat až na těch 5 GHz, s horším jen na 4,9 GHz. Thermal Velocity Boost je smysluplná funkce (ostatně Ryzeny od AMD se chovají podobně), ale v této generaci ji zatím bude mít jen čistě tento model, žádný další.

Balení procesoru Core i9-9900K

Osmijádra bez HT: Core i7

Také od levnějšího osmijádra Core i7-9700K(KF) bez HT – tedy jen s osmi vlákny – bude vydána 65W verze Core i7-9700. Procesor má o chlup nižší základní frekvenci 3,0 GHz a maximální turbo je 4,7 GHz. Tentokrát ale už bez onoho Thermal Velocity Boostu. L3 cache je jako u 9700K osekaná na 12 MB. O tomto modelu se už vědělo předem, ale je tu i jedna novinka – na prodej bude i verze s neaktivním GPU, ale jinak úplně stejnými parametry. Ta se jmenuje Core i7-9700F.

Ve specifikacích publikovaných v tiskových materiálech je ještě jedna divočina. Podle tabulky Intel chce přejmenovat Core i7-9700K a i7-9700KF na Core i9-9700K a Core i9-9700KF (verze bez GPU). Jejich parametry by se přitom tím neměly změnit, stále by měly jen 12MB L3, osm vláken bez HT a takty 3,6–4,9 GHz. To by bylo trošku Picardovské, protože tyto procesory se už nějaký ten měsíc prodávají jako Core i7 a pokud by se přejmenovaly, tak by kromě tohoto zmatku ještě vznikl zmatek sekundární: najednou už ani nebude platit, že všechna Core i9 mají HT. Nicméně musím dodat, že zatím je tato změna jen v tabulkách přiloženým k tiskové zprávě, ale databáze produktů ARK ji nezohledňuje a k i9-9700K ani i9-9700KF se nezná. Tak uvidíme, třeba k těmto škatulatům nakonec nedojde…

Aktualizováno:

Tak se vše v dobré obrátilo, podle aktuálních informací byly informace v tabulce skutečně chybné, byť podobný překlep v takto důležité věci se málokdy dostane tak daleko. Naštěstí tedy žádné zmatky s přejmenováváním nebudou a procesory s osmi vlákny zůstanou všechny označené Core i7. Tedy Core i7-9700K a i7-9700KF zůstávají, i9-9700K/KF nebudou.

Mimochodem, cena zamčených 65W (a 35W) modelů osmijader je asi o 50 dolarů nižší než odemčených verzí. i9-9900 je za 439 dolarů a i7-9700 za 323 dolarů. U nás s DPH by to bylo asi 12 200 a 9000 Kč.

Core i5 při starém

Core i5 zůstávají šestijádry bez HT (se šesti vlákny). Intel do nabídky přidá nově zamčené 65W modely Core i5-9600 (takt 3,1–4,6 GHz, grafika až 1,15 GHz) a Core i5-9500 (takt 3,0–4,4 GHz, GPU až 1,10 GHz); poslední Core i5-9400 (2,9–4,1 GHz, GPU 1,05 GHz) už je známé. Bude také existovat verze Core i5-9500F bez grafiky, od vyššího modelu nikoliv.

intel core 9 generace coffee lake refresh slide Slajd k Intel Core 9. generace vydaným v roce 2019

Core i3: konečně s turbem

Jak už bylo zmíněno v úvodu, řada 9000 zatraktivní čtyřjádra bez HT Core i3, protože jim dá zpět turbo a tím patrně i lepší jednovláknový a herní výkon. Ochutnávka přišla už u Core i3-9350KF, nyní Intel uvádí stejný model s aktivním GPU jako Core i3-9350K. Takty jsou 4,0 – 4,6 GHz, TDP 91 W, L3 cache 8 MB a násobič je odemčen. Ovšem pozor, Core i3 nadále budou podporovat nižší frekvenci DDR4: jen 2400 MHz, zatímco předchozí modely umí oficiálně 2666 MHz. Dřív se spekulovalo o tom, že Intel díky tomu může v těchto modelech používat dál staré čipy Kaby Lake, ale nevíme, zda tomu tak je pořád. Pokud ano, neměla by totiž tato čtyřjádra opravy proti bezpečnostním chybám, které měla generace 9000 přinést. Je proto možné, že Intel už používá nový křemík, ale DDR4 zůstává zpomalená kvůli tzv. segmentaci, čili oklešťování levnějších CPU s cílem motivovat kupující k výběru těch dražších.

Dalším čtyřjádrem je Core i3-9320, což už je zamčený 62W (nejde o překlep) model. Základní frekvence je 3,7 GHz, turbo 4,4 GHz. Core i3-9300 má stejnou základní frekvenci, ale turbo jen 4,3 GHz. Ještě o něco levnější bude Core i3-9100 na taktu 3,6–4,2 GHz. To bude mít i verzi bez GPU, Core i3-9100F. Tato dvě CPU se budou od třístovkových i3 lišit tím, že mají jen 6MB L3 cache místo 8MB, vyšší 65W TDP místo 62W (proč, těžko říct) a jejich GPU poběží maximálně na 1,10 GHz místo na až 1,15 GHz.

Nová dvoujádra pro lowend

Dále generace 9000 přináší i nová Pentia (dvoujádra s HT), a to modely G5620G5420, a Celerony (už bez HT) G4950G4930. Ty mají frekvence 4,0, 3,8, 3,3 a 3,2 GHz. TDP dvoujader je 54 W, ovšem je zde určitá anomálie u Pentia G5420. Podle webu AnandTech se prodává ve dvou verzích – nativní dvoujádrové 54W, a verzi, která je vyrobena deaktivací částečně vadného čtyřjádra. A ta má údajně vyšší TDP, 58 W. Jinak všechny modely můžete vidět tu v tabulce s přehledem specifikací. Nově vydané čipy jsou tučně, ty již na trhu normálním hubeným fontem. V tabulce máme jinak ještě Pentium G5600F, což má být model bez GPU, ale ten Intel ve svých materiálech nemá. Je možné, že bude ještě uveden potichu.

128GB RAM a nový stepping

Intel v tiskových materiálech neuvádí nic o novém steppingu R0, ale vzhledem k tomu, že výrobci desek vydali BIOSy s podporou těchto nových CPU, je pravděpodobné, že je v nich nová revize křemíku použita. Pokud byste je tedy kupovali do starší desky, dejte pozor a nejprve ji aktualizujte na nejnovější UEFI. Při koupi z obchodu pak vyvstane problém, zda již deska na skladě má nový BIOS či ne.

Podle Intel procesory řady 9000 podporují 128 GB RAM na socketu LGA 1151 – tedy osazení čtyřmi 32GB moduly. Není ale úplně jasné, zda je toto opravdu výsada nových CPU 9. generace (případně těch vydaných na podzim). Výrobci desek (tuším například Asus) totiž už podporu 32GB modulů a až 128GM maximální RAM do biosů přidali před delším časem. Zda ale funguje na starších CPU osmé generace, jsme neměli možnost vyzkoušet.

Coffee Lake Refresh desktop (2019), LGA 1151
 Model Jádra HT  Takt
Turbo L3 GPU Takt GPU
TDP DDR4 Cena
Core i9-9900K 8 Ano 3,6 GHz 5,0 GHz 16 MB UHD 630 1200 MHz 95 W 2666 488$
Core i9-9900KF 8 Ano 3,6 GHz 5,0 GHz 16 MB Ne Ne 95 W 2666 488$
Core i9-9900 8 Ano 3,1 GHz 4,9-5,0 GHz 16 MB UHD 630 1200 MHz 65 W 2666 439$
Core i9-9900T 8 Ano 2,1 GHz 4,4 GHz 16 MB UHD 630 1200 MHz 35 W 2666 439$
Core i7-9700K 8 Ne 3,6 GHz 4,9 GHz 12 MB UHD 630 1200 MHz 95 W 2666 374$
Core i7-9700KF 8 Ne 3,6 GHz 4,9 GHz 12 MB Ne Ne 95 W 2666 374$
Core i7-9700 8 Ne 3,0 GHz 4,7 GHz 12 MB UHD 630 1200 MHz 65 W 2666 323$
Core i7-9700F 8 Ne 3,0 GHz 4,7 GHz 12 MB Ne Ne 65 W 2666 323$
Core i7-9700T 8 Ne 2,0 GHz 4,3 GHz 12 MB UHD 630 1200 MHz 35 W 2666 323$
Core i5-9600K 6 Ne 3,7 GHz 4,6 GHz 9 MB UHD 630 1150 MHz 95 W 2666 262$
Core i5-9600KF 6 Ne 3,7 GHz 4,6 GHz 9 MB Ne Ne 95 W 2666 262$
Core i5-9600 6 Ne 3,1 GHz 4,6 GHz 9 MB UHD 630 1150 MHz 65 W 2666 213$
Core i5-9600T 6 Ne 2,3 GHz 3,9 GHz 9 MB UHD 630 1150 MHz 35 W 2666 213$
Core i5-9500F 6 Ne 3,0 GHz 4,4 GHz 9 MB Ne Ne 65 W 2666 192$
Core i5-9500 6 Ne 3,0 GHz 4,4 GHz 9 MB UHD 630 1100 MHz 65 W 2666 192$
Core i5-9500T 6 Ne 2,2 GHz 3,7 GHz 9 MB UHD 630 1100 MHz 35 W 2666 192$
Core i5-9400F 6 Ne 2,9 GHz 4,1 GHz 9 MB Ne Ne 65 W 2666 182$
Core i5-9400 6 Ne 2,9 GHz 4,1 GHz 9 MB UHD 630 1050 MHz 65 W 2666 182$
Core i5-9400T 6 Ne 1,8 GHz 3,4 GHz 9 MB UHD 630 1050 MHz 35 W 2666 173$
Core i3-9350K 4 Ne 4,0 GHz 4,6 GHz 8 MB UHD 630 1150 MHz 91 W 2400 173$
Core i3-9350KF 4 Ne 4,0 GHz 4,6 GHz 8 MB Ne Ne 91 W 2400 173$
Core i3-9320 4 Ne 3,7 GHz 4,4 GHz 8 MB UHD 630 1150 MHz 62 W 2400 154$
Core i3-9300 4 Ne 3,7 GHz 4,3 GHz 8 MB UHD 630 1150 MHz 62 W 2400 143$
Core i3-9300T 4 Ne 3,2 GHz 3,8 GHz 8 MB UHD 630 1150 MHz 35 W 2400 143$
Core i3-9100F 4 Ne 3,6 GHz 4,2 GHz 6 MB Ne Ne 65 W 2400 122$
Core i3-9100 4 Ne 3,6 GHz 4,2 GHz 6 MB UHD 630 1100 MHz 65 W 2400 122$
Core i3-9100T 4 Ne 3,1 GHz 3,7 GHz 6 MB UHD 630 1100 MHz 35 W 2400 122$
Pentium G5620 2 Ano 4,0 GHz 4 MB UHD 630 ? 54 W 2400 85$
Pentium G5600F 2 Ano 3,9 GHz 4 MB Ne Ne 54 W 2400 ?
Pentium G5600T 2 Ano 3,3 GHz 4 MB UHD 630 ? 35 W 2400 75$
Pentium G5420 2 Ano 3,8 GHz 4 MB UHD 630 ? 54 W 2400 64$
Pentium G5420T 2 Ano 3,2 GHz 4 MB UHD 630 ? 35 W 2400 64$
Celeron G4950 2 Ne 3,3 GHz 2 MB UHD 610 ? 54 W 2400 52$
Celeron G4930 2 Ne 3,2 GHz 2 MB UHD 610 ? 54 W 2400 42$
Celeron G4930T 2 Ne 3,0 GHz 2 MB UHD 610 ? 35 W 2400 42$

 

Cyber25

Úsporné 35W verze

Od Core i9-9900 je vydána také úsporná verze Core i9-9900T, která bude novým nejvýkonnějším 35W čipem. Ta má zachované stejné parametry, jen základní frekvence je stažená dolů až na 2,1 GHz a maximální turbo dosahuje jen 4,4 GHz. TDP je 35W, ale opět je to hodnota pro základní takt, při vícevláknovém turbu bude procesor TDP přešvihávat, možná i dost razantně (nicméně turbo by se snad mělo přizpůsobovat chlazení).

Další modely 35W řady jsou Core i7-9700T s osmi jádry/osmi vlákny a taktem 2,0–4,3 GHz), dále šestijádra/šestivlákna Core i5-9600T, 9500T9400T (2,3–3,9/ 2,2–3,7/1,8–3,4 GHz), jejichž parametry už jsme znali z úniků. Dále pak máme dvě 35W čtyřjádra/čtyřvlákna: Core i3-9300TCore i3-9100T. I ta mají aktivní turbo a jejich frekvence jsou 3,2–3,8 a 3,1–3,7 GHz. Verze T s 35W TDP pak existují také od dvoujádrových Pentií a Celeronů, vše to můžete vidět v tabulce.

Galerie: Core i5-9400F z generace Coffee Lake Refresh a jeho delid

Autor článku

Redaktor portálu Cnews.cz. Zaměřuje se na procesory, mobilní SoC, grafické karty, disky a další počítačový hardware. Profil autora →

'; document.getElementById('preroll-iframe').onload = function () { setupIframe(); } prerollContainer = document.getElementsByClassName('preroll-container-iframe')[0]; } function setupIframe() { prerollDocument = document.getElementById('preroll-iframe').contentWindow.document; let el = prerollDocument.createElement('style'); prerollDocument.head.appendChild(el); el.innerText = "#adContainer>div:nth-of-type(1),#adContainer>div:nth-of-type(1) > iframe { width: 99% !important;height: 99% !important;max-width: 100%;}#videoContent,body{ width:100vw;height:100vh}body{ font-family:'Helvetica Neue',Arial,sans-serif}#videoContent{ overflow:hidden;background:#000}#adMuteBtn{ width:35px;height:35px;border:0;background:0 0;display:none;position:absolute;fill:rgba(230,230,230,1);bottom:20px;right:25px}"; videoContent = prerollDocument.getElementById('contentElement'); videoContent.style.display = 'none'; videoContent.volume = 1; videoContent.muted = false; const playPromise = videoContent.play(); if (playPromise !== undefined) { playPromise.then(function () { console.log('PREROLL sound allowed'); // setUpIMA(true); videoContent.volume = 1; videoContent.muted = false; setUpIMA(); }).catch(function () { console.log('PREROLL sound forbidden'); videoContent.volume = 0; videoContent.muted = true; setUpIMA(); }); } } function setupDimensions() { prerollWidth = Math.min(iinfoPrerollPosition.offsetWidth, 480); prerollHeight = Math.min(iinfoPrerollPosition.offsetHeight, 320); } function setUpIMA() { google.ima.settings.setDisableCustomPlaybackForIOS10Plus(true); google.ima.settings.setLocale('cs'); google.ima.settings.setNumRedirects(10); // Create the ad display container. createAdDisplayContainer(); // Create ads loader. adsLoader = new google.ima.AdsLoader(adDisplayContainer); // Listen and respond to ads loaded and error events. adsLoader.addEventListener( google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, onAdsManagerLoaded, false); adsLoader.addEventListener( google.ima.AdErrorEvent.Type.AD_ERROR, onAdError, false); // An event listener to tell the SDK that our content video // is completed so the SDK can play any post-roll ads. const contentEndedListener = function () { adsLoader.contentComplete(); }; videoContent.onended = contentEndedListener; // Request video ads. const adsRequest = new google.ima.AdsRequest(); adsRequest.adTagUrl = iinfoVastUrls[iinfoVastUrlIndex]; console.log('Preroll advert: ' + iinfoVastUrls[iinfoVastUrlIndex]); videoContent.muted = false; videoContent.volume = 1; // Specify the linear and nonlinear slot sizes. This helps the SDK to // select the correct creative if multiple are returned. // adsRequest.linearAdSlotWidth = prerollWidth; // adsRequest.linearAdSlotHeight = prerollHeight; adsRequest.nonLinearAdSlotWidth = 0; adsRequest.nonLinearAdSlotHeight = 0; adsLoader.requestAds(adsRequest); } function createAdDisplayContainer() { // We assume the adContainer is the DOM id of the element that will house // the ads. prerollDocument.getElementById('videoContent').style.display = 'none'; adDisplayContainer = new google.ima.AdDisplayContainer( prerollDocument.getElementById('adContainer'), videoContent); } function unmutePrerollAdvert() { adVolume = !adVolume; if (adVolume) { adsManager.setVolume(0.3); prerollDocument.getElementById('adMuteBtn').innerHTML = ''; } else { adsManager.setVolume(0); prerollDocument.getElementById('adMuteBtn').innerHTML = ''; } } function onAdsManagerLoaded(adsManagerLoadedEvent) { // Get the ads manager. const adsRenderingSettings = new google.ima.AdsRenderingSettings(); adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete = true; adsRenderingSettings.loadVideoTimeout = 12000; // videoContent should be set to the content video element. adsManager = adsManagerLoadedEvent.getAdsManager(videoContent, adsRenderingSettings); // Add listeners to the required events. adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, onAdError); adsManager.addEventListener( google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, onContentPauseRequested); adsManager.addEventListener( google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, onContentResumeRequested); adsManager.addEventListener( google.ima.AdEvent.Type.ALL_ADS_COMPLETED, onAdEvent); // Listen to any additional events, if necessary. adsManager.addEventListener(google.ima.AdEvent.Type.LOADED, onAdEvent); adsManager.addEventListener(google.ima.AdEvent.Type.STARTED, onAdEvent); adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE, onAdEvent); playAds(); } function playAds() { // Initialize the container. Must be done through a user action on mobile // devices. videoContent.load(); adDisplayContainer.initialize(); // setupDimensions(); try { // Initialize the ads manager. Ad rules playlist will start at this time. adsManager.init(1920, 1080, google.ima.ViewMode.NORMAL); // Call play to start showing the ad. Single video and overlay ads will // start at this time; the call will be ignored for ad rules. adsManager.start(); // window.addEventListener('resize', function (event) { // if (adsManager) { // setupDimensions(); // adsManager.resize(prerollWidth, prerollHeight, google.ima.ViewMode.NORMAL); // } // }); } catch (adError) { // An error may be thrown if there was a problem with the VAST response. // videoContent.play(); } } function onAdEvent(adEvent) { const ad = adEvent.getAd(); console.log('Preroll event: ' + adEvent.type); switch (adEvent.type) { case google.ima.AdEvent.Type.LOADED: if (!ad.isLinear()) { videoContent.play(); } prerollDocument.getElementById('adContainer').style.width = '100%'; prerollDocument.getElementById('adContainer').style.maxWidth = '640px'; prerollDocument.getElementById('adContainer').style.height = '360px'; break; case google.ima.AdEvent.Type.STARTED: window.addEventListener('scroll', onActiveView); if (ad.isLinear()) { intervalTimer = setInterval( function () { // Example: const remainingTime = adsManager.getRemainingTime(); // adsManager.pause(); }, 300); // every 300ms } prerollDocument.getElementById('adMuteBtn').style.display = 'block'; break; case google.ima.AdEvent.Type.ALL_ADS_COMPLETED: if (ad.isLinear()) { clearInterval(intervalTimer); } if (prerollLastError === 303) { playYtVideo(); } break; case google.ima.AdEvent.Type.COMPLETE: if (ad.isLinear()) { clearInterval(intervalTimer); } playYtVideo(); break; } } function onAdError(adErrorEvent) { console.log(adErrorEvent.getError()); prerollLastError = adErrorEvent.getError().getErrorCode(); if (!loadNext()) { playYtVideo(); } } function loadNext() { iinfoVastUrlIndex++; if (iinfoVastUrlIndex < iinfoVastUrls.length) { iinfoPrerollPosition.remove(); playPrerollAd(); } else { return false; } adVolume = 1; return true; } function onContentPauseRequested() { videoContent.pause(); } function onContentResumeRequested() { videoContent.play(); } function onActiveView() { if (prerollContainer) { const containerOffset = prerollContainer.getBoundingClientRect(); const windowHeight = window.innerHeight; if (containerOffset.top < windowHeight/1 && containerOffset.bottom > 0.0) { if (prerollPaused) { adsManager.resume(); prerollPaused = false; } return true; } else { if (!prerollPaused) { adsManager.pause(); prerollPaused = true; } } } return false; } function playYtVideo() { iinfoPrerollPosition.remove(); youtubeIframe.style.display = 'block'; youtubeIframe.src += '&autoplay=1&mute=1'; } }
'; document.getElementById('outstream-iframe').onload = function () { setupIframe(); } replayScreen = document.getElementById('iinfoOutstreamReplay'); iinfoOutstreamPosition = document.getElementById('iinfoOutstreamPosition'); outstreamContainer = document.getElementsByClassName('outstream-container')[0]; setupReplayScreen(); } function setupIframe() { outstreamDocument = document.getElementById('outstream-iframe').contentWindow.document; let el = outstreamDocument.createElement('style'); outstreamDocument.head.appendChild(el); el.innerText = "#adContainer>div:nth-of-type(1),#adContainer>div:nth-of-type(1) > iframe { width: 99% !important;height: 99% !important;max-width: 100%;}#videoContent,body{ width:100vw;height:100vh}body{ font-family:'Helvetica Neue',Arial,sans-serif}#videoContent{ overflow:hidden;background:#000}#adMuteBtn{ width:35px;height:35px;border:0;background:0 0;display:none;position:absolute;fill:rgba(230,230,230,1);bottom:-5px;right:25px}"; videoContent = outstreamDocument.getElementById('contentElement'); videoContent.style.display = 'none'; videoContent.volume = 1; videoContent.muted = false; if ( location.href.indexOf('rejstriky.finance.cz') !== -1 || location.href.indexOf('finance-rejstrik') !== -1 || location.href.indexOf('firmy.euro.cz') !== -1 || location.href.indexOf('euro-rejstrik') !== -1 || location.href.indexOf('/rejstrik/') !== -1 || location.href.indexOf('/rejstrik-firem/') !== -1) { outstreamDirectPlayed = true; soundAllowed = true; iinfoVastUrlIndex = 0; } if (!outstreamDirectPlayed) { console.log('OUTSTREAM direct'); setUpIMA(true); } else { if (soundAllowed) { const playPromise = videoContent.play(); if (playPromise !== undefined) { playPromise.then(function () { console.log('OUTSTREAM sound allowed'); setUpIMA(false); }).catch(function () { console.log('OUTSTREAM sound forbidden'); renderBanner(); }); } } else { renderBanner(); } } } function getWrapper() { let articleWrapper = document.querySelector('.rs-outstream-placeholder'); // Outstream Placeholder from RedSys manipulation if (articleWrapper && articleWrapper.style.display !== 'block') { articleWrapper.innerHTML = ""; articleWrapper.style.display = 'block'; } // Don't render OutStream on homepages if (articleWrapper === null) { if (document.querySelector('body.p-index')) { return null; } } if (articleWrapper === null) { articleWrapper = document.getElementById('iinfo-outstream'); } if (articleWrapper === null) { articleWrapper = document.querySelector('.layout-main__content .detail__article p:nth-of-type(6)'); } if (articleWrapper === null) { // Euro, Autobible, Zdravi articleWrapper = document.querySelector('.o-article .o-article__text p:nth-of-type(6)'); } if (articleWrapper === null) { articleWrapper = document.getElementById('sidebar'); } if (!articleWrapper) { console.error("Outstream wrapper of article was not found."); } return articleWrapper; } function setupDimensions() { outstreamWidth = Math.min(iinfoOutstreamPosition.offsetWidth, 480); outstreamHeight = Math.min(iinfoOutstreamPosition.offsetHeight, 320); } /** * Sets up IMA ad display container, ads loader, and makes an ad request. */ function setUpIMA(direct) { google.ima.settings.setDisableCustomPlaybackForIOS10Plus(true); google.ima.settings.setLocale('cs'); google.ima.settings.setNumRedirects(10); // Create the ad display container. createAdDisplayContainer(); // Create ads loader. adsLoader = new google.ima.AdsLoader(adDisplayContainer); // Listen and respond to ads loaded and error events. adsLoader.addEventListener( google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, onAdsManagerLoaded, false); adsLoader.addEventListener( google.ima.AdErrorEvent.Type.AD_ERROR, onAdError, false); // An event listener to tell the SDK that our content video // is completed so the SDK can play any post-roll ads. const contentEndedListener = function () { adsLoader.contentComplete(); }; videoContent.onended = contentEndedListener; // Request video ads. const adsRequest = new google.ima.AdsRequest(); if (direct) { adsRequest.adTagUrl = directVast; console.log('Outstream DIRECT CAMPAING advert: ' + directVast); videoContent.muted = true; videoContent.volume = 0; outstreamDirectPlayed = true; } else { adsRequest.adTagUrl = iinfoVastUrls[iinfoVastUrlIndex]; console.log('Outstream advert: ' + iinfoVastUrls[iinfoVastUrlIndex]); videoContent.muted = false; videoContent.volume = 1; } // Specify the linear and nonlinear slot sizes. This helps the SDK to // select the correct creative if multiple are returned. // adsRequest.linearAdSlotWidth = outstreamWidth; // adsRequest.linearAdSlotHeight = outstreamHeight; adsRequest.nonLinearAdSlotWidth = 0; adsRequest.nonLinearAdSlotHeight = 0; adsLoader.requestAds(adsRequest); } function setupReplayScreen() { replayScreen.addEventListener('click', function () { iinfoOutstreamPosition.remove(); iinfoVastUrlIndex = 0; outstreamInit(); }); } /** * Sets the 'adContainer' div as the IMA ad display container. */ function createAdDisplayContainer() { // We assume the adContainer is the DOM id of the element that will house // the ads. outstreamDocument.getElementById('videoContent').style.display = 'none'; adDisplayContainer = new google.ima.AdDisplayContainer( outstreamDocument.getElementById('adContainer'), videoContent); } function unmuteAdvert() { adVolume = !adVolume; if (adVolume) { adsManager.setVolume(0.3); outstreamDocument.getElementById('adMuteBtn').innerHTML = ''; } else { adsManager.setVolume(0); outstreamDocument.getElementById('adMuteBtn').innerHTML = ''; } } /** * Loads the video content and initializes IMA ad playback. */ function playAds() { // Initialize the container. Must be done through a user action on mobile // devices. videoContent.load(); adDisplayContainer.initialize(); // setupDimensions(); try { // Initialize the ads manager. Ad rules playlist will start at this time. adsManager.init(1920, 1080, google.ima.ViewMode.NORMAL); // Call play to start showing the ad. Single video and overlay ads will // start at this time; the call will be ignored for ad rules. adsManager.start(); // window.addEventListener('resize', function (event) { // if (adsManager) { // setupDimensions(); // adsManager.resize(outstreamWidth, outstreamHeight, google.ima.ViewMode.NORMAL); // } // }); } catch (adError) { // An error may be thrown if there was a problem with the VAST response. // videoContent.play(); } } /** * Handles the ad manager loading and sets ad event listeners. * @param { !google.ima.AdsManagerLoadedEvent } adsManagerLoadedEvent */ function onAdsManagerLoaded(adsManagerLoadedEvent) { // Get the ads manager. const adsRenderingSettings = new google.ima.AdsRenderingSettings(); adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete = true; adsRenderingSettings.loadVideoTimeout = 12000; // videoContent should be set to the content video element. adsManager = adsManagerLoadedEvent.getAdsManager(videoContent, adsRenderingSettings); // Add listeners to the required events. adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, onAdError); adsManager.addEventListener( google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, onContentPauseRequested); adsManager.addEventListener( google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, onContentResumeRequested); adsManager.addEventListener( google.ima.AdEvent.Type.ALL_ADS_COMPLETED, onAdEvent); // Listen to any additional events, if necessary. adsManager.addEventListener(google.ima.AdEvent.Type.LOADED, onAdEvent); adsManager.addEventListener(google.ima.AdEvent.Type.STARTED, onAdEvent); adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE, onAdEvent); playAds(); } /** * Handles actions taken in response to ad events. * @param { !google.ima.AdEvent } adEvent */ function onAdEvent(adEvent) { // Retrieve the ad from the event. Some events (for example, // ALL_ADS_COMPLETED) don't have ad object associated. const ad = adEvent.getAd(); console.log('Outstream event: ' + adEvent.type); switch (adEvent.type) { case google.ima.AdEvent.Type.LOADED: // This is the first event sent for an ad - it is possible to // determine whether the ad is a video ad or an overlay. if (!ad.isLinear()) { // Position AdDisplayContainer correctly for overlay. // Use ad.width and ad.height. videoContent.play(); } outstreamDocument.getElementById('adContainer').style.width = '100%'; outstreamDocument.getElementById('adContainer').style.maxWidth = '640px'; outstreamDocument.getElementById('adContainer').style.height = '360px'; break; case google.ima.AdEvent.Type.STARTED: window.addEventListener('scroll', onActiveView); // This event indicates the ad has started - the video player // can adjust the UI, for example display a pause button and // remaining time. if (ad.isLinear()) { // For a linear ad, a timer can be started to poll for // the remaining time. intervalTimer = setInterval( function () { // Example: const remainingTime = adsManager.getRemainingTime(); // adsManager.pause(); }, 300); // every 300ms } outstreamDocument.getElementById('adMuteBtn').style.display = 'block'; break; case google.ima.AdEvent.Type.ALL_ADS_COMPLETED: if (ad.isLinear()) { clearInterval(intervalTimer); } if (outstreamLastError === 303) { if (isBanner) { renderBanner(); } else { replayScreen.style.display = 'flex'; } } break; case google.ima.AdEvent.Type.COMPLETE: // This event indicates the ad has finished - the video player // can perform appropriate UI actions, such as removing the timer for // remaining time detection. if (ad.isLinear()) { clearInterval(intervalTimer); } if (isBanner) { renderBanner(); } else { replayScreen.style.display = 'flex'; } break; } } /** * Handles ad errors. * @param { !google.ima.AdErrorEvent } adErrorEvent */ function onAdError(adErrorEvent) { // Handle the error logging. console.log(adErrorEvent.getError()); outstreamLastError = adErrorEvent.getError().getErrorCode(); if (!loadNext()) { renderBanner(); } } function renderBanner() { if (isBanner) { console.log('Outstream: Render Banner'); iinfoOutstreamPosition.innerHTML = ""; iinfoOutstreamPosition.style.height = "330px"; iinfoOutstreamPosition.appendChild(bannerDiv); } else { console.log('Outstream: Banner is not set'); } } function loadNext() { iinfoVastUrlIndex++; if (iinfoVastUrlIndex < iinfoVastUrls.length) { iinfoOutstreamPosition.remove(); outstreamInit(); } else { return false; } adVolume = 1; return true; } /** * Pauses video content and sets up ad UI. */ function onContentPauseRequested() { videoContent.pause(); // This function is where you should setup UI for showing ads (for example, // display ad timer countdown, disable seeking and more.) // setupUIForAds(); } /** * Resumes video content and removes ad UI. */ function onContentResumeRequested() { videoContent.play(); // This function is where you should ensure that your UI is ready // to play content. It is the responsibility of the Publisher to // implement this function when necessary. // setupUIForContent(); } function onActiveView() { if (outstreamContainer) { const containerOffset = outstreamContainer.getBoundingClientRect(); const windowHeight = window.innerHeight; if (containerOffset.top < windowHeight/1 && containerOffset.bottom > 0.0) { if (outstreamPaused) { adsManager.resume(); outstreamPaused = false; } return true; } else { if (!outstreamPaused) { adsManager.pause(); outstreamPaused = true; } } } return false; } let outstreamInitInterval; if (typeof cpexPackage !== "undefined") { outstreamInitInterval = setInterval(tryToInitializeOutstream, 100); } else { const wrapper = getWrapper(); if (wrapper) { let outstreamInitialized = false; window.addEventListener('scroll', () => { if (!outstreamInitialized) { const containerOffset = wrapper.getBoundingClientRect(); const windowHeight = window.innerHeight; if (containerOffset.top < windowHeight / 1 && containerOffset.bottom > 0.0) { outstreamInit(); outstreamInitialized = true; } } }); } } function tryToInitializeOutstream() { const wrapper = getWrapper(); if (wrapper) { const containerOffset = wrapper.getBoundingClientRect(); const windowHeight = window.innerHeight; if (containerOffset.top < windowHeight / 1 && containerOffset.bottom > 0.0) { if (cpexPackage.adserver.displayed) { clearInterval(outstreamInitInterval); outstreamInit(); } } } else { clearInterval(outstreamInitInterval); } } }
OSZAR »