Hi!
I would like to make an app using the youtube.
I could make the youtube player using the webView.
But I have a problem to show the messages on the youtube player view when the youtube movie is full on the screen.
I would like to make appear some buttons and show messages on the youtube player.
I want to know about two things.
1. What's the view controller of the youtube player?
2. Is the youtube movie played by the MPMoviePlayerController?
Here is my code:
#import "YouTubePlayViewController.h"
@implementation YouTubePlayViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self playYouTube:@"http://www.youtube.com/watch?v=QOfpo5daPCA" frame:CGRectMake(10, 10, 300, 200)];
NSLog(@"%@", self.view);
}
- (void)playYouTube

NSString *)urlString frame

CGRect)frame{
NSString *embedHTML = @"\
<html><head>\
<style type=\"text/css\">\
body {\
background-color: transparent;\
color: white;\
}\
</style>\
</head><body style=\"margin:0\">\
<embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \
width=\"%0.0f\" height=\"%0.0f\"></embed>\
</body></html>";
NSString *htmlString = [NSString stringWithFormat:embedHTML, urlString, frame.size.width, frame.size.height];
UIWebView *videoView = [[UIWebView alloc] initWithFrame:frame];
[videoView loadHTMLString:htmlString baseURL:nil];
[self.view addSubview:videoView];
[videoView release];
}
- (void)dealloc {
[super dealloc];
}
@end
I hope to get some information about this!
Thanks for reading!