Я играю видео в своем приложении, и я хочу контролировать видео, как полноэкранный режим, и играть в функции моего собственного IBAction, возможно ли это?Как управлять видео Youtube через IBAction
мой код
- (void)embedYouTube:(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 *html = [NSString stringWithFormat:embedHTML, urlString, frame.size.width, frame.size.height];
webView = [[UIWebView alloc] initWithFrame:frame];
[webView loadHTMLString:html baseURL:nil];
[self.view addSubview:webView];
[self.view bringSubviewToFront:tvImg];
[self.view bringSubviewToFront:btnBack];
[self.view bringSubviewToFront:btnPlay];
[self.view bringSubviewToFront:btnVol];
[self.view bringSubviewToFront:btnFullScreen];
[self.view bringSubviewToFront:btnFav];
}
и я зову его в viewDidLoad