Git Product home page Git Product logo

Comments (8)

A-ANing avatar A-ANing commented on June 26, 2024

你这些需求其实我在做项目的时候都考虑到了的;
我也是自己的项目需要播放器,做着做着发现一个播放器的代码量比较大,我才搞了个包,方便以后使用;

1,2我不忙了给搞出来吧 最近在学习flutter;

视频播放个数限制那个很简单,我的app也有这个功能,当播放次数已用完,可以不显示video组件,给一个图放那,图上左上角放一个返回按钮,我就是这样做的,至于图的大小,你可以看我这个视频分辨率大小来设置

from react-native-rn-videoplayer.

wulaizi avatar wulaizi commented on June 26, 2024

你这些需求其实我在做项目的时候都考虑到了的;
我也是自己的项目需要播放器,做着做着发现一个播放器的代码量比较大,我才搞了个包,方便以后使用;

1,2我不忙了给搞出来吧 最近在学习flutter;

视频播放个数限制那个很简单,我的app也有这个功能,当播放次数已用完,可以不显示video组件,给一个图放那,图上左上角放一个返回按钮,我就是这样做的,至于图的大小,你可以看我这个视频分辨率大小来设置

嗯 图片哪个我这边解决了,播放速率,我之前的播放器是有的,项目上线了也很久了,这次是重构,看到播放器代码很多,所以还是打算找一个,你的封装就非常的符合我的需求,这样省去了很多的代码,这边打算把你的fork一个,加个播放速率

from react-native-rn-videoplayer.

A-ANing avatar A-ANing commented on June 26, 2024

可以,我这边代码质量不行,勉强看下,赶项目进度,业余时间少,又没mac,只能在公司的时候写一写

from react-native-rn-videoplayer.

orzhtml avatar orzhtml commented on June 26, 2024

需要这样的功能+1

from react-native-rn-videoplayer.

wulaizi avatar wulaizi commented on June 26, 2024

可以,我这边代码质量不行,勉强看下,赶项目进度,业余时间少,又没mac,只能在公司的时候写一写

需要这样的功能+1

这个需求我做了的 其实作者已经起了个好头 哪个视频 选集 就已经给 播放速率给出了方案 模仿着 加一个遮罩即可 选择的速率赋值给播放器即可

from react-native-rn-videoplayer.

A-ANing avatar A-ANing commented on June 26, 2024

@wulaizi pr一波? 我又忙起来了 在做一个rn项目

from react-native-rn-videoplayer.

wulaizi avatar wulaizi commented on June 26, 2024

@wulaizi pr一波? 我又忙起来了 在做一个rn项目
我把依赖拉倒本地了
不好推过来 我用的自己的组件
在 renderAllSeenList 下面添加
{ this.state.showVideoRateModal ? <RateModal {...this.state} ref={(ref) => this.RateModalRef = ref} callBack={(videoRate: any) => { this.setState({ videoRate }) }} /> : null }
在 RNVideoPlayerComponent里面加个类
`export class RateModal extends Component {
constructor(props) {
super(props)
this.state = {
currentSelected: this.props.videoRate || 1
}
}
render() {
const { callBack } = this.props;
const SPEED_OPTIONS = [
{ title: '0.7X', value: 0.7 },
{ title: '1.0X', value: 1 },
{ title: '1.5X', value: 1.5 },
{ title: '2.0X', value: 2 }]
return (<View
style={{
width: deviceHeight / 4,
backgroundColor: 'rgba(0,0,0,.6)',
position: "absolute", top: 0, bottom: 0, right: 0,
paddingHorizontal: 30,
}}

    >
        {
            SPEED_OPTIONS.map(item => (
                <Row center fill key={item?.title} onPress={() => {
                    this.setState({
                        currentSelected: item?.value
                    }, () => {
                        callBack && callBack(item.value)
                    })
                }}>
                    <Label
                        fontSize={18}
                        type={item.value == this.state?.currentSelected ? "orange" : "white"}>
                        {item.title}
                    </Label>
                </Row>)
            )
        }
    </View >)
}

}` 把选中的数据传出去 赋值 给video 加个 rate={this.state.videoRate}
没有仔细测试过,不知道有没有问题 其他的 涉及到关闭 功能栏哪些 和
showChangeList 他的即可

from react-native-rn-videoplayer.

A-ANing avatar A-ANing commented on June 26, 2024

v2.2.10 新增了 长按左右两边 快进 快退 返回按钮旁边展示视频名称等

from react-native-rn-videoplayer.

Related Issues (20)

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.