Skip to content

Instantly share code, notes, and snippets.

@derrod
Last active November 18, 2015 17:30
Show Gist options
  • Save derrod/518da2f42eeccc4e8315 to your computer and use it in GitHub Desktop.
Save derrod/518da2f42eeccc4e8315 to your computer and use it in GitHub Desktop.
Twitch full HTML5 player userscript
// ==UserScript==
// @name Twitch HTML5 player!
// @namespace http://twitter.com/der_rod
// @version 0.2
// @description Replaces the flash player with an iframe containing the new full HTML5 player
// @author Rodney
// @match http://www.twitch.tv/*
// @grant none
// ==/UserScript==
setTimeout(function() {
if (!window.Ember || !window.App || App.__container__.lookup("controller:application").get("currentRouteName") !== "channel.index") {
return;
}
$(".js-player").html($("<iframe>").attr("src", "http://player.twitch.tv/?html5&fullscreen=enabled&branding=false&showInfo=false&channel="+window.location.pathname.substr(1)).attr("width", "100%").attr("height", "100%").attr("scrolling", "no").attr("frameborder", 0).attr("allowfullscreen", ""));
}, 5000);
@derrod
Copy link
Author

derrod commented Aug 24, 2015

This replaces the twitch player with their actual HTML5 player. (Only on channel pages, VoDs and the frontpage are not supported)

Firefox is supported with version 42 and up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment