草庐IT

iphone - 播放 : Playing a Movie from MPMoviePlayerController results in only audio being streamed to Apple tv

coder 2023-09-30 原文

设置 Airplay 非常简单。

 self.moviePlayer = [[[MPMoviePlayerViewController alloc] initWithContentURL:url] autorelease];
 [self.moviePlayer setAllowsAirPlay:YES];

但是,当我尝试播放视频时,只有音频流式传输。视频继续在 iPad 上播放。 此外,Airplay 控件仅在源列表中显示“仅音频”图标。 (见照片)。

这让我觉得 iOS“认为”只有音频在播放。 我的设备上还有其他几个带有 Airplay 的应用程序,它们运行正常。我已经打开和关闭 Apple TV 和 iPad。 iPad 和 Apple tv 都安装了最新的操作系统。视频正在逐步下载,但它在 iPad 上播放完美。 有什么想法吗?

最佳答案

播放 Supported formats包括(通过 Apple):

  • 带 AAC 音频 HTTP 的 H.264 视频
  • 流媒体,直播和点播
  • 渐进式下载内容
  • 本地内容

对于基于网络的内容,您可以在 QuickTime 插件或 HTML5 视频元素中启用 AirPlay 视频,如下所示:

QT插件:

airplay="allow"
airplay="deny" (Default)
For example: <embed src="movie.mov" width="320" height="240" airplay="allow">

HTML5 视频元素:

x-webkit-airplay="allow"
x-webkit-airplay="deny" (Default)

关于iphone - 播放 : Playing a Movie from MPMoviePlayerController results in only audio being streamed to Apple tv,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5665336/

有关iphone - 播放 : Playing a Movie from MPMoviePlayerController results in only audio being streamed to Apple tv的更多相关文章

随机推荐