TheWidlarzGroup/react-native-video

preferredForwardBufferDuration not working. It doesn't change anything

Open

#2698 aperta il 26 mag 2022

Vedi su GitHub
 (3 commenti) (1 reazione) (0 assegnatari)Kotlin (3027 fork)batch import
6.x.xPlatform: iOSgood first issuetriage needed

Metriche repository

Star
 (7677 star)
Metriche merge PR
 (Merge medio 34g 22h) (1 PR mergiata in 30 g)

Descrizione

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}
				/>

Guida contributor