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

@rivmux/protocol

v1.0.3

Published

Protocol TypeScript contracts for Rivmux packages.

Readme

Rivmux Protocol

@rivmux/protocol 是 Rivmux 浏览器包之间共享的 TypeScript 契约包,集中定义配置、能力、事件、诊断、媒体状态和 Worker 消息类型。

使用边界

  • 该包只导出类型,不提供播放器或 Worker 运行时实现。
  • 普通应用应从 rivmux 导入用户需要的类型,不应直接依赖 Worker 协议或归一化配置。
  • @rivmux/protocol 独立发布是为了连接主包与 @rivmux/runtime-worker;其内部消息结构不属于应用兼容面。

契约域

| 契约域 | 代表类型 | 主要用途 | | ----------- | ------------------------------------------------------------------------------------ | -------------------------------------- | | 配置 | RivmuxPlayerOptions、各分组配置和 Normalized* 类型 | facade 输入与 Worker 初始化配置。 | | 能力 | RivmuxCapabilities、RuntimeCapabilities、DecodingCapabilities、SupportStatus | 描述运行环境与 codec 前置探测结果。 | | 事件与诊断 | PlayerEventMap、PlayerError、PlayerWarning、PlayerStats 和重连信息 | 统一主包对外事件及结构化诊断数据。 | | 媒体与播放 | MediaInfo、VideoElementState、PlaybackControlAction、PlaybackControlResult | 在主线程与 Worker 间传递媒体播放状态。 | | Worker 协议 | WorkerCommand、WorkerMessage | 定义生命周期、媒体和诊断消息联合。 |

维护约束

  • Worker 配置只在 init 命令中传入;当前没有运行期间动态更新选项的协议。
  • Worker 命令和消息的变更必须同时更新主包、Runtime Worker 和协议测试。
  • 被 rivmux 重新导出的用户类型发生变化时,必须同步主包 README 和公共 API 清单。
  • Stable、Experimental 与 Internal 边界由主包公开契约决定,不能仅根据本包是否导出某个类型判断。

构建与验证

在仓库根目录执行:

pnpm --filter @rivmux/protocol run test
pnpm --filter @rivmux/protocol run typecheck
pnpm --filter @rivmux/protocol run build

许可证

Apache License 2.0