Skip to content

Instantly share code, notes, and snippets.

@ch33zer
Last active July 6, 2016 06:48
Show Gist options
  • Save ch33zer/54b01ae017626534c575375ebfb66fce to your computer and use it in GitHub Desktop.
Save ch33zer/54b01ae017626534c575375ebfb66fce to your computer and use it in GitHub Desktop.
Twitch Chromecast Bookmarklet

Twitch Chromecast Bookmarklet

Twitch chromecast support is broken in the default flash player and has been for a long time. Since twitch was bought by Amazon they probably don't won't fix it. However, the HTML5 chromecast support does still work. When you use this bookmarklet, the stream will pause and a new twitch tab will open up where Chromecast support works. Just go to that tab and click the chromecast button.

Installation

  • Option 1: If you trust this page, you can just drag this link to your bookmark bar: Twitch Chromecast
  • Option 2: Generate the link yourself. Run this code (the console works fine) and use the resulting link in a bookmarklet:
    var bookmarklet_js = "var channel_div = $("#broadcast-meta > div > div.channel > a.channel-name");
    

if (channel_div) { var channel_name = channel_div.text(); var stream_only_page= "http://player.twitch.tv/?channel=" + channel_name + "&html5=1"; window.open(stream_only_page); $(".js-control-playpause-button").click() } else { alert("Couldn't find channel name div. Are you on a twitch stream page like twitch.tv/STREAMNAME?"); } ```

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