如何播放资源库中的视频文件
如何播放资源库中的视频文件?我有类似文件的 URL
"assets-library://asset/asset.MOV?id=1000000023&ext=MOV"
但我无法使用以下代码在媒体播放器中播放此文件:
NSString *urlAddress = @"assets-library://asset/asset.mov?id=1000000023&ext=mov";
NSURL *theURL = [NSURL URLWithString:urlAddress];
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:theURL];
How to play the video file from assets library? I have the URL of file like
"assets-library://asset/asset.MOV?id=1000000023&ext=MOV"
But I am unable to play this file in media player using the following code:
NSString *urlAddress = @"assets-library://asset/asset.mov?id=1000000023&ext=mov";
NSURL *theURL = [NSURL URLWithString:urlAddress];
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:theURL];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也遇到了问题,并找到了解决方案。我使用了以下代码,它对我有用。
urlAddress
是ALAssetsLibrary
的视频的 URL。I was also getting problem, and got the solution. I used the following code and it worked for me. The
urlAddress
is the url for the video byALAssetsLibrary
.