Note that there are some explanatory texts on larger screens.

plurals
  1. POPlay High-Quality Youtube Videos Using VideoView
    primarykey
    data
    text
    <p>I'm working on a music APP that displays lyrics and info about songs and also plays songs from a youtube URL.</p> <p>In my activity, there are some TextViews (for the lyrics/info) and one VideoView (for the youtube link).</p> <p>I've created a class called YoutubeVideo, that does the following:</p> <ol> <li>Downloads the content of this page: <a href="http://gdata.youtube.com/feeds/api/videos?q=SONG_NAME&amp;v=2&amp;max-results=1">http://gdata.youtube.com/feeds/api/videos?q=SONG_NAME&amp;v=2&amp;max-results=1</a>, parses it's content and gets the youtube's id (e.g <strong>EvuL5jyCHOw</strong>). This is a RSS feeds page that searches for videos and display 1 result (And all I need to do is to change the query).</li> <li>Downloads the content of this page: <a href="http://gdata.youtube.com/feeds/api/videos?q=YOUTUBES_ID&amp;format=1&amp;alt=json">http://gdata.youtube.com/feeds/api/videos?q=YOUTUBES_ID&amp;format=1&amp;alt=json</a>, parses it's content and gets the rtsp (e.g <strong>rtsp://v7.cache3...3gp</strong>). This is an XML file that holds some information about the video (name, length, thumbnail and of course - rtsp link :).</li> <li>Than all I need to do is to set the rtsp as VideoURI: <code>VideoView.setVideoURI(Uri.parse(rtsp))</code> and the video is being played.</li> </ol> <p>If you wonder, I use this class like that: <code>new YoutubeVideo(VideoView).setVideo(artist + " " + title);</code></p> <p><strong>It works, but I got one problem: It's a 3gp file... Which has really bad quality. How can I get better quality urls? (mp4/flv/ect?)</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload