Media player using YouTube?

后端 未结 3 1185
走了就别回头了
走了就别回头了 2020-12-05 21:12

I am developing a sample application using MediaPlayer.By using the raw resources folder,the video can be played.But I want to play through URL.How

3条回答
  •  有刺的猬
    2020-12-05 21:59

    You have to rtsp links from gdata api :gdata api with this: http://gdata.youtube.com/feeds/api/videos?&max-results=20&v=2&format=1&q="+ URLEncoder.encode(activity.criteria)

    Element rsp = (Element)entry.getElementsByTagName("media:content").item(1);
    
                                  String anotherurl=rsp.getAttribute("url");
    

    In gdata api only we are getting this type of links : rtsp://v3.cache7.c.youtube.com/CiILENy73wIaGQlOCTh0GvUeYRMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp

    These are playing in VideoView.

    My answer link :RTSP Links

提交回复
热议问题