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

[BUG] Controller occasionally fails to initialize and hangs on isReady = false #970

Open
1 task done
mongy910 opened this issue Aug 12, 2024 · 0 comments
Open
1 task done
Assignees

Comments

@mongy910
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Package

youtube_player_flutter

What happened?

I'm initializing a YouTubePlayerController for use in a YoutubePlayer with the following flags:

controller = YoutubePlayerController(
      initialVideoId: widget.content.videoId,
      flags: YoutubePlayerFlags(
        hideThumbnail:
            true,
        hideControls: true,
        enableCaption: false,
        autoPlay: true,
      ),
    );

90% of the time this works perfectly fine and the video loads as expected. However, once in a while, the controller will fail to load the video and will report a status of isReady = false permanently.

I've tried calling reload() if the controller is not ready in an attempt at implementing retry functionality, but it seems as if reload() is broken in the current version, as the player just shows the YouTube homepage instead of loading the initial video again.

What is the expected behaviour?

Controller loads all the time, and reload() properly refreshes the video.

How to reproduce?

I'm using version 9.0.2 of the package with flutter 3.22.2

Flutter Doctor Output

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants