Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

witplayer

Latest version: v1.0.5

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: wit-ui
4 Versions

Scan summary

witplayer was last scanned on 27 Nov 2026 at version 1.0.5. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 4 versions, all published on 27 Nov 2026.
  • Findings: No rules fired in version 1.0.5.

Versions

4 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.5 LATEST 27 Nov 2026 No rules fired
1.0.4 27 Nov 2026 No rules fired
1.0.3 27 Nov 2026 No rules fired
0.0.0-stage 27 Nov 2026 Not shown

No rules fired in 1.0.5

Findings

Findings for v1.0.5. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.0.5; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

witplayer

轻量级视频播放器,支持 MP4、HLS/M3U8、直播流,完美适配移动端。

⚡ 支持 P2P 加速:免费公共 tracker 零成本开启,swarm 规模增长后可一行配置切换自建 tracker。

English Documentation | 在线演示

特性

  • 🎬 多格式支持:MP4、HLS/M3U8
  • 📡 直播支持:低延迟 HLS 直播流
  • ⚡ P2P 加速:基于 WebRTC 的视频加速,观看的人越多越快
    • 免费公共模式:内置公共 tracker,一行 p2p: true 开启,零成本节省带宽
    • 自建模式:swarm 规模增长后自建 tracker,p2pTrackers 一行配置切换
  • 📱 移动端适配:触摸交互流畅,响应式布局,移动端同样显示 P2P 加速徽标
  • 🎨 精美 UI:现代化界面设计,淡入淡出动画
  • 💬 弹幕功能:支持弹幕显示与发送
  • 🖼️ 封面图:支持视频封面图
  • 📋 右键菜单:复制视频地址、版本信息

安装

npm install witplayer

使用方式

方式一:NPM 引入
import witplayer from 'witplayer';

const player = new witplayer({
  container: '#player',
  src: 'https://example.com/video.m3u8',
  isM3u8: true
});
方式二:CDN / 直接引入
<!DOCTYPE html>
<html>
<head>
</head>
<body>
  <div id="player" style="width: 800px; height: 450px;"></div>

  <script src="https://www.wit-ui.com/witplayer/witplayer.js"></script>
  <script>
    const player = new witplayer({
      container: '#player',
      src: 'https://example.com/video.m3u8',
      isM3u8: true
    });
  </script>
</body>
</html>

配置选项

参数 类型 默认值 说明
container string \| Element - 播放器容器,必填
src string - 视频地址,必填
poster string '' 视频封面图
isM3u8 boolean false 是否为 M3U8 格式
isLive boolean false 是否为直播流
autoplay boolean false 自动播放
muted boolean false 静音
loop boolean false 循环播放
volume number 1 音量 (0-1)
controls boolean true 显示控制条
danmaku boolean false 开启弹幕
danmakuList array [] 预设弹幕列表
codec string '' 视频编码格式
p2p boolean false 开启 P2P 加速(仅 m3u8 生效)
p2pTrackers array [] 自建 tracker 列表,空则用内置公共 tracker
onP2pStats function - 每秒回调 P2P 加速统计

API 方法

const player = new witplayer({ ... });

player.play();              // 播放
player.pause();             // 暂停
player.stop();              // 停止(暂停并回到起点)
player.seek(30);            // 跳转到 30 秒
player.setVolume(0.5);      // 设置音量为 50%
player.sendDanmaku('弹幕内容', '#ff0000');  // 发送弹幕
player.destroy();           // 销毁播放器

P2P 加速

基于 P2P Media Loader(hlsjs-p2p-engine),观众之间通过 WebRTC 互相分发视频分片,观看的人越多加速效果越好。

快速开启(免费公共 tracker)
const player = new witplayer({
  container: '#player',
  src: 'video.m3u8',
  isM3u8: true,
  p2p: true,  // 开启 P2P 加速,播放器左上角显示 ⚡ P2P 徽标(加速占比 + 实时速度)
  onP2pStats: s => {
    // 每秒回调加速统计
    s.percent;       // P2P 分流占比(%)
    s.speed;         // P2P 下载速度(字节/秒,5 秒滑动平均)
    s.downloadSpeed; // 总下载速度(字节/秒)
    s.peers;         // 连接节点数
    s.p2pTotal;      // P2P 累计下载字节
    s.httpTotal;     // HTTP 累计下载字节
    s.uploadTotal;   // 上传字节
    s.rebuffers;     // 卡顿次数
  }
});
自建 tracker

默认使用内置公共 tracker,零配置即可运行。swarm 规模增长后,可自建 tracker 并通过 p2pTrackers 切换:

const player = new witplayer({
  container: '#player',
  src: 'video.m3u8',
  isM3u8: true,
  p2p: true,
  p2pTrackers: [
    'wss://your-tracker.example.com'
  ]
});
说明
  • P2P 仅对 m3u8(HLS)生效,mp4 直链自动忽略
  • 移动端支持:P2P 开启时自动走 hls.js 解码(需 MSE),不支持的极老设备自动回退原生播放
  • 互连三要素:同一视频地址 + 同一批 tracker + 观众同时在线;与页面域名/协议无关
免部署播放页

无需写代码,直接用链接调起播放页(默认开启 P2P 加速,自动识别 m3u8/mp4,自动播放):

http://b2b.wit-ui.com/?url=https://example.com/video.m3u8

追加 &p2p=0 可关闭加速。

弹幕功能

基本配置
const player = new witplayer({
  container: '#player',
  src: 'video.m3u8',
  isM3u8: true,
  danmaku: true,  // 开启弹幕功能,会显示弹幕按钮和弹幕显示区域
  danmakuList: [
    { id: 1, time: 1, text: '弹幕内容', color: '#fff' },
    { id: 2, time: 5, text: '另一条弹幕', color: '#ff5f56' }
  ]
});
弹幕按钮说明
  • 当设置 danmaku: true 时,播放器控制栏会显示弹幕按钮
  • 弹幕按钮有两种状态:
    • 开启状态:显示正常弹幕图标
    • 关闭状态:显示半透明弹幕图标并带斜线
  • 点击弹幕按钮可以切换弹幕的显示/隐藏
发送实时弹幕
// 发送实时弹幕
player.sendDanmaku('实时弹幕', '#007aff');
关闭弹幕功能

如果不希望显示弹幕按钮和弹幕功能,只需不设置 danmaku 参数或设置为 false:

const player = new witplayer({
  container: '#player',
  src: 'video.m3u8',
  isM3u8: true,
  danmaku: false  // 不显示弹幕按钮和弹幕功能
});

H.265 支持

const player = new witplayer({
  container: '#player',
  src: 'video.mp4',
  codec: 'video/mp4; codecs="hvc1"'  // H.265 编码
});

开发

# 安装依赖
npm install

# 启动开发服务器
npm run dev

# 构建生产版本
npm run build

发布到 NPM

# 登录 npm
npm login

# 发布
npm publish

浏览器支持

  • Chrome 60+
  • Firefox 55+
  • Safari 11+
  • Edge 79+

License

MIT

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm witplayer

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229