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

vue-multi-split-player

v1.0.0-alpha.6

Published

A custom video player component

Readme

vue-multi-split-player

npm version NPM Unpacked Size vue version GitHub last commit npm download GitHub License

NPM

一款垃圾自适应多分屏播放器,支持主流直播、点播。

https://zhangyongwnag.github.io/vue-multi-split-player/example/dist/index.html

Features

    • [x] 基础多分屏播放,最高5分屏
    • [x] 支持直播websocket、webrtc、m3u8、flv,点播m3u8、mp4
    • [ ] 支持自定义弹幕
    • [x] 支持OCR
    • [x] 单机局部放大,双击全屏
    • [x] 支持添加自定义水印,并且防篡改
    • [x] 提供多分屏、画中画和电影模式。
    • [x] 支持多清晰度切换
    • [x] 支持自定义通道选择,自定义声音
    • [x] 兼容浏览器播放声音策略(媒体参与度)
    • [x] 支持mark点

Installation

# Using pnpm
pnpm install vue-multi-split-player -S

# Using yarn
yarn add vue-multi-split-player

# Using npm
npm install vue-multi-split-player --save

Usage

Global Registration

// main.js
import Vue from 'vue';
import * as VueMultiSplitPlayer from "vue-multi-split-player";
import 'vue-multi-split-player/dist/style.css'; // Import styles

Vue.use(VueMultiSplitPlayer);

Local Registration for Vue2.7

// In your component
import { VueMultiSplitPlayer } from 'vue-multi-split-player';
import 'vue-multi-split-player/dist/style.css'; // Import styles

// for vue2.6-
export default {
  components: {
    VueMultiSplitPlayer
  }
  // ...
}

Component Usage

<template>
  <div class="container">
    <VueMultiSplitPlayer
      mode="vod"
      :playStreams="playStreams"
      :noteList="[]"
      :muted="false"
      :autoplay="true"
      classroomType="" 
      :isEnableDanmu="false"
      :isEnableControl="false"
      :isEnableOcr="false"
      :isEnableToolbar="true"
      :isEnableWaterMarker="false"
      :width="1920"
      :height="1080"
    />
  </div>
</template>

<script setup>
import { reactive } from "vue"

let playStreams = reactive({
  '高清': {
    source: [
      {
        url: 'http://example.com/path/to/high-quality.mp4',
        name: '高清版本'
      }
    ]
  },
  '标清': {
    source: [
      {
        url: 'http://example.com/path/to/standard-quality.mp4',
        name: '标清版本'
      }
    ]
  },
})
</script>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | mode | String | 'live' | 播放类型: live:直播,vod:点播,websocket or webrtc | | playStreams | Object | {} | 要播放的资源,例如:{ '高清': { source: { [ name: '', url: '', id: '' ] } } } | | noteList | Array | [] | mark点,例如:[{ startSecond: 0, imgUrl: '', content: '' }] | | muted | Boolean | false | 是否静音播放,如果静音播放,浏览器播放策略不会生效(媒体参与度) | | autoplay | Boolean | true | 是否自动播放 | | classroomType | Number|String | '' | 教室类型 | | isEnableDanmu | Boolean | false | 是否启用弹幕 | | width | Number | 0 | 播放器宽度,如果不填,则默认取宽度100% | | height | Number | 0 | 播放器高度,如果不填,则根据宽度16/9 (aspect-ratio: 16 / 9) | | isEnableControl | Boolean | false | 是否启用遥控,只在mode为websocket时生效 | | isEnableOcr | Boolean | false | 是否启用OCR | | isEnableToolbar | Boolean | true | 是否启用底部菜单栏 | | isEnableWaterMarker | Boolean | false | 是否启用水印 | | waterMarkerContent | String | 'vue-multi-split-player' | 水印内容 |

Methods

您可以使用 ref 访问播放器实例并调用以下方法:

  • current(): 获取当前播放时间(秒)
  • duration(): 获取视频总时长(秒)
  • _register_emits(emit, value): 注册播放器事件回调
    • 参数: emit - 包含事件类型和回调函数的对象
    • 参数: value - 要设置的值
    • 支持的事件类型:
      • play: 播放视频
      • pause: 暂停视频
      • replay: 重新播放视频(从开始位置)
      • destroy: 销毁播放器实例
      • muted: 设置静音状态
      • rate: 设置播放速度
      • current: 设置播放进度
      • volume: 设置音量0-100

Events

  • ready: 播放器准备就绪
  • timeupdate: 当前播放时间更新
  • startControl: mode为websocket时开始控制
  • stopControl: mode为websocket时停止控制
  • updateChannel: 通道数量更新
  • finished: 播放完毕

Slot

  • -[x] ocr: 自定义ocr作用域插槽,用于自定义ocr识别逻辑
    • 参数: data - 包含ocr识别结果的对象
    • 示例:
      <template>
        <VueMultiSplitPlayer>
          <template #ocr="data">
            <div>
              <p>OCR识别数据: {{ data }}</p>
            </div>
          </template>
        </VueMultiSplitPlayer>
      </template>
  • -[ ] 弹幕: 自定义弹幕作用域插槽,用于自定义弹幕逻辑
    • 参数: data - 包含弹幕数据的对象
    • 示例:
      <template>
        <VueMultiSplitPlayer>
          <template #danmu="data">
          </template>
        </VueMultiSplitPlayer>
      </template>

License

MIT © 2025 yw.z