WQcloud Video
腾讯云视频Node.js SDK
Table of Contents generated with DocToc
安装和使用
国际惯例:
npm install wqcloud-video --save# 或 yarn add wqcloud-video
公共参数:
var options = appid: '' appkey: '';
参数说明
这是一个示例传入的参数:
t: 10 // 会自动根据当前时间向后推10s, 如果不传,默认值为当前时间 channel_id: 'test' // 会根据值的类型进行判断,变成 Param.s.channel_id status: 0 // 会根据值的类型进行判断,变成 Param.n.status
推流生成器
const getPushUrl = ; console;// trmp://8888.livepush.myqcloud.com/live/8888_test?bizid=8888&txTime=5943874C&txSecret=ffc8cc832447ea92335df69970e6ce25
直播观看地址生成器
const getPlayUrl = ; console;//{ rtmp: 'rtmp://8888.liveplay.myqcloud.com/live/8888_test',// flv: 'http://8888.liveplay.myqcloud.com/live/8888_test.flv',// m3u8: 'http://8888.liveplay.myqcloud.com/live/8888_test.m3u8' }
操作类/查询类接口
设置直播状态示例:
// API调用地址为: http://fcgi.video.qcloud.com/common_accessconst fcgi = ; const qcloud = ; qcloud;
查询直播状态示例:
const fcgi = ; const qcloud = ; qcloud;
统计类接口
查询指定直播流的推流和播放信息示例:
// API调用地址为: http://statcgi.video.qcloud.com/common_accessconst statcgi = ; const qcloud = ; qcloud;
事件消息通知
TODO: 下一个版本进行完善
相关文档
- vod(点播): https://www.qcloud.com/document/product/266/8757
- lvb(直播): https://www.qcloud.com/document/product/267/5956
- 您可能还会用到
WQcloud
完整SDK: https://github.com/willin/wqcloud
License
MIT
通过支付宝捐赠: