Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

twitch-get-stream

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitch-get-stream

Gets the m3u8 direct stream URLs of a live stream on twitch.tv.

latest
Source
npmnpm
Version
0.6.0
Version published
Maintainers
1
Created
Source

node-twitch-get-stream

Gets the m3u8 direct stream URLs of a live stream on twitch.tv.

NOTE: v0.6.0 breaking change - no longer needs client ID, as only one works as discussed in #9.

Usage

npm install --save twitch-get-stream

var twitchStreams = require('twitch-get-stream')
...
twitchStreams.get('channel')
    .then(function(streams) {
        ...
    });

The output will be as an array of objects, example:

[
  {
    quality: 'Source',
    resolution: '1280x720',
    url: 'long_twitch_hls_url_here'
  }, {...}
]

Other uses

twitchStream.raw('channel');
twitchStream.rawParsed('channel');

Similar to above, however .raw is used for getting the raw m3u8 data as a string, and .rawParsed is used to get the raw data, parsed through the m3u8 lib into an object.

Upgrading Notes

  • 0.4.1 to 0.5.0 - .nodeify() support has been removed in favor of just using the native Promise over the npm package; thus, you cannot use callbacks anymore. If you really need callback support, look into some library that can change it back for you. The superagent library has also been removed, replaced with axios. This change should not affect external code interfacing the library.

Other

If theres anything else you want with this module, do tell me but I just put together this module for another project I was working on. Feel free to issue a pull request if you have any code changes you want to contribute yourself.

License

This project is licensed under the terms of the MIT license.

Keywords

twitch

FAQs

Package last updated on 11 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts