是否可以使用 iOS AVPlayer 不使用 ffmpeg 播放远程 mp4?

Is it possible playing remote mp4 with iOS AVPlayer NOT using ffmpeg?

在我的项目中,我使用 ffmpeg 库进行 udp 流式传输或远程播放 mp4 视频文件。

不过平时我也用AVPlayerhttps://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVPlayer_Class/index.html来播放mp4或者phasset

是否可以或有人可以使用 AVPlayer 播放远程 mp4 视频?

如果不可能,你能为我解释一下为什么吗?

谢谢。

已解决

正如@Andrey 提到的那样,这是可能的。我使用了 https://developer.apple.com/library/ios/samplecode/AVPlayerDemo/History/History.html#//apple_ref/doc/uid/DTS40010101-RevisionHistory-DontLinkElementID_1 示例代码。

完全可以用AVPlayer播放远程mp4。只需在 AVPlayer 实例中提供 url 即可。