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 wont play local videos in release mode (--release) #88087

Closed
bensurquhart opened this issue Aug 12, 2021 · 5 comments
Closed

video_player wont play local videos in release mode (--release) #88087

bensurquhart opened this issue Aug 12, 2021 · 5 comments
Labels
r: invalid Issue is closed as not valid

Comments

@bensurquhart
Copy link

bensurquhart commented Aug 12, 2021

I'm using the latest version of the flutter video_player plugin, and I cant play videos locally using either VideoPlayerController.asset() or VideoPlayerController.file() in release mode?

I also tried using the example code written here https://pub.dev/packages/video_player/example and the same issue purists.

FYI it works perfectly fine in normal debug mode without --release.

flutter doctor -v
[✓] Flutter (Channel beta, 2.4.0-4.2.pre, on Ubuntu 20.04.2 LTS
    5.11.0-25-generic, locale en_NZ.UTF-8)
    • Flutter version 2.4.0-4.2.pre at /home/ben/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f18b9281c2 (3 weeks ago), 2021-07-22 14:08:30 -0700
    • Engine revision 844c29f42a
    • Dart version 2.14.0 (build 2.14.0-301.2.beta)

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from:
      https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK
      components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup
      for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2
    • pkg-config version 0.29.1

[!] Android Studio (not installed)
    • Android Studio not found; download from
      https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup
      for detailed instructions).

[✓] VS Code (version 1.58.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.25.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 20.04.2 LTS
      5.11.0-25-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 91.0.4472.114

! Doctor found issues in 2 categories.
@TahaTesser TahaTesser added the in triage Presently being triaged by the triage team label Aug 12, 2021
@TahaTesser
Copy link
Member

TahaTesser commented Aug 12, 2021

Hi @bensurquhart
I can't reproduce the issue using an official sample in release mode on Android devices (K20 Pro Android 11) on stable or beta channel

Preview

Code sample

https://pub.dev/packages/video_player/example

flutter doctor -v
[✓] Flutter (Channel beta, 2.5.0-5.1.pre, on Microsoft Windows [Version 10.0.22000.120], locale en-US)
    • Flutter version 2.5.0-5.1.pre at C:\Users\Taha\Code\flutter_beta
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 65cf7de5f4 (15 hours ago), 2021-08-11 15:48:01 -0700
    • Engine revision fbeb7e22bd
    • Dart version 2.14.0 (build 2.14.0-377.4.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\Taha\Code\android-sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_SDK_ROOT = C:\Users\Taha\Code\android-sdk
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

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

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.10.4)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.10.31515.178
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 2020.3)
    • Android Studio at C:\Users\Taha\Code\android-studio
    • 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 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.59.0)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.25.0

[✓] Connected device (5 available)
    • Redmi K20 Pro (mobile)             • def0ad20      • android-arm64  • Android 11 (API 30)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 4.4.2 (API 19) (emulator)
    • Windows (desktop)                  • windows       • windows-x64    • Microsoft Windows [Version 10.0.22000.120]
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 92.0.4515.131
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 92.0.902.67

• No issues found!

Can you please provide device details? If possible try another device

@TahaTesser TahaTesser added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 12, 2021
@bensurquhart
Copy link
Author

Hi @TahaTesser

I haven't tried Android, I'm using the web version at the moment, my colleague also has the same issue on his machine.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 12, 2021
@TahaTesser
Copy link
Member

Hi @bensurquhart
Thanks for the details.

I'm using the latest version of the flutter video_player plugin, and I cant play videos locally using either VideoPlayerController.asset() or VideoPlayerController.file() in release mode?

Which renderer are you using to run the app? Does the page even load?
Currently on stable to master, canvaskit doesn't load the page, it would be blank and I tried HTML renderer on all channels, video loads fine in offline on desktop

@TahaTesser TahaTesser added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 13, 2021
@bensurquhart
Copy link
Author

Hi @TahaTesser

I'm just using chrome with the default renderer no additional parameters, the page loads as normal I just can't play videos locally.

However iv found a work around using a local http server to host the videos and VideoPlayerController.network() to play them in release mode. which is sufficient for what I need right now.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 13, 2021
@TahaTesser TahaTesser added r: invalid Issue is closed as not valid and removed in triage Presently being triaged by the triage team labels Aug 17, 2021
@github-actions
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 Aug 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: invalid Issue is closed as not valid
Projects
None yet
Development

No branches or pull requests

2 participants