How will Twitch Embed updates affect mobile app embeds?

In Electron you can use onHeadersReceived to modify the Content-Security-Policy header and strip out the frame-ancestors part of it.

I try this and not working :confused:

can you at least tell us if there’s anyone working on this ? Should we wait for you to fix this or should we find some other way to implement twitch player in mobile apps ?

I imaging Twitch is aware and determining what to do, but I don’t know as :

I’m not Twitch staff, just another third party dev, whom helps looks after the forum.

Right, meant you as Twitch, didn’t know you’re not :slight_smile:

Hi, we have an app that is built with Flutter, using the WebView for Twitch and unfortunately, since Twitch added parent as a mandatory parameter in query string or options for the interactive player, it is not working anymore.
What is the workaround for mobile apps to pass parent in order to use Twitch?

@jbulava do you have some kind of update on what mobile apps are supposed to do or are you working on a fix?


Any thoughts of this being possible within an Electron <webview>? iirc there’s no direct access to the session

Details to follow

Good timing - thanks, I’ll keep up-to-date with that post

Some details about embedding Twitch into browser extensions.

In Chromium-based browsers, we must specify parent parameter with localhost or any valid domain. The browser ignores frame-ancestors directive - this is exactly what we need.

In Firefox, we must intercept HTTP response and remove the entire Content-Security-Policy header (removing the directive is not enough).

Same problem for Samsung Smart TV OS (Tizen). It uses “file://” origin just like electron and therefore embed stopped working. Please have this in mind when working on a fix.

Hi there, I’m working on a JavaScript file, which acts as a local browser source for OBS (so it’s basically file://, too). Therefor, I have no parent to set. Setting it to “null” or “localhost” does not work.

Would be great, if this can be fixed as soon as possible.

Best to throw such a thing on a real domain. Even if that real domain is localhost.

file:// is not support at time of writing.

I just found this post (Twitch Embedded Player Updates in 2020). The last post of the staff member gives hope for file://.

That is why I said

As it may change as per that post. I just didn’t link it in my reply. I assumed you posted here because that post is locked to replies

Hi, is there any update on this ?

Hi, is there any workaround for mobile platforms? Since the last change to force us to use the parent parameter, I’m not able to show Twitch videos with an embed player in my Android and iOS app.

I tried in many ways to fix this but nothing worked…

@jbulava is anyone from Twitch going to respond to this mobile thread with some answers?

Thanks for the bump on this thread, I will follow up with the proper teams to further discuss mobile apps and respond.