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

wwd-cocos-video

v1.0.4

Published

Cocos Creator WawaduoVideo Native Plugin TypeScript 封装

Readme

wwd-cocos-video

Cocos Creator 项目的 WawaduoVideo Native Plugin TypeScript 封装,支持 RTMP / WebRTC 双协议播放。

仓库地址: https://gitee.com/PodWareHouse/wwd-cocos-video

需配合 WebRTCNavitePlugin 原生插件使用(Git Submodule 接入 native/plugins/wawaduo-video)。

安装

本地路径引用(推荐开发阶段)

在 Cocos 游戏项目的 package.json 中添加:

{
  "dependencies": {
    "wwd-cocos-video": "file:../wwd-cocos-video"
  }
}
cd /path/to/YourCocosGame
npm install

每次修改本库源码后,在本库目录执行:

npm run build

Git 依赖

{
  "dependencies": {
    "wwd-cocos-video": "git+https://gitee.com/PodWareHouse/wwd-cocos-video.git#v1.0.0"
  }
}

npm 安装(发布后)

npm install wwd-cocos-video

快速开始

import { createWawaduoVideo } from 'wwd-cocos-video';

// WebRTC(原生视图自动全屏)
const player = createWawaduoVideo({
    type: 1,
    rtc: 1,
    url: 'webrtc://your-server/live/stream',
    link: 'https://your-server/rtc/v1/play/',
    onFirstFrame: () => console.log('首帧渲染'),
    onError: () => console.log('播放错误'),
});

// RTMP
const rtmpPlayer = createWawaduoVideo({
    type: 1,
    rtc: 0,
    url: 'rtmp://your-server/live/stream',
    link: '',
});

player.stop();

开发与发布

npm install
npm run build
npm publish   # 需 npm login

发版时更新 package.jsonversion 并打 tag:

git tag -a v1.0.0 -m "首个稳定版本"
git push origin v1.0.0

依赖

  • Cocos Creator >= 3.6.3
  • iOS Native Plugin:WebRTCNavitePlugin(Submodule)
  • 仅 iOS 真机运行时 WawaduoVideoNative 原生类可用

相关仓库

| 仓库 | 用途 | |------|------| | WebRTCNavitePlugin | iOS Native Plugin(C++/Swift) | | wwd-cocos-video | TypeScript 封装(本仓库) | | WawaduoVideo | iOS 播放 SDK(CocoaPods) |