How to mitigate huge performance impact of a twitch embed?

document.addEventListener('DOMContentLoaded', (event) => {
  var options = {
    width: 800,
    height: 500,
    channel: "monstercat",
    allowfullscreen: false,
    layout: 'video-with-chat'
  };
  var player = new Twitch.Embed("test", options);
});

Is one possible method, or the JS is before the </body> which should be suitably late.

1 Like