ja2375 / FluTube

A Flutter plugin to facilitate embedding Youtube videos inside mobile apps.
MIT License
34 stars 17 forks source link

Source error (com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 403) #9

Closed bunmengteang closed 5 years ago

bunmengteang commented 5 years ago

Hello, When loading video url, sometime i face this problem. How to catch error or prevent this problem?

ja2375 commented 5 years ago

Which . video are you trying to load? Is it copyrighted? That error occurs when you try to load copyrighted videos.

It is written at the very top of the README:

PLEASE NOTE: Embedding copyrighted videos is actually not possible. Please use flutter_youtube instead.

bunmengteang commented 5 years ago

But it just occur sometime, not every time of loading. So it mean some time work, some time not work??

ja2375 commented 5 years ago

Oh I see. Then it's not what I told you at first, sorry. I debugged that error and it seems to be some sort of race condition in the video_player plugin. Because the YouTube url is loading perfectly well when flutube is initialized. So I cannot be of more help :(

I have to add a callback that gets called when an error happens. It's not added yet, I have had no time. Apologies.

ja2375 commented 5 years ago

Please update to 0.8.0 and see if this gets fixed for you. If not, please reopen the issue.