我正在制作一个应用程序中的YouTubeView,并试图禁用一些正在出现的视频控件,我看到另一个应用程序在它只显示播放/暂停和全屏图标。我渲染的一些视频非常小(200x150),因此洗涤器无用,时间实际上与自身重叠。从UIWebView中嵌入的YouTube视频中删除Scrubber和时间戳
我使用的功能是:
- (YouTubeView *)initWithStringAsYouTubeId:(NSString *)idString frame:(CGRect)frame;
{
if (self = [super init])
{
self.frame = frame;
self.delegate = self;
// HTML to embed YouTube video
NSString *embedHTML = @"\
<html><head>\
<style type=\"text/css\">\
body {\
background-color: transparent;\
color: transparent;\
}\
</style>\
</head><body style=\"margin:0\">\
<embed id=\"yt\" src=\"http://www.youtube.com/v/%@\" type=\"application/x-shockwave-flash\" \
width=\"%0.0f\" height=\"%0.0f\"></embed>\
</body></html>";
// Populate HTML with the URL and requested frame size
NSLog(@"%f", frame.size.height);
NSString *html = [NSString stringWithFormat:embedHTML, idString, frame.size.width, (frame.size.height*-1.0f)];
// Load the html into the webview
[self loadHTMLString:html baseURL:nil];
}
return self;
}
加载和播放罚款,但我只是想禁用洗涤和时间,我曾尝试控制= 0,没有运气?
干杯, 院长
据我所知你不能在MPMoviePlayerController中使用YouTube视频 – Dean 2012-03-29 23:05:18