Comments (8)
你这些需求其实我在做项目的时候都考虑到了的;
我也是自己的项目需要播放器,做着做着发现一个播放器的代码量比较大,我才搞了个包,方便以后使用;
1,2我不忙了给搞出来吧 最近在学习flutter;
视频播放个数限制那个很简单,我的app也有这个功能,当播放次数已用完,可以不显示video组件,给一个图放那,图上左上角放一个返回按钮,我就是这样做的,至于图的大小,你可以看我这个视频分辨率大小来设置
from react-native-rn-videoplayer.
你这些需求其实我在做项目的时候都考虑到了的;
我也是自己的项目需要播放器,做着做着发现一个播放器的代码量比较大,我才搞了个包,方便以后使用;1,2我不忙了给搞出来吧 最近在学习flutter;
视频播放个数限制那个很简单,我的app也有这个功能,当播放次数已用完,可以不显示video组件,给一个图放那,图上左上角放一个返回按钮,我就是这样做的,至于图的大小,你可以看我这个视频分辨率大小来设置
嗯 图片哪个我这边解决了,播放速率,我之前的播放器是有的,项目上线了也很久了,这次是重构,看到播放器代码很多,所以还是打算找一个,你的封装就非常的符合我的需求,这样省去了很多的代码,这边打算把你的fork一个,加个播放速率
from react-native-rn-videoplayer.
可以,我这边代码质量不行,勉强看下,赶项目进度,业余时间少,又没mac,只能在公司的时候写一写
from react-native-rn-videoplayer.
需要这样的功能+1
from react-native-rn-videoplayer.
可以,我这边代码质量不行,勉强看下,赶项目进度,业余时间少,又没mac,只能在公司的时候写一写
需要这样的功能+1
这个需求我做了的 其实作者已经起了个好头 哪个视频 选集 就已经给 播放速率给出了方案 模仿着 加一个遮罩即可 选择的速率赋值给播放器即可
from react-native-rn-videoplayer.
@wulaizi pr一波? 我又忙起来了 在做一个rn项目
from react-native-rn-videoplayer.
@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.
v2.2.10 新增了 长按左右两边 快进 快退 返回按钮旁边展示视频名称等
from react-native-rn-videoplayer.
Related Issues (20)
- 在安卓下有bug,播放时的视频尺寸不对 HOT 5
- 发现个致命问题,这串代码在render里执行 HOT 2
- 全屏后,无法退出全屏 HOT 1
- 可以支持视频列表吗 HOT 9
- Could not resolve com.android.tools.build:gradle:3.3.1 HOT 1
- android 视频关闭后,状态栏背景颜色会变白色 HOT 9
- IOS 报错 Invariant Violation: Native module cannot be null. HOT 4
- 需要列出依赖了哪些第三方库
- null is not an object (evaluating 'event.nativeEvent.pageX)
- android react-native 0.63.2 react-native-rn-videoplayer 2.2.10
- 拖动进度条崩溃,有人遇到么还是我环境没有好? HOT 4
- react-native-orientation-lock编译一直出错 HOT 1
- CONFIGURING一直卡60 HOT 3
- install进来之后按照文档配置完,开始run发现卡死在这里 HOT 8
- 无法配置控件宽高,resizeMode写死了none后在有点设备下视频内容无法完整显示
- Getting console warnings
- is:issue is:open 当全屏播放时候,左上角的“<”返回按钮退出不了 全屏,也后退不了,是否可以加一个OnBigBack的回调呢?或许自动退出全屏 HOT 8
- Full screen Landscape issue
- need update for react native 0.73.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-rn-videoplayer.