[Solved] Help Adding &parent to vue.js

Greetings. :raised_hand_with_fingers_splayed:

I have found a script HERE, which I would like to test on my localhost, but I have no idea how to add the new requirement of &parent=localhost.
Numerous google queries have been fruitless.

I’ve already added the required header requirements ie; const Authorization = ‘blah blah’, with my own clientID, but how and where to add the &parent string, I am at a loss.
I am also using wamp, and have configured it to be https.

Any and All assistance is Greatly appreciated.
Thank You in advance.
------------------------------------------------------------------------------------------------------------------------------------

[Answer] | [Solved] | [Final Edit]
Change this line in the html file

iframe :src="'https://player.twitch.tv/?channel=' + currentStreamer.user_name"

To This

iframe :src="'https://player.twitch.tv/?channel=' + currentStreamer.user_name + '&parent=localhost'"

and adjust &parent=localhost, to reflect All of the domains within Your site, that your api request will serve
Eg.

Be Well, and Thank You All :raised_hand_with_fingers_splayed:

        <iframe :src="'https://player.twitch.tv/?channel=' + currentStreamer.user_name" frameborder="0" allowfullscreen="true" scrolling="no" width="100%"></iframe>

In the HTML becomes

        <iframe :src="'https://player.twitch.tv/?channel=' + currentStreamer.user_name + '&parent=localhost" frameborder="0" allowfullscreen="true" scrolling="no" width="100%"></iframe>
1 Like

Good evening Barry.
Thank You for having a look at this, and taking the time to reply. :+1:

I had already tried your suggestion, and it hadn’t worked for me.
I get a blank screen, with no errors in the web console.
The amount of things I have tried would be too extensive to list here, but I Do apologise for not mentioning the basic iframe string, in that format. :sweat:

After reading your post, and knowing that I’ve tried that, I thought there may be something mis-configured within my setup, but I tried it in the codepen link within my primary post, and it also returns a blank screen, as displayed in the attached images below.

Without string

With string

If You or Another have any further suggestions, and/or questions, they will be welcomed, and Greatly appreciated.

Thank You once again Barry :slightly_smiling_face:

Kindest Regards

For testing on codepen you would need 2 parents, 1 for codepen.io like you have done, but because the preview area is within its own iframe you also need to include that as a parent which would be cdpn.io

1 Like

you’re missing the closing ’ in the parent string you added, and like Dist mentioned you need a 2nd parent param for cdpn.io for codepen’s sandboxing

1 Like

Good Evening Dist.
Thank You Very Much for pointing out the iframe domain, and its required inclusion :+1:

I had recently read the wix fixes aswell, involving their iframe, but hadn’t even thought to check within codepen.

Thank You for taking the time to reply, and providing insight into other possible areas of research.

Kindest Regards

Good Evening 3ventic.

As soon as I read

I quickly checked the code within my localhost, positive that it was included, and that I had Only forgotten to add it to codepen. :thinking:
But sure enough, I hadn’t closed it off…
:man_facepalming:

My edit history showed that I had accidentally removed it, during a troubleshooting session, and didn’t even realise.

Cheers for point that out for Me, and for taking time to reply.

Kindest Regards

Once Again, Thank You Kind Gents/Ladies for Your Contribution & Assistance.

I will mark this thread as Solved, and include the completed edits within the first post, as a reference for anybody which may encounter a similar situation, or the code in question.

Kind Regards

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