Prof Stream Endormie
Outils

Générateur d’iframe Twitch

Choisissez votre chaîne, ajoutez votre domaine en parent, puis copiez-collez le code. Option image : sous la chaîne (uniquement derrière le bloc Twitch) ou sous toute la page.

Nom de chaîne uniquement (sans URL).
Un domaine par ligne (ou séparé par virgule). Sans https://, sans chemin.

Texte (optionnel)

Image (optionnel)

L’image reste hébergée à l’URL fournie.
Dans les 2 cas, l’image est “douce” (voile noir) et le Twitch passe au-dessus.

Options



        

Doc Twitch : Embed Player & Chat

Aperçu

L’aperçu marche si parent est correct et si la page est en HTTPS.

`; } const underChainClass = (cfg.imgUse === 'under_chain' && cfg.imgUrl) ? ' pse-tw-under' : ''; const underChainStyle = (cfg.imgUse === 'under_chain' && cfg.imgUrl) ? ' style="--pse-bgimg:url(\'' + esc(cfg.imgUrl) + '\')"' : ''; return `
${title}${embed}${text}
${bodyBgHook}`; } function refreshAll(){ const cfg = buildConfig(); if(!cfg){ outputEl.textContent = ''; try{ playerFrame.src = 'about:blank'; chatFrame.src='about:blank'; }catch(e){} return; } pvInfo.textContent = 'Parent(s) : ' + cfg.parents.join(', '); pvInfo.style.display = 'block'; updatePreview(cfg); outputEl.textContent = generateCode(cfg); } btnGenerate.addEventListener('click', refreshAll); btnUseCurrent.addEventListener('click', ()=>{ const host = location.hostname; if(host) parentsEl.value = host; setStatus('ok', 'Domaine actuel ajouté : ' + host); refreshAll(); }); btnCopy.addEventListener('click', async ()=>{ const code = outputEl.textContent || ''; if(!code.trim()){ setStatus('err', 'Rien à copier : générez d’abord.'); return; } try{ await navigator.clipboard.writeText(code); setStatus('ok', 'Code copié dans le presse-papiers.'); }catch(e){ setStatus('err', 'Copie impossible. Copiez manuellement.'); } }); // Auto refresh (light) const watch = [channelEl, modeEl, parentsEl, titleAboveEl, textBelowEl, imgUrlEl, imgUseEl, wEl, hEl, chatWEl, chatHEl, chatDarkEl, autoplayEl, mutedEl, fullscreenEl]; let t=null; function schedule(){ clearTimeout(t); t=setTimeout(()=>{ try{refreshAll();}catch(e){} }, 200); } watch.forEach(x=>x && x.addEventListener('input', schedule)); watch.forEach(x=>x && x.addEventListener('change', schedule)); refreshAll(); })();