Twitch Embedded Player Migration - Timeline Update

Edit
This can be attributed to a lack of understanding where my source request was coming from. I was actually viewing a static HTML file referencing the javascript - you can’t do this because your source request for the embed is actually the file itself and not “localhost”.

Basic setup for Windows:

  • Turn on Windows Features (IIS)
  • Create a self-signed cert in powershell
  • create your static site in IIS and assign the certificate
  • host your static site in the application directory
  • set the parent key in the embed to parent: []

Magic.

If you’re referencing another site from your localhost site, you need to set the domain in parent: [‘yourdomain’,‘anotherdomain’,‘more’]

Leaving the previous below to help others

So is it possible to use javascript embeds and develop from localhost? It seems that discussion got lost halfway through and it never came back up. I saw the part about setting up SSL but that’s just an absurd requirement for developing in my given scenario.

I’m getting this error

[NoParent] parent query string value was not specified

With the following html:

<html>
  <head>
    <script src= "./twitch_player.js"></script>
  </head>
  <body>
    <!-- Projectors -->
    <div id="twitch_projector_1"></div>
    <!-- Streams -->
    <!-- xxx -->
    <script type="text/javascript">
      var options = {
          width: 1920/2,
          height: 1080/2,
          channel: "xxx",
          migration: "true",
          parent: ["localhost"]
      };
      var player = new Twitch.Player("twitch_projector_1", options);
      player.setVolume(0.5);
    </script>
  </body>
</html>

Request shows that two parent parameters were passed, one is “localhost” the other is “” (blank).

Request URL: https://player.twitch.tv/embed-error.html?errorCode=NoParent&content=player.twitch.tv%2F%3Fchannel%3Dxxx%26height%3D540%26migration%3Dtrue%26parent%3Dlocalhost%26parent%3D%26referrer%3Dfile%253A%252F%252F%252FC%253A%252FUsers%252Fbrett%252FDownloads%252Fteambss_twitch.html%26width%3D960

When using the iframe option, it just refuses to connect.