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

rqplayer-multi-live

v1.1.0

Published

rqplayer multi-live player (mpegts.js built-in)

Readme

rqplayer-multi-live

多路直播播放器。内置 mpegts.js,播放 HTTP-FLV / MPEG-TS。

点播请使用兄弟包 rqplayer-multi-vod。

安装与构建

npm install
npm run build
npm run dev          # fixtures/rqplayer
npm test

UMD 产物:dist/index.min.js(CSS 已内联),全局名 LivePlayer。

最小用法

import Player from 'rqplayer-multi-live'

const player = new Player({
  id: 'player',
  url: 'https://example.com/live.flv',
  autoplay: true, // 默认静音起播
  width: 960,
  height: 540,
  themeType: 1 // 1橙 | 2红 | 3蓝
})

UMD:

<script src="./dist/index.min.js"></script>
<script>
  var player = new LivePlayer({ id: 'player', url: '…flv', autoplay: true })
</script>

多路直播

const streams = [
  [
    {
      name: '三路高清',
      url: ['…/a.flv', '…/b.flv', '…/c.flv']
    },
    {
      name: '两路高清',
      url: ['…/a.flv', '…/b.flv']
    }
  ]
]

const player = new Player({
  id: 'player',
  url: streams[0][0],
  autoplay: true
})
player.emit('resourceReady', streams)
  • 布局模式 0–9(5 路上2下3 / 6 路上3下3);按真实比例装箱;拖拽换位、双击放大
  • 默认 autoplay: true + 静音,用户手势 / UI / 音量后开声
  • 卡顿检测与自动重连;可选长时间运行重建

常用直播能力(opt-in)

| 配置 | 说明 | |------|------| | isH323: true | 最后一路为辅流;player.showFuliu(0\|1) | | noSignal | 默认 true:无信号占位(也可写在 multichannel);同伴等待见 noSignalTimeoutMs。设 false 关闭 | | noSignalTimeoutMs | 默认 3000:同伴等待毫秒数,超时后失败路出占位并播放已成功路 | | liveSubtitle: true \| {} | 推送字幕;player.sendLiveSub(text) | | texttrack | 多轨 VTT(opt-in) | | danmu / watermark / caption | 弹幕 / 水印 / 台标 | | themeType: 1\|2\|3 | 主题色 | | multichannel: { stallTimeout, reconnect, … } | 健康度 / 同步参数 |

目录

| 路径 | 说明 | |------|------| | src/ | 核心源码 | | src/plugins/ | 内置插件(multiChannel、mpegts、liveSubtitle 等) | | fixtures/rqplayer/ | 本地演示 | | scripts/ | 构建 CLI(libd) |

与点播的差异(摘要)

| | 直播 | 点播 | |--|------|------| | 传输 | mpegts.js FLV/TS | native MP4 | | 流结构 | { name, url: string[] } | { channel:[{ ID, type, files[] }] } | | 字幕 | liveSubtitle + sendLiveSub | SRT subtitle | | 会议 | isH323 + showFuliu | endtime 垫片 | | 健康度 | stall / reconnect | 等齐闸门 |