Repository: flutter
Issue: [video player] weird behaviour when the download speed is low
Labels: p: video_player,package,team-ecosystem,has reproducible steps,P2,triaged-ecosystem,found in release: 3.19,found in release: 3.22

### Steps to reproduce

first simulate slow internet connection or slow server:
1- install some bandwidth limiter, for me i used the official [network link conditioner](https://nshipster.com/network-link-conditioner/).
2- set the bandwidth limiter to something really low, i have set mine to 300 kbps download

next test the video buffering
1- fire up some video player example, i will attach the example i used.
2- give it some time to buffer some part of the video but not the whole video, theoretically it should be able to play the video once it has buffered a part of it, but in this case, it can't for some reason 

### Expected results

I expect the player to act the same regardless of user connection speed or server speed, in other words it should be able to play the video as soon as some part of it is buffered

### Actual results

Currently the player doesn't play the video until the whole video is buffered, watch the attached below video, it is very important in showing the issue

### Code sample

<details open><summary>video player  example that i used</summary>

```dart
import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';

const mainColor = Color(0xFFF09636);

extension SaneFormat on Duration {
  String saneFormat() {
    return "${inHours.toString().padLeft(2, '0')}:${inMinutes.remainder(60).toString().padLeft(2, '0')}:${inSeconds.remainder(60).toString().padLeft(2, '0')}";
  }
}

class VideoPlayerScreen extends StatefulWidget {
  const VideoPlayerScreen({super.key});

  @override
  State<VideoPlayerScreen> createState() => _VideoPlayerScreenState();
}

class _VideoPlayerScreenState extends State<VideoPlayerScreen> {
  bool showcontrols = true;
  VideoPlayerController? videoController;
  bool isInitializing = false;
  bool isPortrait = true;
  double playerControlSize = 40;
  List<String> translationNames = [];
  List<String> resolutionNames = [];

  videoControllerListener() {
    setState(() {});
    if (videoController!.value.hasError) {
      print('video error');
      initVideo();
    }
  }

  reloadVideo() async {
    Uri? videoUrl;

    videoUrl = Uri.parse(
        'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4');

    videoController = VideoPlayerController.networkUrl(videoUrl);
    videoController!.addListener(videoControllerListener);
    initVideo();
  }

  initVideo() {
    if (isInitializing) return;
    isInitializing = true;
    videoController!.initialize().then((_) {
      videoController!.setVolume(0);
      videoController!.play();
    }).onError((e, st) {
      log('got error', error: e);
      initVideo();
    }).whenComplete(() {
      isInitializing = false;
    });
  }

  @override
  void initState() {
    super.initState();
    reloadVideo();
  }

  @override
  void dispose() async {
    super.dispose();
    videoController?.removeListener(videoControllerListener);
    await videoController?.dispose();
  }

  seekForward() async {
    videoController!.seekTo(
        (await videoController!.position)! + const Duration(seconds: 10));
  }

  seekBackwards() async {
    videoController!.seekTo(
        (await videoController!.position)! - const Duration(seconds: 10));
  }

  @override
  Widget build(BuildContext context) {
    var problem =
        videoController == null || !videoController!.value.isInitialized;

    playerControlSize = 40;
    return SafeArea(
      child: DefaultTextStyle(
        style: const TextStyle(color: Colors.white),
        child: Stack(
          children: [
            videoController != null
                ? Center(
                    child: AspectRatio(
                      aspectRatio: videoController!.value.aspectRatio,
                      child: VideoPlayer(videoController!),
                    ),
                  )
                : const Center(child: CircularProgressIndicator()),
            GestureDetector(
              onTap: () {
                setState(() {
                  showcontrols = !showcontrols;
                });
              },
              child: Container(
                color: Colors.transparent,
              ),
            ),
            Visibility(
              visible: showcontrols,
              child: Column(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Align(
                    alignment: Alignment.topLeft,
                    child: Padding(
                      padding: const EdgeInsets.all(15),
                      child: Container(
                        color: Colors.black45,
                        child: ValueListenableBuilder(
                          valueListenable: videoController!,
                          builder: (context, value, child) => RichText(
                            text: TextSpan(
                              text: 'Stats',
                              children: [
                                const TextSpan(text: '\n'),
                                TextSpan(
                                    text:
                                        'isBuffering: ${value.isBuffering}\n'),
                                TextSpan(
                                    text:
                                        'isCompleted: ${value.isCompleted}\n'),
                                TextSpan(
                                    text:
                                        'isInitialized: ${value.isInitialized}\n'),
                                TextSpan(
                                    text: 'isLooping: ${value.isLooping}\n'),
                                TextSpan(
                                    text: 'isPlaying: ${value.isPlaying}\n'),
                                TextSpan(text: 'hasError: ${value.hasError}\n'),
                                TextSpan(
                                    text:
                                        'errorDescription: ${value.errorDescription}\n'),
                              ],
                            ),
                          ),
                        ),
                      ),
                    ),
                  ),
                  Directionality(
                    textDirection: TextDirection.ltr,
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                      children: [
                        Material(
                          color: Colors.transparent,
                          child: IconButton(
                              onPressed: seekBackwards,
                              icon: Icon(
                                Icons.fast_rewind,
                                color: mainColor,
                                size: playerControlSize,
                              )),
                        ),
                        problem
                            ? const Icon(
                                Icons.block,
                                color: Colors.red,
                                size: 30,
                              )
                            : Material(
                                color: Colors.transparent,
                                child: IconButton(
                                  onPressed: () {
                                    videoController!.value.isPlaying
                                        ? videoController?.pause()
                                        : videoController?.play();

                                    setState(() {});
                                  },
                                  icon: Icon(
                                    videoController != null
                                        ? videoController!.value.isPlaying
                                            ? Icons.pause
                                            : Icons.play_arrow
                                        : Icons.sync_problem,
                                    color: mainColor,
                                    size: playerControlSize,
                                  ),
                                ),
                              ),
                        Material(
                          color: Colors.transparent,
                          child: IconButton(
                              onPressed: seekForward,
                              icon: Icon(
                                Icons.fast_forward,
                                color: mainColor,
                                size: playerControlSize,
                              )),
                        ),
                      ],
                    ),
                  ),
                  Container(
                    margin: const EdgeInsets.symmetric(horizontal: 5),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        videoController != null
                            ? ValueListenableBuilder(
                                valueListenable: videoController!,
                                builder: ((context, value, child) {
                                  return Text(value.duration.saneFormat());
                                }),
                              )
                            : const SizedBox.shrink(),
                        Directionality(
                          textDirection: TextDirection.ltr,
                          child: Expanded(
                            child: Container(
                              margin:
                                  const EdgeInsets.only(left: 10, right: 10),
                              child: videoController != null
                                  ? VideoProgressIndicator(
                                      videoController!,
                                      allowScrubbing: true,
                                      colors: const VideoProgressColors(
                                        playedColor: mainColor,
                                        bufferedColor: Colors.red,
                                      ),
                                    )
                                  : const SizedBox.shrink(),
                            ),
                          ),
                        ),
                        videoController != null
                            ? ValueListenableBuilder(
                                valueListenable: videoController!,
                                builder: ((context, value, child) {
                                  return Text(value.position.saneFormat());
                                }),
                              )
                            : const SizedBox.shrink(),
                      ],
                    ),
                  )
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

https://streamable.com/y53yra

**i couldn't upload the video here because of size limit**

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.19.5, on macOS 14.4.1 23E224 darwin-arm64, locale
    en-IQ)
    • Flutter version 3.19.5 on channel stable at /Users/rhx/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 300451adae (4 weeks ago), 2024-03-27 21:54:07 -0500
    • Engine revision e76c956498
    • Dart version 3.3.3
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/rhx/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.88.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 14.4.1 23E224
      darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 124.0.6367.92

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>