Skip to content
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

Video Player does not disable image on Android with Impeller enabled #148647

Closed
dovahkiin98 opened this issue May 19, 2024 · 2 comments
Closed

Video Player does not disable image on Android with Impeller enabled #148647

dovahkiin98 opened this issue May 19, 2024 · 2 comments
Labels
r: invalid Issue is closed as not valid

Comments

@dovahkiin98
Copy link

Steps to reproduce

  1. Enable Impeller on Android
  2. Add video_player package
  3. Add a Widget with VideoPlayer

Expected results

Video Player should have the video running normally with sound and image

Actual results

Video Player does not load any image, only audio

Code sample

Code sample
class HomeVideoPlayer extends StatefulWidget {
  const HomeVideoPlayer({
    required this.video,
    super.key,
  });

  final String video;

  @override
  State<HomeVideoPlayer> createState() => _HomeVideoPlayerState();
}

class _HomeVideoPlayerState extends State<HomeVideoPlayer> {
  late VideoPlayerController _controller;

  bool isPlaying = false;

  @override
  void initState() {
    super.initState();

    _controller = VideoPlayerController.networkUrl(Uri.parse(widget.video))
      ..initialize().then((_) {
        // Ensure the first frame is shown after the video is initialized, even before the play button has been pressed.
        setState(() {});
      });
  }

  @override
  Widget build(BuildContext context) {
    return AspectRatio(
      aspectRatio: 16 / 9,
      // aspectRatio: _controller.value.aspectRatio,
      child: GestureDetector(
        onTap: () {
          if (isPlaying) {
            _controller.pause();
          } else {
            _controller.play();
          }

          setState(() {
            isPlaying = !isPlaying;
          });
        },
        child: VideoPlayer(_controller),
      ),
    );
  }

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

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]
Screenshot_1716132584

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [Version 10.0.22635.3575], locale en-GB)
    • Flutter version 3.22.0 on channel stable at J:\Programming\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5dcb86f68f (10 days ago), 2024-05-09 07:39:20 -0500
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at J:\Programming\Android\Android_SDK
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = J:\Programming\Android\Android_SDK
    • ANDROID_SDK_ROOT = J:\Programming\Android\Android_SDK
    • Java binary at: J:\Programming\Android\Android_Studio_Canary\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.4)
    • Visual Studio at J:\VisualStudio\Community
    • Visual Studio Community 2022 version 17.4.33213.308
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2024.1)
    • Android Studio at J:\Programming\Android\Android_Studio_Canary
    • 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.10+0--11609105)

[√] IntelliJ IDEA Community Edition (version 2024.1)
    • IntelliJ at J:\IntelliJ IDEA
    • Flutter plugin version 79.1.3
    • Dart plugin version 241.15989.9

[√] VS Code (version 1.86.1)
    • VS Code at C:\Users\ahmad\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.52.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22635.3575]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 125.0.6422.60
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 121.0.2277.65

[√] Network resources
    • All expected network resources are available.

• No issues found!
@jonahwilliams
Copy link
Member

You'll need the following patch for this to work: flutter/packages#6456

@huycozy huycozy added the in triage Presently being triaged by the triage team label May 20, 2024
@huycozy
Copy link
Member

huycozy commented May 20, 2024

@dovahkiin98 As mentioned above, this hasn't been supported yet since the PR is not merged. I'm going to close this issue. You can try the code changes from PR flutter/packages#6456. Once it's merged but the issue persists, please write in the comments and I will re-open this issue right away. Thanks!

@huycozy huycozy closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2024
@huycozy huycozy added r: invalid Issue is closed as not valid and removed in triage Presently being triaged by the triage team labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r: invalid Issue is closed as not valid
Projects
None yet
Development

No branches or pull requests

3 participants