Twitch live stream error

I used twitch embed on the electron, but there is an error. Electron is the latest version.

<div class="panel">
<button onclick="window_close()">asdf</button>
        
<div id="twitch"></div>
</div>
<script src= "https://player.twitch.tv/js/embed/v1.js"></script>
<script type="text/javascript">
var options = {
    width: 400,
    height: 300,
    channel: "viichan6",
    parent: ["localhost"]
};
    var player = new Twitch.Player("twitch", options);
    player.setVolume(0.5);
</script>
    <iframe src="https://player.twitch.tv/?channel=gosegugosegu&parent=localhost"
        height="300"
        width="400"
        allowfullscreen>
    </iframe>

I used two type of codes but they are return this error.
image

You need to hijack/intercept the logic to force the parent to match the origin, or in this case remove the CSP via a kind of proxy call.

Here is a complete example

image
What should I do to prevent this screen from appearing?

Nothing

This cannot be prevented.

ok. thx

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