Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-video-bilibili

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-video-bilibili

react-native-video二次开发视频播放器,交互设计参考bilibili

  • 1.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-video-bilibili

📺react-native-video二次开发视频播放器,交互设计参考bilibili

No link, no dependencies, only javascript

Install npm version npm version

npm install react-native-video-bilibili

Screenshot

UX exploded view

Usage

import Video from 'react-native-video-bilibili';

<Video
    ref={'player'}
    style={{width:"100%",height:300}}
    source={{uri: "https://media.w3.org/2010/05/sintel/trailer.mp4"}}
/>

Configurable props

  • ...video.props

  • containerStyle

    container style

  • style

    react-native-video style

  • styles

    deep merge styles with VideoPlayerStyles

  • lock🔒

    🌟Lock all operations🌟

  • Custom Menus Component

    PropertyTypeArgumentsDescription
    renderCenterMenusnodestate,propsComponents displayed in the middle of the player, like volume or light control
    renderTopMenusnodestate,propsComponents displayed in the top of the player, like title or navigation control
    renderBottomMenusnodestate,propsComponents displayed in the bottom of the player, like seek bar or seek time control
    renderSeekTimenodestate,propsComponents displayed when you slide left and right, like show each frame of picture
    renderLoadingnodestate,propsComponents displayed when video is buffering, like show buffering loading
    childrenfunctionstate,props({state,props})=>(<View></View>)
    state props

    Pass all state and external props of the parent component<Provider> to the child component<Consumer> based on context API

    Provider

    <Provider value={{
        state:this.state,
        props:{
            ...this.props,
            onCurrentTimeProgress:this.onCurrentTimeProgress,
            onSlidingComplete:this.onSlidingComplete,
            setPaused:this.setPaused
        },
    }}>
    </Provider>
    

    Consumer

    <Consumer>
        {({state, props}) =>
            <Animated.View>
                {props.renderCenterMenus(state, props)}
            </Animated.View>
        }
    </Consumer>
    

Event props

Ref Direct Manipulation

  • ...video methods

       this.player._root.doSth()
    
  • setPaused()

  • showMenusComponent()

  • showSeekTimerComponent()

  • onOrientationChange({width,height})

Todo-list

1.0

if you accept Link the other library,please refer to https://github.com/abbasfreestyle/react-native-af-video-player

1.1
  • add lock props
  • add children props
2.0 Future features
  • Native volume control
  • Native light control
  • 弹幕

Keywords

FAQs

Package last updated on 20 Jan 2021

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