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

xchat-h5-player

v1.0.2

Published

移动端播放器

Downloads

5

Readme

xchat-h5-player 使用说明

移动端H5直播播放器,支持hls和flv的自动识别及flv流支持的情况下优先播放flv流,支持hls流质量检测以及在质量不佳的情况下自动切换流,解决微信、QQ浏览器下视频播放自动全屏video层级处于最高的问题,能开启沉浸式渲染同层播放

安装方法

npm install xchat-h5-player -S

使用说明

<script src="flv.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/XchatH5Player.js"></script>

在模块管理器使用

	//列如在Vue main.js
	import flv from 'flv.js'
	window.flvjs = flv
	//在组件中
  import XchatH5Player from 'xchat-h5-player'
	new XchatH5Player(options)

API

Options

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | ---- | ---- | ---- | ------ | ------ | | el | 播放器容器ID | String | 必选参数 | | | watchServer | 播放数组 | Array | 必选参数 | ([{flv:'....',hls:'....'}]) | | mode | 播放模式 | Number | 0或1(0为铺满整窗口的播放模式 1为在整个文档最上方的局部播放模式) | 0(默认) | | openHls | 是否强制开启HLS播放 | Boolean | true或false | false(默认) | | autoPlay | 是否自动播放(注意只能在x5内核的浏览器内该播放器才会自动播放) | Boolean | true或false| true(默认) | | sendTime | 循环检测流质量的时间间隔,设为0时,将不会开启切换功能同时切换流按钮将不展示 | Number | 一个整数 | 10(默认)|