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`
```javascript
var twitchStreams = require('twitch-get-stream')
...
twitchStreams.get('channel')
.then(function(streams) {
...
});
```
The output will be as an array of objects, example:
```javascript
[
{
quality: 'Source',
resolution: '1280x720',
url: 'long_twitch_hls_url_here'
}, {...}
]
```
### Other uses
```javascript
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.
没有合适的资源?快使用搜索试试~ 我知道了~
node-twitch-get-stream:获取twitch.tv上直播流的m3u8直接流URL。
共7个文件
js:2个
json:2个
license:1个
5星 · 超过95%的资源 需积分: 50 5 下载量 22 浏览量
2021-05-24
19:46:05
上传
评论
收藏 6KB ZIP 举报
温馨提示
节点抽动获取流 获取twitch.tv上实时流的m3u8直接流URL。 注意:v0.6.0重大更改-不再需要客户端ID,因为只有一个可以如#9中所述工作。 用法 npm install --save twitch-get-stream var twitchStreams = require ( 'twitch-get-stream' ) . . . twitchStreams . get ( 'channel' ) . then ( function ( streams ) { ... } ) ; 输出将作为对象数组,例如: [ { quality : 'Source' , resolution : '1280x720' , url : 'long_twitch_hls_url_here' } , { ... } ]
资源详情
资源评论
资源推荐
收起资源包目录
node-twitch-get-stream-master.zip (7个子文件)
node-twitch-get-stream-master
.gitignore 99B
package.json 733B
package-lock.json 2KB
LICENSE 1KB
index.js 4KB
examples
getChannelStreams.js 384B
README.md 2KB
共 7 条
- 1
子皮论
- 粉丝: 34
- 资源: 4590
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2