Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

540
Vistas
How to embed Twitch channel (video + chat) using React Js

Hello I'm creating a web app for myself and trying to use the Twitch Embedded API to display Twitch streams and the chat within my web page. I'm not sure how to handle this I have some experience with React JS but definitely not this.

They provide an HTML but I have no idea how to make it work on my app:

<html>
  <body>
    <!-- Add a placeholder for the Twitch embed -->
    <div id="twitch-embed"></div>

    <!-- Load the Twitch embed JavaScript file -->
    <script src="https://embed.twitch.tv/embed/v1.js"></script>

    <!-- Create a Twitch.Embed object that will render within the "twitch-embed" element -->
    <script type="text/javascript">
      new Twitch.Embed("twitch-embed", {
        width: 854,
        height: 480,
        channel: "monstercat",
        // Only needed if this page is going to be embedded on other websites
        parent: ["embed.example.com", "othersite.example.com"]
      });
    </script>
  </body>
</html>

Since I didn't understand this bit I went to try and just get the video at least, this is the code they provide, but I have not manage it to make it work so far:

<iframe
    src="https://player.twitch.tv/?<channel, video, or collection>&parent=streamernews.example.com"
    height="<height>"
    width="<width>"
    allowfullscreen="<allowfullscreen>">
</iframe>

I did the following and got this result:

<Box mb={3} sx={{display: 'flex', justifyContent: 'center',  mr: 2}}>

<CardMedia  
component = "iframe" 
src="https://player.twitch.tv/?<StreamerName>&parent=localhost"
title = 'Faker stream' 
controls/>

</Box>

enter image description here

Or this

enter image description here

This is the SandBox I have created. I saw other resources/questions/answers and they are a bit outdated which is why I created this new question.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If anyone was wondering how to do this I got the video one working. I'll update it again if I get the HTML one with chat + video working.

JUST VIDEO

   <Box mb={3} sx={{display: 'flex', justifyContent: 'center',  mr: 2,  color: "white"}}>
       <CardMedia  
       component = "iframe" 
       src="https://player.twitch.tv/?channel=faker&parent=localhost"
       height = "800"
       title = 'Faker stream' 
       controls/>
   </Box>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda