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

@sentinel-lab/video-react-frame

v4.0.0

Published

Sentinel Video Player React iframe 组件:隔离沙箱接入,不引入播放内核

Readme

@sentinel-lab/video-react-frame

Sentinel Video Player 的 React iframe 消费面(L7)。播放器跑在独立 iframe 里,通过 frame-core 收发契约消息。

对外只有一个组件 <VideoPlayerFrame /> + 一个命令句柄。和 @sentinel-lab/video-vue-frame 行为对齐。

什么时候用它

| 场景 | 选这个包 | |:---|:---| | 要把播放器和宿主隔离(CSS 冲突、第三方内容、崩溃隔离) | ✅ 本包 | | 宿主页面样式复杂,不想被播放器影响 | ✅ 本包 | | 追求首帧速度、能接受同进程 | ❌ 用 @sentinel-lab/video-react(inline,首帧更快) | | 只能嵌 URL、跑不了 npm 包(CMS / Markdown) | ❌ 用 @sentinel-lab/video-embed-helper |

安装

pnpm add @sentinel-lab/video-react-frame

peer:react >=18react-dom >=18

用法

import { VideoPlayerFrame, type VideoPlayerFrameHandle } from '@sentinel-lab/video-react-frame'
import { useRef } from 'react'

function Player() {
  const ref = useRef<VideoPlayerFrameHandle>(null)

  return (
    <VideoPlayerFrame
      ref={ref}
      source="https://cdn.example.com/live/master.m3u8"
      autoplay
      muted
      onReady={({ duration, quality, subtitles }) => {}}
      onError={(err) => {}}
    />
  )
}

命令走句柄(经 iframe 通道异步下发):

await ref.current?.play()
ref.current?.seek(30)
await ref.current?.enterFullscreen()

私有化部署

iframe 默认指向官方 CDN。自建时用 origin 覆盖(ADR-023):

<VideoPlayerFrame origin="https://player.your-domain.com" version="v3" source={...} />

边界

  • 薄壳——本包不含播放逻辑,只负责建 iframe、握手、转发命令与事件。播放能力在 iframe 内的 embed-app
  • props 面和 @sentinel-lab/video-react 对齐,多出 origin / version 两个 iframe 专属项(cross-mode-parity 测试保障)
  • 不做团队品牌 UI(ADR-021);认证只支持签名 URL(ADR-022)
  • 业务代码通常不直接 import 本包,而是经团队封装层接入

相关

MIT