Skip to content

[video_player] Better exception message on iOS devices if the video fails to play #56665

@ueman

Description

@ueman

Steps to Reproduce

  1. Create an application on iOS with the video_player
  2. Use a server which does not support HTTP range header
  3. Try to play a video on said server. It throws an PlatformException(VideoError, Failed to load video: Operation Stopped, null) exception with no further details.

Expected results:
I would expect a better error message as iOS seems to be capable of giving a better error message.
See for example this stackoverflow post.

Actual results:
PlatformException(VideoError, Failed to load video: Operation Stopped, null)
with no further details why it throws this exception.

Logs

flutter analyze

Analyzing zkb-app...                                                    
No issues found! (ran in 6.6s)

flutter doctor -v

[✓] Flutter (Channel stable, v1.17.0, on Mac OS X 10.15.4 19E287, locale de-DE)
    • Flutter version 1.17.0 at /Applications/flutter
    • Framework revision e6b34c2b5c (6 days ago), 2020-05-02 11:39:18 -0700
    • Engine revision 540786dd51
    • Dart version 2.8.1

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/user/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Users/user/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/192.6392135/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.6)
    • Android Studio at /Users/user/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/192.6392135/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[!] IntelliJ IDEA Ultimate Edition (version 2020.1.1)
    • IntelliJ at /Users/user/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] VS Code (version 1.44.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.9.1

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

I guess this line and the following code should be expanded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: error messageError messages from the Flutter frameworkcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.found in release: 3.10Found to occur in 3.10found in release: 3.11Found to occur in 3.11has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions