Skip to content

[video_player] BehindLiveWindowException #100478

Closed
flutter/packages
#5869

Description

@Ezaldeen99

Steps to Reproduce

  1. play any live video using flutter video player
  2. in case of any behind window exception happened due to poor internet the player will be stopped

Expected results:

According to exoplayer official documentations BehindLiveWindowException, this should be a special case and the player need to be prepared again

official docs

*Actual results:

the current implementation is considering it as a general exception, and this maybe will lead to a bad user experience

The current implementation

         @Override
          public void onPlaybackStateChanged(final int playbackState) {
            if (playbackState == Player.STATE_BUFFERING) {
              setBuffering(true);
              sendBufferingUpdate();
            } else if (playbackState == Player.STATE_READY) {
              if (!isInitialized) {
                isInitialized = true;
                sendInitialized();
              }
            } else if (playbackState == Player.STATE_ENDED) {
              Map<String, Object> event = new HashMap<>();
              event.put("event", "completed");
              eventSink.success(event);
            }

            if (playbackState != Player.STATE_BUFFERING) {
              setBuffering(false);
            }
          }

          @Override
          public void onPlayerError(final ExoPlaybackException error) {
            setBuffering(false);
            if (eventSink != null) {
              eventSink.error("VideoError", "Video player had error " + error, null);
            }
          }
        });

I am submitting this issue because I am unable to make PR for this case. Thanks for your time

Activity

  1. darshankawar commented on Mar 22, 2022

    @darshankawar
    Member

    Thanks for the report.
    For reference: There was this issue which did throw the said exception: #81815.

  2. added
    P2Important issues not at the top of the work list
    on Mar 24, 2022
  3. kobe-paulo-reis commented on Oct 25, 2022

    @kobe-paulo-reis

    Any updates on this issue?

  4. added
    r: fixedIssue is closed as already fixed in a newer version
    on Feb 13, 2024
  5. github-actions commented on Feb 27, 2024

    @github-actions

    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.

  6. locked as resolved and limited conversation to collaborators on Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listp: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions