Skip to content

Instantly share code, notes, and snippets.

@anacampesan
Created May 14, 2018 13:42
Show Gist options
  • Save anacampesan/e5645ddafc217b3f7285fa568eae970f to your computer and use it in GitHub Desktop.
Save anacampesan/e5645ddafc217b3f7285fa568eae970f to your computer and use it in GitHub Desktop.
<html>
<body>
<!-- Add a placeholder for the Twitch embed -->
<div id="twitch-embed"></div>
<!-- Load the Twitch embed script -->
<script src="https://embed.twitch.tv/embed/v1.js"></script>
<!-- Create a Twitch.Embed object that will render within the "twitch-embed" root element. -->
<script type="text/javascript">
new Twitch.Embed("twitch-embed", {
width: 854,
height: 480,
video: "260276165",
controls: false
});
(function speed() {
if (document.getElementsByTagName('video')[0].playbackRate != null) {
console.log('running');
} else {
console.log('running');
setTimeout(speed, 1);
}
})();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment