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

ht-h5player-vue3

v1.0.0

Published

H5 video player component for Vue.js

Readme

HT-H5Player Vue3

基于 Vue3 的视频监控播放器组件,支持多路视频流播放、分屏显示、全屏切换等功能。

特性

  • 🎥 支持多路视频流同时播放
  • 📱 支持分屏显示(1-4路)
  • 🔄 支持实时预览和回放
  • 📐 响应式布局,支持移动端适配
  • 🖥️ 支持全屏切换
  • 🎯 支持对讲功能
  • 🎨 基于 Ant Design Vue 3.x 的 UI 组件

安装

# npm
npm install ht-h5player-vue3

# yarn
yarn add ht-h5player-vue3

# pnpm
pnpm add ht-h5player-vue3

使用

全局注册

import { createApp } from 'vue'
import App from './App.vue'
import H5playerPlugin from 'ht-h5player-vue3'

const app = createApp(App)
app.use(H5playerPlugin)
app.mount('#app')

局部引入

<template>
  <h5-player 
    :config="playerConfig" 
    @onSuccess="handleSuccess" 
    @on-error="handleError"
    @on-talk-end="handleTalkEnd"
  ></h5-player>
</template>

<script setup>
import { ref } from 'vue'
import { H5Player } from 'ht-h5player-vue3'

const playerConfig = ref({
  maxSplit: 4,        // 最大分屏数
  defaultSplitNum: 1, // 默认分屏数
  splitNum: 1         // 当前分屏数
})

const handleSuccess = (player) => {
  console.log('播放器初始化成功', player)
}

const handleError = (error) => {
  console.error('播放器错误', error)
}

const handleTalkEnd = () => {
  console.log('对讲结束')
}
</script>

Props

| 参数 | 说明 | 类型 | 默认值 | |------|------|------|--------| | config | 播放器配置项 | Object | {} |

config 配置项

| 参数 | 说明 | 类型 | 默认值 | |------|------|------|--------| | maxSplit | 最大分屏数 | Number | 4 | | defaultSplitNum | 默认分屏数 | Number | 1 | | splitNum | 当前分屏数 | Number | 1 |

Events

| 事件名 | 说明 | 回调参数 | |--------|------|----------| | onSuccess | 播放器初始化成功时触发 | player: 播放器实例 | | on-error | 播放器发生错误时触发 | error: 错误信息 | | on-talk-end | 对讲结束时触发 | - |

Methods

通过 ref 可以调用以下方法:

| 方法名 | 说明 | 参数 | |--------|------|------| | stopAllPlay | 停止所有窗口播放 | - | | handleFullscreen | 切换全屏显示 | - | | stopTalk | 停止对讲 | - |

注意事项

  1. 确保项目中已安装 ant-design-vue 依赖
  2. 播放器需要正确的视频流地址才能播放
  3. 建议在组件销毁时调用 stopAllPlay 方法停止播放
  4. 移动端适配已内置,无需额外配置

开发环境

  • Vue 3.3.0+
  • Ant Design Vue 3.2.20+
  • Node.js 14.0.0+

许可证

ISC