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 🙏

© 2024 – Pkg Stats / Ryan Hefner

wcs-player

v1.1.0

Published

wcs base player

Downloads

4

Readme

wcs-player

wcs的基础播放库

flv player

methods

playVideo(url)

url是需要播放的视频地址,此方法是一个异步方法,返回promise

closeVideo

关闭视频

playMedia

播放视频(用于在暂停状态时播放视频)

pauseMedia

暂停视频(用于在暂停状态时播放视频)

capture(downloadFlag)

异步方法,返回promise。抓取当前视频的图片,downloadFlag为true表示下载图片,为false时,方法会返回promis.resolve(base64),base64为图片的base64

events

video-status-change

播放器状态改变,取值为 /utils/video.js的VideoStatus对象里面的值

const VideoStatus = {
  vConnect: 0, // 开始连接
  vStart: 1, // 开始播放
  vPlay: 2, // 正在播放
  vPause: 3, // 暂停
  vStop: 4 // 停止
}

video-error

播放器播放失败返回错误信息

statics-info-change

视频信息改变,包括{speed,videoWidth,videoHeight}

h264 player

methods

createPlayer

初始化播放器,返回promise

handleBuffer(buffer, timestamp, mediaType)

处理数据流,buffer是音视频流arraybuffer,timestamp是流的时间,mediaType是当前流是视频还是音频,取值(video,audio)

closeVideo

同flv player相同

playMedia

同flv player相同

pauseMedia

同flv player相同

capture(downloadFlag)

同flv player相同

events

video-loadeddata

视频已经渲染出来第一帧的回调

video-status-change

同flv player相同

video-error

同flv player相同

statics-info-change

同flv player相同

h265 player

methods

createPlayer

同h264 player相同

handleBuffer(buffer, timestamp, mediaType)

同h264 player相同

closeVideo

同h264 player相同

playMedia

同h264 player相同

pauseMedia

同h264 player相同

capture(downloadFlag)

同h264 player相同

events

video-status-change

同h264 player相同

video-error

同h264 player相同

statics-info-change

同h264 player相同