jneilliii / OctoPrint-RTMPStreamer

22 stars 13 forks source link

Twitch embed is misconfigured #24

Closed 0MechaGojira0 closed 2 months ago

0MechaGojira0 commented 3 years ago

Here is the new Twitch embed config. I dont think we have to add all of it aside from the web address. I understand how the old embed system worked but I am lost as to what to put as the "parent" address.

<iframe src="https://player.twitch.tv/?<channel, video, or collection>&parent=streamernews.example.com" height="" width="" frameborder="" scrolling="" allowfullscreen="">

jneilliii commented 3 years ago

So I have played with this a little bit and think this will be a difficult change to work around. Based on the docs it seems that you have to include an attribute and query parameter in the src url of an iframe called parent which appears to require a fully qualified domain name. If that is true then there is not going to be much I can do to get around this one. I'll keep looking for possible ways around this new imposed limitation. If I can get it to work with an internal name or ip address, then I can definitely make the necessary changes to the plugin to allow those parent requirements to be filled in where they need to be.

0MechaGojira0 commented 3 years ago

Awesome thanks for looking into it!I appreciate it!

On Tue, Feb 2, 2021 at 10:15 PM jneilliii notifications@github.com wrote:

So I have played with this a little bit and think this will be a difficult change to work around. Based on the docs it seems that you have to include an attribute and query parameter in the src url of an iframe called parent which appears to require a fully qualified domain name. If that is true then there is not going to be much I can do to get around this one. I'll keep looking for possible ways around this new imposed limitation. If I can get it to work with an internal name or ip address, then I can definitely make the necessary changes to the plugin to allow those parent requirements to be filled in where they need to be.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jneilliii/OctoPrint-RTMPStreamer/issues/24#issuecomment-772212050, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARBYLSOEZYMVVHNIKQ6KK33S5DEW3ANCNFSM4UOWBMYQ .

jneilliii commented 3 years ago

So I just tested and I think my suspicions are correct. I can get the URL to work in conjunction with the ngrok tunnel plugin and setting the &parent=29ce4cda33a4.ngrok.io to the end of the player url and it does load the embed when I access the site via the ngrok tunnel url directly, ie https://29ce4cda33a4.ngrok.io in the case above. I would suspect this would also work with the octoeverywhere plugin as well. For now, that's a potential work around to the embedded player, or just have another tab opened watching through the twitch dashboard.

trojan-xs commented 2 years ago

https://player.twitch.tv/?autoplay=false&channel=YOURCHANNEL&parent=MYDOMAIN.com

replace YOURCHANEL with your channel and MYDOMAIN.COM with your own FQDN

jneilliii commented 2 years ago

Yes, that is correct but it only works with a publicly available FQDN, you can't use something like octopi.local or the ip address of the printer for that parent querystring parameter.

TheSin- commented 2 years ago

there is one notable exception here.

if octoprint is running on your local machine (you can use 127.0.0.1 to access it) then you can use 127.0.0.1 as the FDQN and it works. But that is the only exception I can find and it's likely fairly rare that octoprint will be running on the system you are using to access it. But thought I'd log it.

PrintedVisionz3D commented 2 years ago

Hello was there a fix for this issue or is the plugin dead ?

jneilliii commented 2 years ago

The plugin can still stream to Twitch, it's just the embedded viewer in OctoPrint can't load without the proper public fully qualified domain name using your own or octoeverywhere URLs.

jneilliii commented 2 months ago

Since there's nothing I can really do to resolve this requirement by twitch embed closing ticket.

TheSin- commented 2 months ago

sadly this one is out of our control I agree, though it is sad.