Giter Club home page Giter Club logo

twitch-stream-overlay's Introduction

Twitch Stream Overlay

This is a simple Twitch.tv stream overlay made with HTML and Javascript. It grabs your most recent follower and subscriber, and also the user who has gifted you the most bits.

The script was made using Twitch's new Helix API.

Setup

Grab a Client-ID from dev.twitch.tv/console/apps. Add it to line 1 of script.js, and then refresh the page.

const clientId = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';

Click the 'get auth' button on the page. Once the new page is finshed loading, you will be given an auth token in the address bar of your browser. Copy it, and add it to line 2 of script.js.

const authToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';

Next, you'll need your user/broadcaster ID. Add it to line 3 of script.js.

const channelId = '123456789';

Once you've added all of those variables, you can hide the 'get auth' button. Add style="display:none;" to line 11 of overlay.html.

<a style="display:none;" href="#">get oauth</a>

Lastly, you can change the amount of time you'd like to refresh your data on lines 68, 69, 70 of script.js. The default is 5 seconds (5000 milliseconds).

setInterval(getTopBits(), 5000);
setInterval(getRecentSub(), 5000);
setInterval(getRecentFollower(), 5000);

Finish

You're done setting up your Twitch stream overlay. The page should be displaying something like this:

finished display

Now, all that's left to do is customize the display to your liking using CSS.

twitch-stream-overlay's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.