After prowling the forums a bit, I’m seeing repots of Javascript errors with the iframe-embedded chat application. I’m getting them, and it looks like it has to do with recent changes in the browsers. I’ve seen that people were commenting about this at least two years ago, but it seems to be an ongoing issue:
I believe it’s correct to say that the scripts won’t load because the cookies have the wrong values set.
My embed code is straight out of the book, pure vanilla:
<div class="twitch-chat">
<iframe
frameborder="0"
scrolling="no"
src="https://www.twitch.tv/embed/{mychannel}/chat?parent={mysite}.com"
height="100%"
width="100%">
</iframe>
</div>
To be fair, this embed worked exactly one time, a very long time ago, and hasn’t worked since. Behavior is the same in Chrome, Firefox, and Brave, both on desktop and on mobile: what happens is that if you try typing anything in the comment box, a window appears that takes you to the twitch.tv homepage.
Has this type of embed been deprecated? If so, why is it shown in all the online documentation?
Thank you, random stranger, for your time and consideration…!
Update: I may have solved…part of it. In Firefox, turning off add-ons like Privacy Badger for Twitch’s resource servers made it possible for me to use the chat window as expected. I’m not sure what settings are required in Chrome and Brave to mimic this behavior, but I expect it to be along those lines. That being said, it’s not going to work to ask users to modify browser settings; most are non-technical (at best).