npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wqcloud-video

v1.0.1

Published

腾讯云视频Node.js SDK

Readme

WQcloud Video

腾讯云视频Node.js SDK

npm npm npm

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 } = require('wqcloud-video');

console.log(
  getPushUrl({
    bizid: 8888,
    streamid: 'test',
    key: 'aabbccdd001122333444', // 注意,这里是 推流防盗链Key
    expires: 3600
  })
);
// trmp://8888.livepush.myqcloud.com/live/8888_test?bizid=8888&txTime=5943874C&txSecret=ffc8cc832447ea92335df69970e6ce25

直播观看地址生成器

const { getPlayUrl } = require('wqcloud-video');

console.log(
  getPlayUrl({
    bizid: 8888,
    streamid: 'test'
  })
);
//{ 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_access
const { fcgi } = require('wqcloud-video');

const qcloud = fcgi({
  appid: '1234567890',
  appkey: 'aabbccddeeffgghhiijjkkmmnnooppqq' // 注意,这里是 API鉴权Key
});

qcloud.Live_Channel_SetStatus({
  channel_id: '8888_test',
  status: 1
}).then(console.log).catch(console.err);

查询直播状态示例:

const { fcgi } = require('wqcloud-video');

const qcloud = fcgi({
  appid: '1234567890',
  appkey: 'aabbccddeeffgghhiijjkkmmnnooppqq'
});

qcloud.Live_Channel_GetStatus({
  channel_id: '8888_test' 
}).then(console.log).catch(console.err);

统计类接口

查询指定直播流的推流和播放信息示例:

// API调用地址为: http://statcgi.video.qcloud.com/common_access
const { statcgi } = require('wqcloud-video');

const qcloud = statcgi({
  appid: '1234567890',
  appkey: 'aabbccddeeffgghhiijjkkmmnnooppqq'
});

qcloud.Get_LiveStat({
  stream_id: '8888_test'
}).then((data) => {
  console.log(JSON.stringify(data, null, 2));
}).catch(console.err);

事件消息通知

TODO: 下一个版本进行完善

相关文档

License

MIT

通过支付宝捐赠:

qr