2014-01-17 61 views
0

應用在播放時崩潰youtube全屏模式下的視頻。 它內嵌UIWebView嵌入在viewController模態地提供rootViewControllerwindowiOS應用 - youtube視頻iOS7

如何解決這個問題?

謝謝。

+0

嗨,你可以參考這個 http://stackoverflow.com/questions/11555502/youtube-embedded-in- uiwebview-causes-crash-on-ipad-when-enter-full-screen 謝謝 – Harunmughal

回答

0

由於缺乏聲譽,我無法評論。你能告訴我們一些代碼你是如何做到這一點的。 我做它像這樣,它工作正常,我用MoviePlayer:

NSString *youTubeURL = @"https://www.youtube.com/v/VCTen3-B8GU"; 

    NSMutableString *html = [[NSMutableString alloc] initWithCapacity:1]; 
    [html appendString:@"<html><head>"]; 
    [html appendString:@"<style type=\"text/css\">"]; 
    [html appendString:@"body {"]; 
    [html appendString:@"background-color: transparent;"]; 
    [html appendString:@"color: white;"]; 
    [html appendString:@"}"]; 
    [html appendString:@"</style>"]; 
    [html appendString:@"</head><body style=\"margin:0\">"]; 
    [html appendFormat:@"<embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\"", youTubeURL]; 
    [html appendFormat:@"width=\"%0.0d\" height=\"%0.0d\"></embed>", 320, 200]; 
    [html appendString:@"</body></html>"]; 

    [self.view loadHTMLString:html baseURL:nil];