Skip to content

Instantly share code, notes, and snippets.

@magicguitarist

magicguitarist/README.md

Last active Aug 25, 2018
Embed
What would you like to do?
A Dashing widget to add live twitch streams do your dashboard

Description

A Dashing widget to add live twitch streams to your dashboard.

Note that this is not really a productive widget (unless you are a streamer, I suppose). Our's is in the break room with weather and news widgets.

Usage

Make a folder called 'twitch' in your widgets directory. Add twitch.html and twitch.coffee to the twitch folder.

Add the widget HTML to your dashboard

    <li data-row="1" data-col="1" data-sizex="3" data-sizey="2">
        <div data-id="twitch" data-view="Twitch"></div>
    </li>

Use the following to switch channels:

curl -d '{ "auth_token": "YOUR_AUTH_TOKEN", "channel": "CHANNELNAME" }' \http://host:3030/widgets/twitch

if you have curl for windows in your path, you can use the batch file to make it easy!

@echo off
echo Enter Channel Name
setlocal
set /p channel=
curl -d {"""auth_token""":"""YOUR_AUTH_TOKEN""","""channel""":"""%channel%"""} http://host:3030/widgets/twitch
class Dashing.Twitch extends Dashing.Widget
<object type="application/x-shockwave-flash" height="700" width="990" id="live_embed_player_flash" data-bind-data="channel | prepend 'http://www.twitch.tv/widgets/live_embed_player.swf?start_volume=50&amp;channel='"></object>
@quedayone

This comment has been minimized.

Copy link

@quedayone quedayone commented May 24, 2015

Sweet! Any way to mute the audio?

@magicguitarist

This comment has been minimized.

Copy link
Owner Author

@magicguitarist magicguitarist commented Sep 2, 2015

Sorry for the slooow reply. Yes, if you modify the twitch.html. I've added the code in, and you should be able to modify to match pretty easily if you would rather not re-install. Volume goes from 0-100

@BritneyMuller

This comment has been minimized.

Copy link

@BritneyMuller BritneyMuller commented Mar 11, 2016

Could I use this to pull in top twitch game / player data?

@stigert

This comment has been minimized.

Copy link

@stigert stigert commented Aug 25, 2018

where do I enter the twich channel?

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