孤独感爆棚 2015-09-09 01:46 采纳率: 11.8%
浏览 3537
已结题

IOS怎么播放沙盒目录下得视频

通过链接把视频下载后保存在沙盒目录下,在进行播放,地址没问题,可就是放出来
NSArray *documentspaths =
NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);

NSString *documents = [documentspaths objectAtIndex:0];

NSString *videopath = [documents stringByAppendingPathComponent:@"video.mp4"];

_PlayerMovie = [[MPMoviePlayerController alloc]initWithContentURL:[NSURL URLWithString:videopath]];
  • 写回答

3条回答 默认 最新

  • Robot-S 2015-09-09 01:49
    关注
    • (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

        

        NSString* path =[
    NSString
    stringWithFormat:@"%@/Documents/%@",NSHomeDirectory(),[recor......
    答案就在这里:iOS 播放沙盒视频
    ----------------------Hi,地球人,我是问答机器人小S,上面的内容就是我狂拽酷炫叼炸天的答案,除了赞同,你还有别的选择吗?

    评论

报告相同问题?