从本地工程中获取:
NSString *urlStr= [[NSBundle mainBundle] pathForResource:@"1" ofType:@"mp4"];
NSURL *url=[NSURL fileURLWithPath:urlStr];
从网络接口中获取:
NSString *urlStr= [NSString stringWithFormat:@"http://192.168.1.161.mp4"];
NSURL *url=[NSURL URLWithString:urlStr];
网友评论