Twitch embed not working

I am making a website but the twitch embed doesn’t work:
image

<iframe src="https://player.twitch.tv/?video=1165453909&parent=file:///E:/Zal%C3%A1n%20FONTOS%20f%C3%A1jljai%202021/Paprikaleves%20weboldal/Paprikaleves.html" frameborder="0"
 allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>

file:// is not supported

You need either

  • https://
    or
  • localhost

Still not working: image

A parent should also be just the domain

So

<iframe src="https://player.twitch.tv/?video=1165453909&parent=https://localhost" frameborder="0"
     allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>

should be

<iframe src="https://player.twitch.tv/?video=1165453909&parent=localhost" frameborder="0"
     allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>

image
:frowning:

I have no other advice to give.

:frowning: I will try uploading it to google sites and then change it

And can you help making it so it isn’t showing 1 specific video but the last stream?

Heres an example

https://barrycarlyon.github.io/twitch_misc/examples/vod_player/

After you login it’ll fetch the past broadcasts of GabrielAndDresden

You can modify this code to fetch whatever channel.

Ideally you’d move the API calls to a server rather than frontend as you don’t want to have to have users login to use your site.

Thx <3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.