Twitch iframes no longer work

Description of the issue: When using iframes to load a twitch stream, it only shows a black screen for the video stream. The twitch UI loads in, just not the video/audio.

Steps to Reproduce (add as many as necessary): 1. 2. 3.
Paste this script into the console on any regular website (e.g. google/twitch/wikipedia), it will create an iframe as seen below and load a twitch channel. feel free to swap out the twitch channel name in the script to any streamer you want.

(() => {
  const existing = document.getElementById('test-iframe');
  if (existing) existing.remove();

  const iframe = document.createElement('iframe');
  iframe.id = 'test-iframe';
  iframe.src = 'https://player.twitch.tv/?channel=kaicenat&parent=' + location.hostname;
  iframe.style.position = 'fixed';
  iframe.style.top = '10px';
  iframe.style.right = '10px';
  iframe.style.width = '480px';
  iframe.style.height = '270px';
  iframe.style.zIndex = '99999';
  iframe.style.border = '2px solid #9146FF';
  iframe.allowFullscreen = true;
  document.body.appendChild(iframe);
})();

Actual Result (gifs and screenshots are welcome!):
Here is a screenshot example of an iframe being loaded within brave.

Expected result:
I expect the stream to load as normal like as seen here with the script executed in edge.

Reproduces how often:
100% of the time now.

Operating System and Brave Version(See the About Brave page in the main menu):
Brave is up to date
Brave 1.79.126 (Official Build) (arm64)
Chromium: 137.0.7151.119

Macos 14.1.1 | M2 Pro
Additional Information:
I found this issue out as I use this extension for twitch https://previews-app.com/ - it creates little preview windows for streamers when you hover over their name, but it has since broken. I think Twitch might be attempting to block Brave as a whole, possibly in some kind of get back for Brave blocking Twitch ads by default, I’m not sure. All I know is, since Brave made that announcement about it blocking twitch ads, iframes no longer work in Brave. I use Twitch turbo, so in theory no ads should attempt to load across the entire site if its something to do with ad delivery.

1 Like

Outside of your script, do you see other embedded Twitch videos on sites display normally?

1 Like

No they don’t load on other websites. for example, all streamers typically have a StreamElements page, where the stream is embedded. StreamElements is major/official partner with Twitch, so it shouldn’t be broken here - but it is when using Brave.

the reason I provided the script was just to make it easily reproducible for people here on the forums.

1 Like

Thank you – will do some digging on this.

1 Like

Thank you.
Found this post here of someone doing more investigation and figured it may help.
https://linustechtips.com/topic/1615501-brave-browser-now-blocks-twitch-ads-by-default/?do=findComment&comment=16752110

I found this thread by searching around the internet after being suddenly unable to play embedded Twitch streams in a website since yesterday in Brave. In Chrome, Edge and Firefox they work properly. There’s a GraphQL endpoint that is called in Twitch’s embed iframe to get a PlaybackAccessToken and apparently if your user agent is “Brave” it responds with server error. If you set the user agent to Google Chrome or Test or anything else, you get a playback token. I contacted Twitch support yesterday to debug the errors some of my webapp’s users were seeing and they recommended that I try a supported browser, which is when I discovered this.

1 Like

Sec-ch-ua is being sniffed by Twitch, we’re investigating a fix

1 Like

By using extensions like Requestly, it’s easy to overwrite sec-ch-ua. Could brave simply overwrite it?

1 Like

Sure, we have an interim patch incoming soon, to avoid extension work arounds

2 Likes
  • Okay for testing in the latest Brave 1.80.125 or better
  • Enable Brave Twitch rules in brave://settings/shields/filters
1 Like

My Brave version is:

Brave is up to date
Brave 1.80.125 (Official Build) (arm64)
Chromium: 138.0.7204.184

I’ve enabled the Brave Twitch rules flag and restarted the browser fully.

The issue still persists - black screen.

1 Like

Apologies, the fix will be out next week, in the next release.

1 Like

I’ve tested this today on build v1.82.165, still experiencing embeds not loading. example: https://allstreams.tv/twitch/kaicenat

Hi,

just to update that even with Brave 1.82.170 (Official Build) (64-bit)

Chromium: 140.0.7339.186 the bug is still present.

When I try to open a Twitch embed, I still see this error in the console:

[GraphQL] One or more GraphQL errors were detected on request . PlaybackAccessToken: server error

So at the moment the stream is still not working.

any news? :blush:

1 Like

Hello this issue still appears present, the iframes don’t seem to load in brave, but work fine in other browsers.

Looking at rolling out a fix. Thanks for the report

1 Like

It looks like embeds now load and work on brave, but autoplay seems to be broken.
For example ifraem on: https://allstreams.tv/twitch/kaicenat seems to autoplay on Chrome, but not in Brave.

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