iOS UIWebView无法播放视频

时间:2013-07-05 14:19:59

标签: ios uiwebview

我有一个条形码扫描应用程序,它使用UIWebView来显示包含URL的条形码。如果网址是针对YouTube视频的,那么我很幸运,如果它可以在20次中使用1次。在带有iOS 6.0.1的iPhone 4S上,如果视频播放,我听不到声音。在带有iOS 6.1.4的iPhone 5上,如果我收到视频,我也会听到声音。

我读到iOS 6可能存在问题并播放全屏视频,所以我实现了UIMoviePlayerControllerDid {Enter / Exit} FullscreenNotification处理程序,我防止在全屏模式下将viewWillDisappear传递给超类。

以下是iPhone 4上没有声音的视频的调试输出:

[MPAVController] Autoplay: Enabling autoplay
[MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 0, on player: 1)
[MPAVController] Autoplay: Enabling autoplay
[MPCloudAssetDownloadController] Prioritization requested for media item ID: 0
[MPAVController] Autoplay: Enabling autoplay
[MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 0, on player: 1)
[MPAVController] Autoplay: _streamLikelyToKeepUp: 0 -> 1
[MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 0, on player: 1)
[MPAVController] Autoplay: Enabling autoplay

如果没有视频或声音,我会在第3次“启用自动播放”后收到以下内容:

Disabling autoplay for route change
Disabling autoplay

0 个答案:

没有答案