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

rax-video

v1.6.1

Published

Video component for Rax.

Downloads

99

Readme

rax-video

npm

支持

Web / Weex / 阿里小程序 / 微信小程序 / 字节跳动小程序

描述

视频播放组件

安装

$ npm install rax-video --save

属性

| 属性 | 类型 | 默认值 | 必填 | 描述 | 支持 | | ----------- | ---------- | ---------- | -------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | id | string | - | ✘ | id 选择器 | | | src | string | - | ✔️ | 视频地址 | | | autoPlay | boolean | false | ✘ | 设置视频自动播放 | | | muted | boolean | false | ✘ | 是否播放音频 | | | loop | boolean | false | ✘ | 是否循环播放 | | | controls | boolean | true | ✘ | 是否展示 control panel | | | playControl | string | pause | ✘ | playpause,控制视频播放,如果不设置,则通过autoPlay属性来判定当视频加载后,是否播放 | | | poster | string | - | ✘ | 视频封面图的url,支持jpg、png等图片,如https://***.jpg | | | onEnded | function | - | ✘ | 当视频播放完成时调用的 callback 函数 | | | showMuteBtn | boolean | true | ✘ | 是否展示工具栏上的静音按钮 | | | showPlayBtn | boolean | true | ✘ | 是否显示视频底部控制栏的播放按钮 | | | showFullscreenBtn | boolean | true | ✘ | 是否显示全屏按钮 | | | showCenterPlayBtn | boolean | true | ✘ | 是否显示视频中间的播放按钮 | | | showThinProgressBar | boolean | false | ✘ | 当底部工具条隐藏时,是否显示细进度条(controls=false 时设置无效) | | | objectFit | string | contain | ✘ | 当视频大小与 video 容器大小不一致时,视频的表现形式。可选值参考各小程序文档 | |

示例

import { createElement, render } from 'rax';
import Video from 'rax-video';
import DriverUniversal from 'driver-universal';

function VideoDemo() {
  return (
    <Video
      src="https://cloud.video.taobao.com/play/u/2780279213/p/1/e/6/t/1/d/ld/36255062.mp4"
      style={{ width: 750, height: 400 }}
      autoPlay
    />
  );
}

render(<VideoDemo />, document.body, { driver: DriverUniversal });