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

rn-ali-vod-upload

v0.1.2

Published

aliyun vod upload

Readme

rn-ali-vod-upload

Getting started

$ npm install rn-ali-vod-upload --save

Mostly automatic installation

$ react-native link rn-ali-vod-upload

Manual installation

iOS

//参考工程配置:https://help.aliyun.com/document_detail/100448.html

  1. 添加以下系统依赖库。

    • AVFoundation.framework
    • CoreMedia.framework
    • SystemConfiguration.framework
    • MobileCoreServices.framework
    • libresolv.9.tbd
  2. 在主工程的 Build PhasesLink Binary With Libraries 中 「+」通过 「Add Other」的 「Add Files」加入 /node_modules/rn-ali-vod-upload/ios/AliyunSDK 下的两个 .framework 文件

  3. 在主工程的 Build Settings 下配置 Framework Search Paths 加入 $(SRCROOT)/../node_modules/rn-ali-vod-upload/ios/AliyunSDK

Android

// 参考工程配置:https://help.aliyun.com/document_detail/100490.html

  1. android/build.gradleallprojectsrepositories 中加入

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
        maven { url "https://maven.aliyun.com/nexus/content/repositories/releases" }
    }
}
  1. android/app/build.gradledependencies 加入
dependencies {
    implementation project(':rn-ali-vod-upload')
    implementation 'com.aliyun.dpa:oss-android-sdk:2.9.5'

}
  1. 配置 AndroidManifest.xml 加入以下权限:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />

Usage

uploadVideo 上传视频

import RNAliVodUpload from 'rn-ali-vod-upload';

const emitters = [];

const arrayLen = emitters.push(
  RNAliVodUploadEmitter.addListener('OnUploadProgress', (result) => {
    console.log(result);
  })
);

const emitterIdx = arrayLen - 1;

const vodConfig = {
  title: 'test',
  desc: ' ',
  cateId: 1,
  tags: ' ',
  templateGroupId: 'test',
  isShowWaterMark: true,
};

RNAliVodUpload.uploadVideo({
  path: filePath,
  ...vodConfig,
  expriedTime,
  accessKeyId,
  accessKeySecret,
  securityToken,
})
  .then((res) => {
    removeEmitter(emitters, emitterIdx);
    return res.videoId;
  })
  .catch((err) => {
    removeEmitter(emitters, emitterIdx);
    if (err.code === '401') {
    }
    console.log('上传err:', err);
    opts.onError(err);
  });

function removeEmitter(emitters, emitterIdx) {
  const removedEmitter = emitters.splice(emitterIdx, 1)[0];
  removedEmitter.remove();
}

getFirstFrameImage 获取第一帧图片

RNAliVodUpload.getFirstFrameImage(video.path.replace('file://', ''))
  .then((res) => {
    console.log('success', res);
    alert(res);
  })
  .catch((err) => {
    console.log('err', err.code, err.message);
  });

常见问题

...