[Invalid Parent] parent query string value contains invalid domain name

I was using the twitch tutorial to see a twitch live on my website but it says there is an error in the parent section, it searched on internet and on the similar topic on the forum, I didn’t find.

<script src= "https://player.twitch.tv/js/embed/v1.js"></script>
<div id="120"></div>
<script type="text/javascript">
  var options = {
    width: 800,
    height: 600,
    channel: "sardoche",
    parent: ["mysite.com"]
  };
  var player = new Twitch.Player("120", options);
  player.setVolume(0.5);
</script>

Looks correct to me mysite.com is a valid site, you jsut need to have swapped it for your actual domain

Try

<script src= "https://player.twitch.tv/js/embed/v1.js"></script>
<div id="120"></div>
<script type="text/javascript">
  var options = {
    width: 800,
    height: 600,
    channel: "sardoche"
  };
  var player = new Twitch.Player("120", options);
  player.setVolume(0.5);
</script>

And let it auto detect instead

I’m afraid with the new version parent section has to be there, i tried but same error InvalidParent] parent query string value contains invalid domain name

No, it doesn’t

https://barrycarlyon.github.io/twitch_misc/player/html/

my example omits the parent config and it auto determines

Link to page with broken embed please

Still work in progress don’t mind the stuff just go for twitch silons.fr

Works here

Oh, jeez I think it has to be connected to an other problem I have where chrome instantly replace my URL by the ipv4 of my server

Yup that’ll do it

Okay so you had no problem seeing the stream ?

as shown in my screenshot. it all loaded fine/correctly!

Do you have the sound ? I don’t have it

Yes all is working fine/correctly.

You may need to click to unmute first

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