TwitchPlayer icon indicating copy to clipboard operation
TwitchPlayer copied to clipboard

Add SSL baseURL to loadHTMLString in TwitchPlayer::updateWebPlayer

Open cancelself opened this issue 4 years ago • 5 comments

https://discuss.dev.twitch.tv/t/twitch-embedded-player-updates-in-2020/23956

cancelself avatar Jun 13 '20 21:06 cancelself

Forked + fixed for our app. If I get the time, will make it a property and send a PR. https://github.com/dpurdy/TwitchPlayer

cancelself avatar Jun 14 '20 05:06 cancelself

That would be awesome! Thanks for identifying the bug and the fix, that should go a ways itself to helping others :)

Chris-Perkins avatar Jun 14 '20 05:06 Chris-Perkins

Hello @dpurdy I think, I will need your help badly here. Kinda stuck with an app for quite a while now. Not able to play twitch streams post updates. I tried to look for the link you posted but unfortunately don't see it anymore. Can you guide me to it if you are still developing it?

biswajitnet avatar Jul 24 '20 19:07 biswajitnet

thank-you And just to add to my previous comment @Chris-Perkins Thanks for what you do for the community. I am really thankful for all the efforts you put in here to help developers like us.

Just met you from Twitch Dev and am very happy that your codes helped me find interesting stuff that I was missing on my end.

biswajitnet avatar Jul 24 '20 20:07 biswajitnet

Glad the library is useful to you @biswajitnet!To fix the issue dpurdy and I were discussing, my understanding is that you have to modify the base url for whichever style of embed you are displaying in your app.

For example, if you're using TwitchClipPlayer, you need to modify BaseURL here: https://github.com/Chris-Perkins/TwitchPlayer/blob/master/TwitchPlayer/Classes/TwitchClipPlayer.swift#L214

The base URL you pass in can be anything related to your application. As an example, here's Twitch's official documentation. You want to look at the "parent" property here.

Chris-Perkins avatar Jul 25 '20 21:07 Chris-Perkins