TheWidlarzGroup/react-native-video
View on GitHubpreferredForwardBufferDuration not working. It doesn't change anything
Open
#2698 opened on May 26, 2022
6.x.xPlatform: iOSgood first issuetriage needed
Description
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
- Use react-native-video with a heavy video (>400MB)
- set prop
preferredForwardBufferDuration={15} - Test if the video plays smoothly without interruptions ...
Expected behaviour
- 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}
/>