Skip to content

VideoPlayer doesn't update its state when the video gets paused upon removing headphone jack #49081

@behnamsattar

Description

@behnamsattar

Steps to Reproduce

  1. Build and run the example application for the official VideoPlayer plugin. (I'm doing it on my iPad and I'm not sure if the same issue exists for the Android side)
  2. While the video is playing, insert your headphones jack in and then take it out.
  3. Notice that the player is paused automatically.
  4. Tap on the screen.

Expected results:
We should see the play icon and video player should start playing again.
When the player goes to the paused state, it should update its state with the Flutter side. In that case, the app correctly detects the video state and shows the expected behavior.

Actual results:
Observe that because the app thinks the player is still playing, the tap is counted as a pausing tap and a pause icon is shown. The state doesn't change and the player would be still in the paused state.

Logs

flutter run --verbose (NOT DONE)

flutter analyze

Analyzing example...
No issues found! (ran in 3.1s)

flutter doctor -v

[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.6 18G2022, locale en-US)
    • Flutter version 1.12.13+hotfix.5 at /Users/behnam/dev/tools/flutter
    • Framework revision 27321ebbad (5 weeks ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0


[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    • Android SDK at /Users/behnam/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

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

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 37.0.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

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

[✓] Connected device (1 available)
    • Dean’s iPad • 2a018e613f771de4fd9e89bac238bd8318e81254 • ios • iOS 12.4.1

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.found in release: 2.2Found to occur in 2.2found in release: 2.3Found to occur in 2.3has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions