Giter Club home page Giter Club logo

react-native-video-gesture's Introduction

简单的视频播放器上层手势组件

此组件见实现了手势识别功能,具体的根据手势而回调的功能为实现
此组件支持:点击事件,左侧纵向滑动,右侧纵向滑动,全组建横向滑动等操作的识别。

使用简介

onClick点击事件
onProgress横向滑动中回调
onProgressEnd横向滑动结束回调
onLeftProgress左侧纵向滑动中回调
onLeftProgressEnd左侧纵向滑动结束回调
onRightProgress右侧纵向滑动中回调
onRightProgressEnd右侧纵向滑动结束回调

<VideoOperationComponet
    style={styles.sliding_view}
    onClick={()=>{
        this.setState({
            distance:"点击事件"
        })
    }}
    onProgress={(d)=>{
        this.setState({
            distance:"进度:"+d
        })
    }}
    onProgressEnd={(d)=>{
        this.setState({
            distance:"进度结束:"+d
        })
    }}
    onLeftProgress={(d)=>{
        this.setState({
            distance:"左进度:"+d
        })
    }}
    onLeftProgressEnd={(d)=>{
        this.setState({
            distance:"左进度结束:"+d
        })
    }}
    onRightProgress={(d)=>{
        this.setState({
             distance:"右进度:"+d
        })
    }}
    onRightProgressEnd={(d)=>{
        this.setState({
             distance:"右进度结束:"+d
        })
    }}
 >
</VideoOperationComponet>

支持自定义 有自定义需求的可参考VideoOperationComponet组件的实现

效果预览

markdown

react-native-video-gesture's People

Contributors

ykln avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.