问题描述
我尝试了两种方法
[GCDWebServerResponse responseWithRedirect:[NSURL URLWithString:@"http://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4"] permanent:NO]
和
NSData *responseData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&urlResponse error:&error];
return [GCDWebServerDataResponse responseWithData:responseData contentType:[urlResponse.allHeaderFields valueForKey:@"Content-Type"]];
avplayer代码
asset = [AVURLAsset URLAssetWithURL:[NSURL URLWithString:@"http://localhost:8888"] options:nil];
它可以在MAC浏览器中播放,但不能在avplayer中播放。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)