【问题标题】:video embedded on a link not working on UIWebview with iOS6 simulator or device嵌入在链接上的视频不适用于 iOS6 模拟器或设备的 UIWebview
【发布时间】:2012-12-18 17:08:27
【问题描述】:

iOS 6 webview 是否存在呈现视频的问题? :(

我的代码是对 webview 的 loadRequest 方法的简单调用:

 self.webview.scalesPageToFit = YES;
[self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=3WEpUAQ7fa8"]]];

cosole 说:

[MPAVController] Autoplay: Enabling autoplay
[MPAVController] Autoplay: Disabling autoplay for pause
[MPAVController] Autoplay: Disabling autoplay
[MPAVController] Autoplay: Ending background task assertion (8) for playback stall
[MPAVController] Autoplay: _streamLikelyToKeepUp: 0 -> 1
[MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 1, on player: 1)

我提到了this answer,但没有成功。

请给出答案。

【问题讨论】:

  • webview,如前所述。
  • 我只能使用 webview,因为我将使用嵌入视频的网页。
  • @Dpk 检查系统偏好设置中的“声音”输入是否设置为内置麦克风以外的其他设置
  • 不是声音,我可以听到视频的声音,即使没有播放视频(全屏崩溃但正在播放音频)

标签: iphone ios video uiwebview ios6


【解决方案1】:

你好,因为你不能使用 MPMoviePlayerController,你必须使用 Webview,而不是使用

self.webview.scalesPageToFit = YES;
[self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=3WEpUAQ7fa8"]]];

Try this way to embed,

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-13
    • 1970-01-01
    相关资源
    最近更新 更多