【发布时间】:2012-04-13 04:00:29
【问题描述】:
我正在制作的应用中有一个 YouTubeView,我正在尝试禁用一些正在出现的视频控件,我看到另一个应用这样做,它只显示播放/暂停和全屏图标。我正在渲染的一些视频非常小(200x150),所以洗涤器没用,时间实际上是重叠的。
我正在使用的功能是:
- (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;
}
它可以正常加载和播放,但我只想禁用洗涤器和时间,我试过 ?controls=0 没有运气。
干杯, 院长
【问题讨论】: