So the last couple days I tried to fix my problem, but it still doesn’t work.
Changes I made:
- enable ssl on node red
- use JS to embed
- a lot of other little things (I think irrelevant)
So to clarify the situation, I use twitch-embeding on a website running with Node-RED on my pi 4 (only accessible through my local network), the ip I use to reach it is https://pi:1880/stream
I use a self-signed ssl certificate (chrome says it is invalid, likely because it is self-signed)
Here is my code:
<script src= "https://player.twitch.tv/js/embed/v1.js"></script>
<div id="stream"></div>
<script type="text/javascript">
var options = {
width: 854,
height: 480,
channel: "zinus",
};
var player = new Twitch.Player("stream", options);
player.setVolume(0.5);
</script>
<iframe frameborder="0"
scrolling="no"
id="chat_embed"
src="https://www.twitch.tv/embed/hebo/zinus?parent=pi"
height="500"
width="350">
</iframe>
So on both the chant and the stream I get the message player.twitch.tv hat die Verbindung abgelehnt.,
in English maybe something like player.twitch.tv refused to connect.