i started use this package: https://pub.dev/packages/video_player. But me need use this package for showing video from YouTube videos, how can i do this, cuz default ulr from YouTube not working?
Asked
Active
Viewed 2,923 times
1 Answers
8
You can't use the video_player plugin for playing YouTube videos. It doesn't support that. You can play videos from network but it should be video (ends with a valid extension). YouTube videos are different.
You need to use something like youtube_player_flutter, or youtube_explode_dart. You can search other plugins on pub for this as well.
-
1Okay thank you. These packages (what you sent) can they play videos from different url or just youtube? – sumseflut Nov 27 '20 at 14:06
-
1You're welcome. Those can only play youtube videos. – Nov 27 '20 at 14:19
-
1I highly DO NOT recommend you use youtube_player_flutter. It does not compatible with old android versions (below 11) to give you fresh view, I do highly recommend you this one: [youtube_player_iframe](https://pub.dev/packages/youtube_player_iframe) – Nikita Shadkov Aug 10 '23 at 15:20