gpt4 book ai didi

iphone - 从 iPhone 保存到服务器的视频不会通过 MPMovieVideo Controller 中的 URL 播放

转载 作者:行者123 更新时间:2023-11-29 13:35:18 25 4
gpt4 key购买 nike

我已将一个中等质量的视频文件从 iPhone 保存到 Google App Engine。该视频使用给定的 URL 在网络上可以正常播放。

http://www.getsplash.com/t/video/wa6Rbzq74WOB

此文件无法在 iPhone 上播放,我只是黑屏。我已经能够很好地播放来自网络的其他 .mov 示例文件,所以据我所知它不是 Objective-C。我想知道 iPhone 存储视频的编码是否与通过 URL 将其拉回不兼容?

我试过为上面的 URL 添加扩展名并将内容类型更改为 video/quicktime 无济于事。

self.moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:@"http://www.getsplash.com/t/video/wa6Rbzq74WOB"]];
moviePlayerController.view.frame = CGRectMake(0, 51, 320, 240);
[scrollView addSubview:moviePlayerController.view];
[moviePlayerController play]

最佳答案

把答案放在这里。结果证明,解决方案是将“.m4v”添加到文件 URL 的末尾,这使 MoviePlayerController 能够播放它。我认为仅依靠文件扩展名是 Windows 的垮台,而不是 Apple 所依赖的东西。我们还最终从 Google Cloud Storage 迁移到 AWS,后者对类型和安全性有更多控制。

关于iphone - 从 iPhone 保存到服务器的视频不会通过 MPMovieVideo Controller 中的 URL 播放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10724617/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com