pod_player icon indicating copy to clipboard operation
pod_player copied to clipboard

Cannot play youtube videos, only 1 of 5-10 attempts is succesfull, 403 error

Open RuslanOrolbaev opened this issue 2 years ago • 15 comments

Hello, First, thank you for this great package, it is much faster than any players using webview!

However, I experience the issue below:

when trying to initialize PodPlayerController, very rare it works but usually fails with the following error:

E/ExoPlayerImplInternal( 4568): Playback error E/ExoPlayerImplInternal( 4568): com.google.android.exoplayer2.ExoPlaybackException: Source error E/ExoPlayerImplInternal( 4568): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:644) E/ExoPlayerImplInternal( 4568): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:616) E/ExoPlayerImplInternal( 4568): at android.os.Handler.dispatchMessage(Handler.java:102) E/ExoPlayerImplInternal( 4568): at android.os.Looper.loop(Looper.java:223) E/ExoPlayerImplInternal( 4568): at android.os.HandlerThread.run(HandlerThread.java:67) E/ExoPlayerImplInternal( 4568): Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 403 E/ExoPlayerImplInternal( 4568): at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:413) E/ExoPlayerImplInternal( 4568): at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:263) E/ExoPlayerImplInternal( 4568): at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84) E/ExoPlayerImplInternal( 4568): at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1005) E/ExoPlayerImplInternal( 4568): at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412) E/ExoPlayerImplInternal( 4568): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) E/ExoPlayerImplInternal( 4568): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) E/ExoPlayerImplInternal( 4568): at java.lang.Thread.run(Thread.java:923) I/( 4568): Background concurrent copying GC freed 24665(2111KB) AllocSpace objects, 586(45MB) LOS objects, 22% free, 80MB/104MB, paused 1.442ms total 168.998ms I/flutter ( 4568): SEVERE: 2023-08-10 10:42:19.373750: main: uncaught async error: PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: Source error, null, null)

Even if initialization is successful, the attempt to use the controller's changeVideo() method fails for sure. I tried versions 0.1.5 and 0.2.0 with the same result. Flutter version 3.10.6.

Please advise on that. Thank you.

RuslanOrolbaev avatar Aug 10 '23 10:08 RuslanOrolbaev

i am also getting the same issue. same video works sometime and sometime it is showing this error.

1041harpreet avatar Aug 10 '23 15:08 1041harpreet

same here, any solutions?!

amrhassann avatar Aug 11 '23 09:08 amrhassann

same here version 0.2.0

kingyyy avatar Aug 11 '23 10:08 kingyyy

Getting same issue, its been >10 days

SujitChanda avatar Aug 11 '23 12:08 SujitChanda

Me too, getting same issue

jeffysmak avatar Aug 11 '23 16:08 jeffysmak

me too!

Joseph-Nathan avatar Aug 11 '23 16:08 Joseph-Nathan

looking for solution otherwise i have to use another package.

1041harpreet avatar Aug 11 '23 17:08 1041harpreet

The problem with YouTube links it self

Joseph-Nathan avatar Aug 11 '23 17:08 Joseph-Nathan

The problem with YouTube links it self

nope, if it is in links why it works sometime for same video link?

1041harpreet avatar Aug 11 '23 17:08 1041harpreet

Same here. @newtaDev can you please look into this?

rakib205 avatar Aug 13 '23 10:08 rakib205

I solved the issue by upgrading the packages. the dependencies YouTube explode and http were old, so I upgraded them and now the video players works like a charm. https://github.com/GeorgeReda/pod_player that's my fork and I've made a PR.

GeorgeReda avatar Aug 13 '23 12:08 GeorgeReda

I solved the issue by upgrading the packages. the dependencies YouTube explode and http were old, so I upgraded them and now the video players works like a charm. https://github.com/GeorgeReda/pod_player that's my fork and I've made a PR.

what can we do now? like this issue will be resolved after admin will accept PR , so before this how can work with this pacakge.

1041harpreet avatar Aug 15 '23 09:08 1041harpreet

The package version 0.2.1 has been released, it seems the issue has been solved there

RuslanOrolbaev avatar Aug 15 '23 09:08 RuslanOrolbaev

Upgraded all dependencies: Please change pod_player version to 0.2.1

please let me know still there is an issue

newtaDev avatar Aug 16 '23 07:08 newtaDev

Hi, I am still having the issue. The version I use. is 0.2.1

This is the error: [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.4D401F, -1, null, [1280, 720, 29.97003], [-1, -1]), format_supported=YES, null, null)

The video is played sometimes.

Thank you in advance!

mgarciareimers avatar Feb 13 '24 19:02 mgarciareimers