Skip to content

3 issues that arise in Android.1 isBuffering always return true. 2 Return to the desktop after playing, and open the playback screen again. 3.Black lines appear on the right or bottom of the video #166814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tangxiaochuanle opened this issue Apr 9, 2025 · 2 comments
Labels
r: duplicate Issue is closed as a duplicate of an existing issue

Comments

@Tangxiaochuanle
Copy link

Steps to reproduce

1.isBuffering always return true,Click the page skip to switch progress while playing.
2.When the video is playing, click Home to return to the desktop, and then open the App. If you repeat several times, the interface will turn into a white background, and the video cannot be loaded。
3.A black box appears on the right and bottom of the video during video playback. video_player_android: ^2.8.2 appears when using this version.However, video_player_android: 2.7.1 does not have this problem。

If the yaml file contains the following configuration version, none of the above problems will occur, but there are no subsequent updates, or look forward to solving as soon as possible。
dependency_overrides:
video_player_android: 2.7.1

Expected results

We look forward to an early resolution of these issues

Actual results

Inside the Steps to reproduce

Code sample

Code sample
import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';

void main() => runApp(const VideoApp());

/// Stateful widget to fetch and then display video content.
class VideoApp extends StatefulWidget {
  const VideoApp({super.key});

  @override
  _VideoAppState createState() => _VideoAppState();
}

class _VideoAppState extends State<VideoApp> {
  late VideoPlayerController _controller;


  @override
  void initState() {
    super.initState();
    _controller = VideoPlayerController.networkUrl(Uri.parse(
        "https://aloy.7mfitness.com/cms/proj/workout206/m3u8/multi_resolution_f3ab9d67b07c47c6b46d49725213e84c.m3u8?alt=media&name=multi_resolution_f3ab9d67b07c47c6b46d49725213e84c.m3u8"))
      ..initialize().then((_) {
        // Ensure the first frame is shown after the video is initialized, even before the play button has been pressed.
        setState(() {});
      });

    _controller.addListener(printBuffer);
  }

  void printBuffer() => print(_controller.value.isBuffering);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Video Demo',
      home: Scaffold(
        body: Builder(builder: (context) {
          return _controller.value.isInitialized
              ? Stack(
            alignment: Alignment.center,
            children: <Widget>[
              AspectRatio(
                aspectRatio: _controller.value.aspectRatio,
                child: VideoPlayer(_controller),
              ),
              if (_controller.value.isBuffering)
                Center(child: CircularProgressIndicator()),
            ],
          )
              : const Center(child: CircularProgressIndicator());
        }),
        floatingActionButton: Column(
          mainAxisSize: MainAxisSize.min,
          spacing: 16,
          children: <Widget>[
            FloatingActionButton(
              onPressed: () async {
                Duration? pos = await _controller.position;
                if (pos == null) {
                  return;
                }
                setState(() {
                  _controller.seekTo(pos + Duration(seconds: 10));
                });
              },
              child: Text('Skip 10s'),
            ),
            FloatingActionButton(
              onPressed: () {
                setState(() {
                  _controller.value.isPlaying
                      ? _controller.pause()
                      : _controller.play();
                });
              },
              child: Icon(
                _controller.value.isPlaying ? Icons.pause : Icons.play_arrow,
              ),
            ),
          ],
        ),
      ),
    );
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }
}

Screenshots or Video

Screenshots / Video demonstration

[https://aloy.7mfitness.com/cms/proj/workout206/m3u8/multi_resolution_f3ab9d67b07c47c6b46d49725213e84c.m3u8?alt=media&name=multi_resolution_f3ab9d67b07c47c6b46d49725213e84c.m3u8]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.0, on macOS 15.2 24C101 darwin-arm64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] Android Studio (version 3.4)
[✓] Android Studio (version 2024.2)
[✓] Android Studio (version 2024.3)
[✓] VS Code (version 1.88.0-insider)
[✓] Connected device (11 available)
    ! Error: Browsing on the local area network for IOS  18. Ensure the device is unlocked and attached with a cable or associated with the same
      local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!
@darshankawar darshankawar added the in triage Presently being triaged by the triage team label Apr 9, 2025
@darshankawar
Copy link
Member

1.isBuffering always return true,Click the page skip to switch progress while playing.

There's already an open issue for this.

When the video is playing, click Home to return to the desktop, and then open the App. If you repeat several times, the interface will turn into a white background, and the video cannot be loaded。

This has been fixed recently, so you'll need to switch to latest master and re-run your scenario to see it working.

A black box appears on the right and bottom of the video during video playback. video_player_android: ^2.8.2 appears when using this version

Looks like it is similar to #159955, so please follow-up in it for further updates.

Closing this issue, as all 3 issues you mentioned already exists / fixed.

@darshankawar darshankawar added r: duplicate Issue is closed as a duplicate of an existing issue and removed in triage Presently being triaged by the triage team labels Apr 9, 2025
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: duplicate Issue is closed as a duplicate of an existing issue
Projects
None yet
Development

No branches or pull requests

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy