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 🙏

© 2024 – Pkg Stats / Ryan Hefner

vcloud-node-sdk

v1.0.5

Published

SDK with Node.js for VCloud163

Downloads

10

Readme

Node-SDK 说明

1 简介

Node-SDK是用于服务器端点播上传的软件开发工具包,提供简单、便捷的方法,方便用户开发上传视频或图片文件的功能。

2 功能特性

  1. 文件上传
  2. 断点续传

3 开发准备

3.1 环境配置

  1. 安装Node.js(0.11.x 以上版本);
  2. 执行npm i vcloud-node-sdk --save安装依赖包。

3.2 模块引入

let uploadSdk = require('vcloud-node-sdk');

4 使用说明

4.1 初始化

接入视频云点播,需要拥有一对有效的 AppKey 和 AppSecret 进行签名认证,可通过如下步骤获得:

  1. 开通视频云点播服务;
  2. 登陆视频云开发者平台,通过管理控制台->账户信息获取 AppKey 和 AppSecret。

在获取到 AppKey 和 AppSecret 之后,可按照如下方式进行初始化:

uploadSdk.init({
    appKey: '[App Key]',
    appSecret: '[App Secret]',
    trunkSize: 4 * 1024 * 1024,
    logLevel: 'INFO'
});

配置项说明:

  1. appKey:AppKey
  2. appSecret:AppSecret
  3. trunkSize:分片大小,最大4MB
  4. logLevel:日志级别,支持:'ALL', 'TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL', 'OFF'

4.2 文件上传

调用upload接口,传入文件路径即可完成文件上传,路径支持相对路径(相对于index.js文件)或绝对路径(推荐)。

示例:

uploadSdk.upload('E:/Hello.mp4');

4.3 断点续传

upload接口同时支持断点续传,只需传入同一文件的路径再次调用upload接口即可,SDK会自动查询断点并进行续传。

示例:

uploadSdk.upload('E:/Hello.mp4');

5 版本更新记录

v1.0.3

  1. Node-SDK初始版本,提供点播上传的基本功能,包括:文件上传、断点续传等。