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

v4.0.0

Published

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

Downloads

2,625

Readme

@sentinel-lab/video-vue-frame

Vue 3 iframe 薄壳(L7 · 消费面)。Sentinel Video Player 的 Vue 接入方式——

只做技术:创建 iframe 播放器、把 props 桥接成命令、把 iframe 事件桥接成 Vue emits。 不含任何团队品牌 UI(团队 UI 在业务封装层 examples/team-video-vue,ADR-021)。 不再是 Vue 唯一的接入方式 —— Vue inline 是 @sentinel-lab/video-vue(ADR-052)。 需要隔离 / 宿主是 SSR 框架的仍然走本包;要首帧最快、要摸 <video> 的用 inline。

用法

<script setup lang="ts">
import { ref } from 'vue'
import { VideoPlayerFrame } from '@sentinel-lab/video-vue-frame'
import type { PlayerError } from '@sentinel-lab/video-vue-frame'

const player = ref<InstanceType<typeof VideoPlayerFrame> | null>(null)

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

<template>
  <VideoPlayerFrame
    ref="player"
    :source="'https://cdn.example.com/live.m3u8'"
    preset="homepage-preview"
    @ready="() => console.log('ready')"
    @error="onError"
  />
</template>

命令通过 template ref 下发:await player.value?.play() / pause() / seek(t) / setMuted() / setVolume() / setPlaybackRate() / setQuality() / reconnect() / destroy(),以及同步读数 getCurrentTime() / getDuration() 和逃生舱 getPlayerHandle()

Props

source 必填,其余可选:autoplay muted loop controls interactive playsinline poster preset locale debug,加 URL 覆盖 origin / version (ADR-023,私有化 / 版本锁定 / 本地 dev 指向 embed-app dev server)。

布尔 prop 不传就是 undefined(不是 false),这样 preset 才能生效——比如 preset="homepage-preview" 会带上 muted: true,只要你没显式传 :muted="false" 覆盖它。

Emits

ready play pause ended timeUpdate volumeChange error autoplayBlocked reconnectStart reconnectSuccess reconnectFailed compatWarning(模板里用 kebab-case:@time-update 等)。

SSR(Nuxt)

组件自带客户端守卫:iframe 只在 onMounted 后创建,SSR 阶段渲染 #ssr-placeholder 插槽(默认黑底占位)。消费方无需再包 <ClientOnly>

边界

  • ❌ 不依赖 player-core / player-ui(那些在 iframe 内的 embed-app)
  • ❌ 不直接 import xgplayer(薄壳不接触播放技术)
  • ❌ 无团队品牌 UI

相关

  • ADR-052(Vue inline 开门,取代 ADR-002)· ADR-023(iframe URL 覆盖)
  • packages/frame-core(host 侧通信内核,本包的底座)
  • examples/team-video-vue(团队封装层,业务代码的真正入口)