React native Seekbar isn';无法正常工作,无法响应本地视频

React native Seekbar isn';无法正常工作,无法响应本地视频,react-native,react-native-video,React Native,React Native Video,错误 我有一个音乐应用程序。当我从脱机存储播放mp3时,自定义进度滑块工作正常,但当我使用联机URL时,进度条工作不正常。我完全搞不清楚发生了什么事。如果有人指出这一点,那对我真的很有帮助 平台 Android MediaPlayer 系统: 操作系统:Windows 10.0.19041 CPU:(4)x64 Intel(R)Core(TM)i5-7400 CPU@3.00GHz 内存:6.17 GB/15.89 GB 二进制文件: 节点:12.16.1-C:\Program Files\no

错误

我有一个音乐应用程序。当我从脱机存储播放mp3时,自定义进度滑块工作正常,但当我使用联机URL时,进度条工作不正常。我完全搞不清楚发生了什么事。如果有人指出这一点,那对我真的很有帮助

平台

Android MediaPlayer

系统:

操作系统:Windows 10.0.19041

CPU:(4)x64 Intel(R)Core(TM)i5-7400 CPU@3.00GHz

内存:6.17 GB/15.89 GB

二进制文件:

节点:12.16.1-C:\Program Files\nodejs\Node.EXE

纱线:1.22.5-~\AppData\Roaming\npm\warn.CMD

npm:6.14.8-H:\Work\BengaliStories\BengaliStories\u App\node\u modules.bin\npm.CMD

看守员:没有找到

SDK:

Android SDK:未找到

Windows SDK:找不到

IDEs:

Android Studio:版本4.1.0.0 AI-201.8743.12.41.6953283

Visual Studio:未找到

语言:

Java:11.0.2-C:\Users\Ajoy\AppData\Local\jdk-11.0.2\bin\javac.EXE

Python:2.7.9-C:\Users\Ajoy\AppData\Local\python2\Python.EXE

npmPackages:

@反应本机社区/cli:未找到

反应:16.13.1=>16.13.1

反应本机:0.63.2=>0.63.2

反应本机视频:^5.1.0-alpha8

代码

seek(time) {
  const that = this;
  this.presentTime = time;
  time = Math.round(time);
  // that.refs.audioElement && that.refs.audioElement.seek(time);
  that.audioElement.seek(time, 50);
  this.setState({
    currentPosition: time,
    paused: false,
    loadComplte: false,
  });
}

   <Video
      source={{uri: TRACKS[0].audioUrl}}
      ref={(ref) => {
        this.audioElement = ref;
      }}
      paused={this.state.paused}
      resizeMode="cover"
      repeat={false}
      onLoadStart={this.loadStart.bind(this)}
      onLoad={this.setDuration.bind(this)}
      onProgress={this.setTime.bind(this)}
      onVideoEnd={this.onEnd()}
      onError={this.videoError}
      style={styles.audioElement}
      ignoreSilentSwitch={'ignore'}
      playWhenInactive={true}
      onBuffer={this.loadStart.bind(this)}
      audioOnly={true}
      playInBackground={true}
      bufferConfig={{
        minBufferMs: 15000,
        maxBufferMs: 50000,
        bufferForPlaybackMs: 2500,
        bufferForPlaybackAfterRebufferMs: 5000,
      }}
      autoplay={true}
    />
seek(时间){
常数=this;
this.presentTime=时间;
时间=数学。四舍五入(时间);
//that.refs.audioElement&&that.refs.audioElement.seek(时间);
即.audioElement.seek(时间,50);
这是我的国家({
当前位置:时间,
暂停:错,
loadComplte:false,
});
}
{
this.audioElement=ref;
}}
暂停={this.state.paused}
resizeMode=“封面”
重复={false}
onLoadStart={this.loadStart.bind(this)}
onLoad={this.setDuration.bind(this)}
onProgress={this.setTime.bind(this)}
onVideoEnd={this.onEnd()}
onError={this.videoError}
style={styles.audioElement}
ignoreSilentSwitch={'ignore'}
playWhenInactive={true}
onBuffer={this.loadStart.bind(this)}
audioOnly={true}
playInBackground={true}
缓冲配置={{
MINMS:15000,
maxBufferMs:50000,
回放缓冲区:2500,
回绝后播放的缓冲区:5000,
}}
自动播放={true}
/>