【问题标题】:iOS 5 UIWebview not playing video?iOS 5 UIWebview 不播放视频?
【发布时间】:2011-11-17 10:06:50
【问题描述】:

我的应用程序中有一个 UIWebView,它在 iOS 4 中正确播放视频,但在 iOS 5 中不播放。这些是我的视频链接。

1) http://myserverpath/mov015.3gp

    NSURL *url = [NSURL URLWithString:self.selectedVideoUrl];
    NSURLRequest *req = [[NSURLRequest alloc] initWithURL:url];
    [webView loadRequest:req];

我也试过了,但也没用。

    player =[[MPMoviePlayerController alloc] initWithContentURL: url];
    [[player view] setFrame: [self.view bounds]];
    [self.view addSubview: [player view]];
    [player play];

请帮帮我。

【问题讨论】:

  • 从 Mobile-Safari 访问该视频时可以正常播放吗?

标签: iphone ios uiwebview ios5 mpmovieplayercontroller


【解决方案1】:

ios 5 web view 不支持.3gp 扩展文件。我创建了另一个带有 .mov 扩展名的视频,并且可以正常工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-05
    • 1970-01-01
    • 2016-03-29
    • 1970-01-01
    • 1970-01-01
    • 2013-06-14
    • 2016-02-03
    相关资源
    最近更新 更多