反应本机媒体控件不会自动消失,无法自定义

问题描述

我正在使用:

"react-native-media-controls": ^2.1.0
"react-native-video": ^5.1.0-alpha8,

这是我的配置方式:

<View
  style={{
    position: "absolute",top: 0,height: this.props.height,width: this.props.width,}}
>
  <Video
    source={{ uri: this.props.uri }}
    style={styles.fullScreen}
    rate={this.state.rate}
    paused={this.state.paused}
    volume={this.state.volume}
    muted={this.state.muted}
    resizeMode={this.state.resizeMode}
    onLoad={this.onLoad}
    onProgress={this.onProgress}
    onBuffer={this.onBuffer} // Callback when remote video is buffering
    onError={this.videoError}
    controls={false}
    repeat={false}
  />

  <MediaControls
    duration={this.state.duration}
    isLoading={this.state.isLoading}
    mainColor="orange"
    onFullScreen={this.onFullScreen}
    onPaused={this.onPaused}
    onReplay={this.onReplay}
    onSeek={this.onSeek}
    playerState={this.state.playerState}
    progress={this.state.currentTime}
    showOnStart={this.state.isVisible}
    fadeOutDelay={2000}
  />
</View>;

我面临的问题是:

  1. 调用onBuffer回调函数
  2. 视频开始加载后,媒体控件应自动淡出,但事实并非如此。如果我没有点击屏幕,则即使在fadeOutDelay时间过去之后,控件仍将继续可见。一旦我在屏幕上点击,控件就会淡出,并开始按预期正常运行。
  3. 除了mainColor属性外,它不允许我们自定义其他任何内容,例如播放按钮等,因此我也在寻找有关更好和更可自定义插件的建议。

谢谢, 塔伦(Tarun)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)