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

@whale-labs/whale-web-player

v1.0.8

Published

Player whale-web-player

Downloads

12

Readme

whale-web-player, 帷幄音视频 player 组件, 主要提供实时视频播放等功能。

Player API

| 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | company_id | 公司id,用于初始化player(必填参数) | string | 无 | | id | 设备相关的唯一id,也可理解为设备的sn号 (必填参数) | string | 无 | | name | 支持左上角设备信息的填入(非必填参数) | string | undefined | height | 用于player展示高度,展示的为px | number | 默认为100%,根据外围容器来定 | | width | 用于player展示宽度,展示的为px | number | 默认为100%,根据外围容器来定 | | baseURI | 用于请求openapi的域名host | string | https://open-api.test.meetwhale.com | | ref | player相关的ref,用于取whale-player中的一些视频操作方法,比如seek、play、pause、changeResolution、refresh、destroyPlayer 等方法, seek方法传入为时间戳,毫秒值 | ref | useRef返回值 | | progressColor | 用于传入进度条颜色 | color string | 'D2EAFF' | | closeFn | player 右上角关闭 icon, 默认为空,不展示关闭按钮,有方法传入则展示 | func | undefined | | seekTime | 用于初始化开始播放的时间, | number(时间戳、毫秒) | 默认值为空或者为0表示为直播 | leftTime | 用于x分钟断流时间 | number(分钟) | 默认值为空,不进行断流操作 | tipLeftTime | 用于断流时间到了之后,提示多少秒结束断流 | number(秒) | 默认值为60秒 | autoPlay | 用于初始化时候,是否自动播放 | boolean | 默认值为true | backgroundColor | 用于播放器container背景色 | string | 默认值为 #000 | OSSConfig | 用于截图时上传使用的ALI-OSS配置 | Options | 默认值为空Object, 截图会warning"请配置OSS参数"

playerInstance

| 名称 | 说明 | 类型 | | --- | --- | --- | | seek | 用于操作设备播放的时间,传入时间戳(毫秒),返回直播,传入time为0即可 。 (传入type progress,为当天内时间毫秒,默认不需要)| seek(time: string, type?: 'progress' | undefined) => void | | play | 用于操作设备播放操作,无需传入参数 | () => void | | pause | 用于操作设备暂停操作,无需传入参数 | () => void | | changeResolution | 用于切换清晰度 | (quality: StreamQuality) => void | | refresh | 用于刷新播放器,刷新会重新请求、销毁播放器并重新拉起播放器 | () => void | | destoryPlayer | 用于销毁播放器 | () => void |

其他

| 名称 | 说明 | 类型 | | ------------- | ---------------------------------------- | ---- | | StreamQuality | 操作设备清晰度 enum, 1 为标清、 2 为高清 | enum |