Repository: flutter
Issue: [video_player] [ANDROID] Video is flickering (blinking) when multiple videos are playing while scrolling
Labels: platform-android,c: performance,p: video_player,package,has reproducible steps,P3,team-android,triaged-android,found in release: 3.16,found in release: 3.19

### Steps to reproduce

Just run the code below on an Android device or emulator

### Expected results

The first video must not be flickering

### Actual results

The first video sometimes gets buggy (flickering) when the user scroll through the app, as the video below shows. This happens ONLY on Android, and iOS looks normal.

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';

void main() {
  runApp(MaterialApp(home: VideoApp()));
}

class VideoApp extends StatelessWidget {
  const VideoApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Video Demo',
        home: VideoList(
          key: UniqueKey(),
          videoUrls: const [
            'https://assets.mixkit.co/videos/preview/mixkit-waves-in-the-water-1164-large.mp4',
            'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4'
          ],
        ));
  }
}

class VideoList extends StatelessWidget {
  final List<String> videoUrls;

  VideoList({super.key, required this.videoUrls});

  List<Widget> customWidgets = [
    Container(
      height: 50.0,
    ),
    Container(
      height: 50.0,
    ),
    Container(
      height: 50.0,
    ),
    VideoPlayerWidget(
      videoUrl:
          'https://assets.mixkit.co/videos/preview/mixkit-waves-in-the-water-1164-large.mp4',
    ),
    VideoPlayerWidget(
      videoUrl:
          'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4',
    ),
    Container(
      height: 80.0,
    ),
    Container(
      height: 50.0,
    ),
    Container(
      height: 50.0,
    )
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Lista de Vídeos'),
      ),
      body: ListView.builder(
        scrollDirection: Axis.vertical,
        itemCount: customWidgets.length,
        itemBuilder: (context, index) {
          return customWidgets[index];
        },
      ),
    );
  }
}

class VideoPlayerWidget extends StatefulWidget {
  final String videoUrl;

  VideoPlayerWidget({super.key, required this.videoUrl});

  @override
  _VideoPlayerWidgetState createState() => _VideoPlayerWidgetState();
}

class _VideoPlayerWidgetState extends State<VideoPlayerWidget> {
  late VideoPlayerController _controller;

  @override
  void initState() {
    super.initState();
    _controller = VideoPlayerController.networkUrl(Uri.parse(widget.videoUrl),
        videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true))
      ..initialize().then((_) {
        _controller.setLooping(true);

        _controller.play();
        setState(() {});
      });
  }

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(8.0),
      child: _controller.value.isInitialized
          ? AspectRatio(
              aspectRatio: _controller.value.aspectRatio,
              child: VideoPlayer(_controller))
          : Container(),
    );
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }
}

```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>



https://github.com/flutter/flutter/assets/95991747/9c391cfd-fca8-4295-a333-12e8923efb5f


</details>





### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.16.0, on macOS 14.2 23C64 darwin-arm64, locale pt-BR)
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.1.5/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/fabriciocostamonteiro/fvm/versions/3.16.0. Consider adding /Users/fabriciocostamonteiro/fvm/versions/3.16.0/bin to the front of your path.
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.84.0)
[✓] Connected device (3 available)
[✓] Network resources

```

</details>