Using interactive embedded player without HTTP server


I would like to embed the interactive player into a local html file which can be rendered on a mobile device. However, it seems that interacting with the player (e.g. pause, setVolume) via postMessages requires the file to be hosted on a local HTTP server if I want to use the API.

Is there any other way?

Thanks in advance

Since it’s expecting to operate over SSL, so you’d need to server your local HTML file over SSL.

So you’d need to raise a SSL Powered server.

Since file:// is really limited on permissions.

Disclaimer: not really tested doing this as 99% of my work I’m on a SSL’ed server

1 Like

I find it odd that the Twitch.Embed approach works fine compared to the Twitch.Player in this context.
Is there any reason that the postMessages are blocked due to CORS restrictions for the “standalone” Player but work fine for the Twitch.Embed object by accessing Twitch.Embed.player?

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