Socket
Socket
Sign inDemoInstall

rax-video

Package Overview
Dependencies
Maintainers
6
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rax-video

Video component for Rax.


Version published
Weekly downloads
13
decreased by-58.06%
Maintainers
6
Weekly downloads
 
Created
Source

npm

[支持]

Web / Weex / 小程序

描述: 视屏播放组件

安装

$ npm install rax-video --save

属性

注: 1、支持列表中的 browser代表h5 weex代表weex miniApp代表小程序

属性类型默认值** [必填] **描述** [支持] **
srcString-视频地址browser weex miniApp
autoPlayBooleanfalse设置视频自动播放browser weex miniApp
mutedBooleanfalse是否播放音频browser weex miniApp
loopBooleanfalse是否循环播放browser weex miniApp
playControlStringpauseplaypause,控制视屏播放,如果不设置,则通过autoPlay属性来判定当视屏加载后,是否播放browser weex miniApp
onEndedfunction-当视屏播放完成时调用的callback函数browser weex miniApp

示例

在线 Demo

import {createElement, Component, render} from 'rax';
import Video from '../src/index';
import * as DriverDOM from 'driver-dom';
import { isWeex } from 'universal-env';
import * as DriverWeex from 'driver-weex';

render(<Video style={{ width: 750, height: 400 }} autoPlay src="https://cloud.video.taobao.com/play/u/2780279213/p/1/e/6/t/1/d/ld/36255062.mp4" />, document.body, { driver: isWeex ? DriverWeex : DriverDOM });

Keywords

FAQs

Package last updated on 26 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc