Hi!
I’ve been embedding twitch for a website using https://embed.twitch.tv/embed/v1.js via
var player = new Twitch.Embed(“playerdiv”, {
width: “100%”,
height: “100%”,
channel: channel
});
Everything works for embedding it, but when the channel raids someone else it redirects to “https://www.twitch.tv/newchannel?.…” within the iframe.
This obviously results in “Refused to display ‘https://www.twitch.tv/newchannel?channel=oldchannel&height=100%&migration=true&parent=[...parent...]&referrer=raid&width=100%’ in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’.”
(Browser: Chrome)
Is there a way to avoid that issue, make sure it redirects correctly or to prevent redirects for embedded players entirely? Any solution would be better than having a huge gray box with " www.twitch.tv refused to connect." on the screen.
It would also be great to have an option to decide if the chat should be shown next to the video or below it (I know it moves below it if the video becomes too small, but it is large enough for that to not happen in our case). In our website design we have lots of space below the video, but would like to utilize some space next to it, resulting in an unnecessarily small video.
Thanks!
Chereazi