TheWidlarzGroup/react-native-video

preferredForwardBufferDuration not working. It doesn't change anything

已关闭

#2,698 创建于 2022年5月26日

 (3 条评论) (1 个反应) (0 位负责人)Kotlin (3,027 个派生)batch import
6.x.xPlatform: iOSV6good first issuetriage needed

仓库指标

星标
 (7,677 个星标)
PR 合并指标
 (平均合并 2天 3小时) (30 天内合并 11 个 PR)

描述

Bug

Platform

Which player are you experiencing the problem on:

  • iOS real device (iPhone 11).

Environment info

React native info output:

info Fetching system and libraries information...
System:
    OS: macOS 12.3.1
    CPU: (8) arm64 Apple M1
    Memory: 112.56 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 17.2.0 - /opt/homebrew/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.3.0 - /opt/homebrew/bin/npm
    Watchman: 2021.12.13.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/nicolasmarzullo/.rvm/gems/ruby-3.0.0/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7935034
    Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
  Languages:
    Java: 15.0.2 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.66.4 => 0.66.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Library version: 5.2.0

Steps To Reproduce

  1. Use react-native-video with a heavy video (>400MB)
  2. set prop preferredForwardBufferDuration={15}
  3. Test if the video plays smoothly without interruptions ...

Expected behaviour

  1. Player waits for buffer before continue playing.

Reproducible sample code

<Video
					style={{
						flex: 1,
						backgroundColor: 'black'
					}}
					source={{ uri: mediaUri }}
					ref={playerRef}
					resizeMode="contain"
					playInBackground
					playWhenInactive
					onLoad={( e ) => {
						onLoadVideo( e );
					}}
					useTextureView={false}
					ignoreSilentSwitch="ignore"
					onBuffer={onBufferPlayer}
					onEnd={onEndPlayer}
					onProgress={onProgress}
					poster={poster}
					audioOnly={audioOnly}
					paused={playerPaused}
					onError={onLoadingVideoError}
					fullscreen={Platform.select( {
						ios: false,
						android: fullScreen
					} )}
					bufferConfig={bufferConfig}
					preferredForwardBufferDuration={15}
					automaticallyWaitsToMinimizeStalling={false}
				/>

贡献者指南