MPMoviePlayerController 将视频流式传输到 Apple TV

发布于 2024-10-03 11:34:42 字数 294 浏览 0 评论 0原文

由于 Apple TV 发布了新的更新,您可以从任何运行 4.2 的 iOS 设备将视频流式传输到 Apple TV,因此我尝试从我的手机中流式传输视频,该手机使用 MPMoviePlayerController 将视频播放到 Apple TV。播放器显示播放选项,我可以找到 Apple TV,但当我点击时什么也没有发生。所以,只是想知道是否真的可以使用 MPMoviePlayerController 将视频流式传输到苹果电视,或者是否有任何其他我缺少的播放器框架可以做到这一点。如果有人能为我提供一些帮助,我将非常感激。

问候,

安库尔

Since the new update came out for apple tv where you can stream video to it from any iOS device running 4.2, I was trying to stream a video from my phone which uses MPMoviePlayerController to play the video to Apple TV. The player shows the airplay option and I can find Apple TV but when I tap on that nothing happens. So, was just wondering if is it really possible to stream a video using MPMoviePlayerController to apple tv or not or is there any other player framework which I am missing do that. I would really appreciate if someone can provide me with some help on this.

Regards,

Ankur

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

少年亿悲伤 2024-10-10 11:34:42
self.movieController = [[[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:CINDY_PATH]] autorelease];
[movieController setAllowsWirelessPlayback:YES];
movieController.view.frame = self.view.bounds;
[self.view addSubview:movieController.view];

“[movieController setAllowsWirelessPlayback:YES];”行将允许 Airplay 视频,但是,它是一个私有 API,在 AppStore 上不安全...

参考:http://www.tuaw.com/2010/11/24/apple-tv-hacking-spelunking-into-the-airplay-video-服务/

self.movieController = [[[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:CINDY_PATH]] autorelease];
[movieController setAllowsWirelessPlayback:YES];
movieController.view.frame = self.view.bounds;
[self.view addSubview:movieController.view];

The line "[movieController setAllowsWirelessPlayback:YES];" will allow Airplay video, however, it is a private API which is not AppStore safe...

Reference: http://www.tuaw.com/2010/11/24/apple-tv-hacking-spelunking-into-the-airplay-video-service/

扭转时空 2024-10-10 11:34:42

编辑:看来我说得太早了。 AppleTV 更新今天发布。修改后的答案如下:

如果您的 AppleTV 已更新到最新软件,并且您可以从 iPad 上的 iPod 应用程序流式传输视频,则可以通过 AirPlay 进行视频流式传输。不过,据我最近听说,视频流只能通过 iPod 和 YouTube 应用程序运行。我还没有机会亲自测试 AppleTV 更新,因此我无法验证其中任何内容,但如果属实,则意味着您只能在应用程序中从 MPMoviePlayerController 流式传输音频。希望未来能够放宽这一限制。

Edit: Looks like I spoke prematurely. The AppleTV update was released today. A revised answer is below:

If your AppleTV has been updated to the latest software, and you can stream videos from the iPod app on your iPad, then video streaming over AirPlay should work. However, from what I heard recently, video streaming will only work from the iPod and YouTube apps. I have not yet had a chance to test out the AppleTV update myself, so I cannot verify any of this, but if true it means that you are only allowed to stream audio from MPMoviePlayerController in your app. Hopefully this restriction will be relaxed in the future.

尽揽少女心 2024-10-10 11:34:42

我在这里创建了一个应用程序,它将在 iPhone 上拍摄的视频传输到 AppleTV。 http://tinyurl.com/2vewstr

您将需要 SDK 来编译和使用它。

I've created an application here which will stream videos to an AppleTV that have been shot on your iPhone. http://tinyurl.com/2vewstr

You will need the SDK to compile and use it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文