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

"Media failed to load." appear for no reason #103

Open
tised opened this issue Apr 23, 2021 · 6 comments
Open

"Media failed to load." appear for no reason #103

tised opened this issue Apr 23, 2021 · 6 comments

Comments

@tised
Copy link

tised commented Apr 23, 2021

When switching between cached videos already(tap on left-right edge), label "Media failed to load." appear for a split second

@blackmann
Copy link
Owner

Hello @tised do you experience this with your app or with the demo project?

@devashishpuri
Copy link

It happens when widget.videoLoader.state = LoadState.success but controller is not initialized. For LoadState.loading it shows Loader, but in other cases, it shows the message.

@JosephChuang129
Copy link

Hello @blackmann "Media failed to load." text show in the demo project.
Do you have any suggestions?, thanks

@christxph
Copy link

This is happening in case the video loader state is in state LoadState.success and playerController!.value.isInitialized still equals false.

A quick and dirty workaround is to change line 117 in story_video.dart (https://github.com/blackmann/story_view/blob/master/lib/widgets/story_video.dart#L117)

from:
return widget.videoLoader.state == LoadState.loading

to:
return widget.videoLoader.state == LoadState.loading || widget.videoLoader.state == LoadState.success

This will result in the loading spinner being shown for a split second instead of the error text.
Note that that's not a proper fix.

@bartonip
Copy link

bartonip commented Sep 2, 2021

I've made PR #121 that replicates Instagram's story switching which is just a brief black screen when the following video is loaded to allow for minimally invasive cuts between continuous video.

@AmitBhandari7777
Copy link

AmitBhandari7777 commented Jul 11, 2024

errorWidget: Container( color: Colors.black, width: MediaQuery.sizeOf(context).width, height: MediaQuery.sizeOf(context).height, ),

Adding this to StoryItem might be another alternative

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

7 participants