danylovolokh/VideoPlayerManager

Play Youtube video url?

Opened this issue · 6 comments

I got issues like MediaPlayer﹕ error (1, -2147483648) and MediaPlayerWrapperImpl@1111200424﹕ 1106 catch IO exception [java.io.IOException: Prepare failed.: status=0x1] when i try to play the youtube video url in listview using this lib. can i get solution for this issue?

IOException means that there is no access to the video source.
Please make sure you are not passing raw link to the youtube.com/example_123 because it's not a source.

Can you please tell which youtube url we need to pass in order to play youtube videos.
I am passing this url www.youtube.com/embed/GYFDRoJtfGM?wmode=opaque&autoplay=1
and it is giving error in this.
Do I need to convert this url in some other format ? Please guide me little bit here.

Thanks a lot for all your help in advanced.

You cannot get source url from youtube url.
You have to parse the html. You can retrieve it using VLC media player.
http://www.groovypost.com/howto/download-youtube-vlc/

Google is not stupid. If you get a url to the source, you can play videos without advertisement, that's why it is hidden.

Also, they've provided youtube api with their own player for this purpose.
I recommend you to drop the idea because even if you find the way to get youtube source url in your app, you can easily be blocked by Android Play Store.
https://developers.google.com/youtube/android/player/

Cheers.

I want to play YoutubeVideo into Recyclerview but the problem is when I am using YoutubeAndroidplayer for that, RecylerView becomes so heavy and sometimes it plays the same video in every Card of RecyclerView. Please help

cnmao commented

I got issues like MediaPlayer﹕ error (1, -2147483648) and MediaPlayerWrapperImpl@1111200424﹕ 1106 catch IO exception [java.io.IOException: Prepare failed.: status=0x1] when i try to play the youtube video url in listview using this lib. can i get solution for this issue?

how could you load web video ?
help me