阅读背景:

我如何使用AVPlayer播放mp4资源?

来源:互联网 

I have included an mp4 resource in my project navigator. I want to play it in an AVPlayer. I know how to create an AVPlayerItem for the AVPlayer object, and so now I'd like to load the appropriate AVAsset into it pointing to my mp4 resource. The problem is that AVAsset only has an assetWithURL: method to create an AVAsset. I want an assetWithName: method, but that method does not exist. How can I play my mp4 file if I don't have a URL for it? If it's not possible to play via name reference, how can I get a file URL for my mp4 file?I have included an mp4 resource in my project n




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: