從本地工程中獲取:
NSString *urlStr= [[NSBundle mainBundle] pathForResource:@"1" ofType:@"mp4"];
NSURL *url=[NSURL fileURLWithPath:urlStr];
從網(wǎng)絡(luò)接口中獲取:
NSString *urlStr= [NSString stringWithFormat:@"http://192.168.1.161.mp4"];
NSURL *url=[NSURL URLWithString:urlStr];