how to play youtube videos?

All your problems with Audio, Video and Images.

how to play youtube videos?

Postby atul_bangs » Tue Apr 06, 2010 7:21 am

i want to play youtube videos in my android can application.
everytime i m getting an error PVMFCorrupt.
can anybody tell me what is the reason.
android rocks
atul_bangs
Freshman
Freshman
 
Posts: 4
Joined: Mon Apr 05, 2010 3:20 pm
Location: india

Top

Postby vik » Tue Apr 06, 2010 8:54 am

the link you are using for youtube video that can be wrong i think
User avatar
vik
Senior Developer
Senior Developer
 
Posts: 141
Joined: Wed Sep 09, 2009 7:32 am

Postby muneshs » Wed Apr 07, 2010 8:14 am

first i want to see ur coding to run youtube vidio. after that i cn suggetst you..
send ur coding ...
Sharma M.
muneshs
Junior Developer
Junior Developer
 
Posts: 14
Joined: Wed Mar 10, 2010 9:08 am
Location: india

Postby atul_bangs » Thu Apr 08, 2010 2:36 pm

here is my simple code. please suggest as early as possible


public class YoutubeActivity extends Activity {
/** Called when the activity is first created. */
VideoView videoView;
MediaController mediacontrols;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
videoView = new VideoView(this);
setContentView(videoView);
mediacontrols = new MediaController(this);
videoView.setVideoURI(Uri.parse("http://gdata.youtube.com/feeds/projection/videos?v=2"));
// startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("http://www.youtube.com/watch?v=jWO5MO8z4ks")));
videoView.setMediaController(mediacontrols);
}
}
android rocks
atul_bangs
Freshman
Freshman
 
Posts: 4
Joined: Mon Apr 05, 2010 3:20 pm
Location: india

Re: how to play youtube videos?

Postby shubh » Sat Jun 04, 2011 2:07 pm

You should use it like : http://gdata.youtube.com/feeds/api/videos?author="UserName"

Data Types

Youtube API offers depending on how the data are available. Request the feed URL for projection specify whether you want to return any portion of the data.

http://gdata.youtube.com/feeds/ projection /videos
Currently, projection has been prepared two types.One is 1) api and 2) base .
1) api : yt schema and returns data media containing all the elements and schema extensions. All property is text. Typically used here.

2) base : Returns the data element was removed several extensions. Property and property summary HTML content is included. Such as when to load and use a feed reader.


For example, a simple application to display the search results to get the formatted data containing HTML is specified as follows. http://gdata.youtube.com/feeds/ base /videos

You people can get more ideas from here : http://tinyurl.com/6yl8grv
Thank in Advance
User avatar
shubh
Experienced Developer
Experienced Developer
 
Posts: 83
Joined: Tue May 18, 2010 7:17 am
Location: India

Re: how to play youtube videos?

Postby Neo Design » Thu Jun 23, 2011 12:51 pm

I think you need to have flash player for android. You can get it from Android Market. You tube 2.1 for android. Thanks.
Neo Design
Junior Developer
Junior Developer
 
Posts: 12
Joined: Tue Jun 07, 2011 10:27 am

Top

Re: how to play youtube videos?

Postby thenewday007 » Wed Oct 05, 2011 9:12 am

Hi,I'm new here.This forum is very interesting that I like it very much.

buy aion kinah | buy wow gold eu | wow gold for sale
thenewday007
Freshman
Freshman
 
Posts: 5
Joined: Wed Oct 05, 2011 8:42 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 16 guests