Answers for "embed twitch"

0

embed twitch

<!-- to paste into your html website-->
    <div id="twitch-embed"></div>
    <script src="https://embed.twitch.tv/embed/v1.js"></script>
    <script type="text/javascript">
      var embed = new Twitch.Embed("twitch-embed", {
        width: 854,
        height: 480,
        channel: "monstercat",
        layout: "video",
        autoplay: false,
        parent: ["embed.example.com", "othersite.example.com"]
      });
      embed.addEventListener(Twitch.Embed.VIDEO_READY, () => {
        var player = embed.getPlayer();
        player.play();
      });
    </script>
Posted by: Guest on June-30-2021

Browse Popular Code Answers by Language