Socket
Socket
Sign inDemoInstall

react-native-nj-one-click

Package Overview
Dependencies
0
Maintainers
4
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-nj-one-click

react-native-one-click-login


Version published
Maintainers
4
Install size
45.1 MB
Created

Readme

Source

react-native-aliplayer

阿里云点播播放器 RN 封装,支持多种播放格式,支持 android 和 ios

Getting started

$ npm install react-native-aliplayer --save

Mostly automatic installation

$ react-native link react-native-aliplayer

Manual installation

Usage

import RNAliplayer from 'react-native-aliplayer';

const source='http://200024424.vod.myqcloud.com/200024424_709ae516bdf811e6ad39991f76a4df69.f20.mp4'

<RNAliplayer source={source} style={{ width: screenWidth, height: 200 }} />;

Props

namedescription
source播放资源
poster封面图
enableFullScreen是否允许全屏
themeColor主题色
onFullScreen全屏事件
onCompletion播放完毕事件
enableCast是否显示投屏按钮
onCastClick投屏按钮点击事件
onChangeBitrate分辨率切换
onProgress进度回调
onPrepare播放准备回调

Method

nameparmasdescription
playtrue/false开始/暂停播放
fullscreentrue/false控制是否全屏
stop/停止播放
seekTonumber(秒)快进到多少秒
this.RNAliplayerRef.play();
this.RNAliplayerRef.fullscreen();

Custom ui

自定义控制层 UI

import ALIViewPlayer from 'react-native-aliplayer/ALIViewPlayer';

// ALIViewPlayer 支持参数可见源码 ALIViewPlayer.propTypes
<ALIViewPlayer>
  <CustomUi />
</ALIViewPlayer>;

Keywords

FAQs

Last updated on 25 Apr 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc