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

xgplayer-mp-taro

v0.0.1-alpha.6

Published

xgplayer小程序播放器Taro版本。[Taro](https://taro.jd.com/)支持多平台小程序输出: 微信、字节、阿里、百度、QQ、京东。

Downloads

1

Readme

一、简介

xgplayer小程序播放器Taro版本。Taro支持多平台小程序输出: 微信、字节、阿里、百度、QQ、京东。

二、快速接入小程序播放器

只需两步:安装、引入、即可完成小程序播放器组件的使用。

安装

# 最新稳定版
$ npm install xgplayer-mp-taro

引入组件

import { XgVideo } from 'xgplayer-mp-taro'

使用组件

1. url 方式播放

<XgVideo
  className='xg-video'
  mode='small'
  autoplay
  src='https://playertest.longtailvideo.com/adaptive/aes-with-tracks/master.m3u8'
  description=''
  picture-in-picture-mode={['push', 'pop']}
  loop
></XgVideo>

2. vid 方式播放

<XgVideo
  className='xg-video'
  mode='small'
  playDomain='vod.bytedanceapi.com'
  playAuthToken='*****************'
></XgVideo>

XgVideoProps

| Property | Type | Default | Required | Description | |----------|------|---------|----------|-------------| | id | string | | No | | | mode | 'short' / 'small' | | Yes | 该播放器支持小视频及短视频两种播放UI模式,小视频模式偏向于普通的PC视频播放器UI,短视频适合竖屏视频展示。具体样式可参考DEMO | | src | string | | No | 播放地址,优先级高于playAuthToken参数 | | playDomain | string | | No | | | playAuthToken | string | | No | 生成方式可参考火山引擎文档 | | loop | boolean | false | No | 循环播放 | | muted | boolean | false | No | 默认静音 | | autoplay | boolean | false | No | 自动播放 | | playbackRateList | number[] | false | No | 默认值:[0.5, 0.8, 1.0, 1.25, 1.5],可参考各家小程序对于数值的约定 | | definition | number | false | No | 默认清晰度 | | definitionList | IDefinition[] | false | No | 清晰度档位列表 |

Types

interface IDefinition {
  url: string
  quality: number
  text:
    | string
    | {
        [propName: string]: any
      }
  iconText?:
    | string
    | {
        [propName: string]: any
      }
}