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-vue

v4.0.0

Published

Sentinel Video Player Vue 3 inline 组件:直连 player-core 的高性能接入方式

Readme

@sentinel-lab/video-vue

Sentinel Video Player 的 Vue 3 inline 接入方式:直连播放内核,不走 iframe,首帧最快。

什么时候用它

| 你的场景 | 用哪个包 | |---|---| | Vue 项目,要最快首帧 / 最低开销 | 本包(inline) | | Vue 项目,要沙箱隔离、或宿主是 SSR 框架 | @sentinel-lab/video-vue-frame(iframe) | | React 项目 | @sentinel-lab/video-react / @sentinel-lab/video-react-frame | | CMS / Markdown 里嵌一段 | 静态 iframe URL(见 USER-GUIDE) |

inline 把播放内核打进你的产物(约 300KB gz,含 xgplayer + hls.js + flv.js); iframe 薄壳只有约 22KB,内核在 iframe 里。这是两者唯一的实质取舍。

安装

pnpm add @sentinel-lab/video-vue

peer:vue >= 3.5

用法

<script setup lang="ts">
import { ref } from 'vue'
import { VideoPlayer, type PlayerError, type VideoPlayerExpose } from '@sentinel-lab/video-vue'
// ⚠️ 必须引一次:xgplayer 的控件/布局样式。少了它播放器能播,但控件是散的
import '@sentinel-lab/video-vue/style.css'

const player = ref<VideoPlayerExpose>()

function onReady(payload: { duration: number }) {
  console.log('时长', payload.duration)
}

function onError(err: PlayerError) {
  console.error(err.code, err.message)
}
</script>

<template>
  <div style="width: 100%; aspect-ratio: 16 / 9">
    <VideoPlayer
      ref="player"
      source="https://cdn.example.com/a.m3u8"
      muted
      playsinline
      @ready="onReady"
      @error="onError"
    />
  </div>
</template>

命令走 template ref:

await player.value?.play()
player.value?.seek(30)
player.value?.setPlaybackRate(1.5)

不需要vite.config.ts 里配 isCustomElement —— 覆盖层是运行时渲染的, Vue 编译器不参与。

边界

  • 只做技术:播放、事件、命令、容错。团队品牌 UI 归业务封装层(ADR-021)
  • 不发业务 HTTP 请求;认证只接受签名 URL(ADR-022)
  • 不做 DASH / PlayReady(ADR-014)

相关

  • 使用手册:docs/USER-GUIDE.md
  • 为什么现在有 Vue inline:docs/adr/ADR-052-vue-inline-open-the-door.md