newtaDev / pod_player

Video player for flutter web & mobile devices, Play video from youtube or vimeo or network in flutter using pod player
https://pub.dev/packages/pod_player
MIT License
102 stars 177 forks source link

Error while playing video(issue) #140

Open Rassel98 opened 1 year ago

Rassel98 commented 1 year ago

I am using this package for playing YouTube URL video.

at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412) E/ExoPlayerImplInternal(12691): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) E/ExoPlayerImplInternal(12691): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) E/ExoPlayerImplInternal(12691): at java.lang.Thread.run(Thread.java:764)

[POD] ERROR ON POD_PLAYER: PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: Source error, null, null)

[POD] [#eef56] Pod Player Controller failed to initialize

E/flutter (12691): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: Source error, null, null)

E/flutter (12691): #0 PodPlayerController._checkAndWaitTillInitialized (package:pod_player/src/controllers/pod_player_controller.dart:73:9) E/flutter (12691): #1 PodPlayerController._checkAndWaitTillInitialized (package:pod_player/src/controllers/pod_player_controller.dart:82:11) E/flutter (12691):

in console its show exception and in UI its show Error while playing video.

Joseph-Nathan commented 1 year ago

me too !

GeorgeReda commented 1 year ago

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.

Rassel98 commented 1 year ago

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.

Thanks for give me a solution @GeorgeReda

fellipetav commented 1 year ago

I got the same problem here. I'm gonna try upgrade the packages and point to George's fork.

fellipetav commented 1 year ago

I'm sorry if it's not an elegant solution, but it can help others.

The team here achieved a solution changing to https://pub.dev/packages/youtube_player_flutter . We were too late regarding the pod_player version in our project. Upgrading it required too much work to fix libs conflicts.

After change to that other lib, pointing to the exactly same youtube URL, it worked well.

spn107 commented 12 months ago

I have update the package but still getiing same error. Is there any solution?