第26月第28天 avplayer cache
1.urlsession https
- (void)URLSession:(NSURLSession *)session
didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler
{
//AFNetworking中的处理方式
NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling;
__block NSURLCredential *credential = nil;
//判断服务器返回的证书是否是服务器信任的
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
/*disposition:如何处理证书
NSURLSessionAuthChallengePerformDefaultHandling:默认方式处理
NSURLSessionAuthChallengeUseCredential:使用指定的证书 NSURLSessionAuthChallengeCancelAuthenticationChallenge:取消请求
*/
if (credential) {
disposition = NSURLSessionAuthChallengeUseCredential;
} else {
disposition = NSURLSessionAuthChallengePerformDefaultHandling;
}
} else {
disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge;
}
//安装证书
if (completionHandler) {
completionHandler(disposition, credential);
}
}
https://www.jianshu.com/p/4b5d2d47833d
2.avplayer cache
https://github.com/XTShow/XTAudioPlayer/
https://www.jianshu.com/p/c157476474f1
https://github.com/newyjp/JPVideoPlayer
第26月第28天 avplayer cache的更多相关文章
- 第27月第28天 iOS bundle
1. 7.如果将自己打包的bundle给别人使用,别人在打包上传过程中可能会遇到错误提示如: ERROR ITMS-90171: "Invalid Bundle Structure - Th ...
- 第26月第30天 srt
1. ffmpeg -i 0.mp4 -vf subtitles=0.srt 1.mp4 https://jingyan.baidu.com/article/c45ad29c73cef2051653e ...
- 第26月第29天 ffmpeg yasm
1. brew install automake fdk-aac git lame libass libtool libvorbis libvpx \ opus sdl shtool texi2htm ...
- 第26月第26天 Domain=AVFoundationErrorDomain Code=-11850
1. curl -voa http://119.29.108.104:8080/inweb01/kotlin.mp4 -H "Range:bytes=0-1" https://al ...
- 第26月第25天 ubuntu openjdk-8-jdk jretty
1.ubuntu ============== sudo apt-get install openjdk-8-jdk https://blog.csdn.net/zhaohaiyitian88/art ...
- 第26月第23天 nsobject 单例 CFAbsoluteTimeGetCurrent
1.nsobject 单例 sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/ ...
- 第26月第22天 iOS瘦身之armv7 armv7s arm64选用 iOS crash
1.iOS瘦身之armv7 armv7s arm64选用 机器对指令集的支持是向下兼容的,因此armv7的指令集是可以运行在iphone5S以上的,只是效率没那么高而已~ 但是由于苹果要求必须支持ar ...
- 第26月第20天 springboot
--------------------- 1.pom.xml中添加支持web的模块: <dependency> <groupId>org.springframework.bo ...
- 第26月第18天 mybatis_spring_mvc
1. applicationContext.xml 配置文件里最主要的配置: <?xml version="1.0" encoding="utf-8"? ...
随机推荐
- How To Install WildFly as a Service on Linux
Installing WildFly as a service on Linux has multiple advantages like automatic start on system boot ...
- vue--传值
传值:(如果传的是引用类型,当值发生改变时所有绑定他的全都发生改变,如果传的时值类型,就只有他自己发生改变) 父传子: 父页面:父组件定义一个属性 users:[ {name:'张三',positio ...
- gevent多协程运用
#导包 import gevent #猴子补丁 from gevent import monkey monkey.patch_all() from d8_db import ConnectMysql ...
- MySQL 之 库操作,表操作
系统数据库 information_schema :虚拟库,不占用磁盘空间,存储的是数据库启动后的一些参数,如用户表信息.列信息.权限信息.字符信息等 mysql:核心数据库,里面包含用户.权限.关键 ...
- eclipse安装activiti 工作流插件
记录一下下eclipse集成activiti插件的过程. eclipse的版本信息为:Version: Mars.1 Release 1 (4.5.1) 下面就开始介绍下如何安装activiti插件. ...
- 第三十三节,目标检测之选择性搜索-Selective Search
在基于深度学习的目标检测算法的综述 那一节中我们提到基于区域提名的目标检测中广泛使用的选择性搜索算法.并且该算法后来被应用到了R-CNN,SPP-Net,Fast R-CNN中.因此我认为还是有研究的 ...
- mfc 中的error RC2104 : undefined keyword or key name
http://bbs.csdn.net/topics/340253236 需要在此文件中添加该按钮 声明一下. 但是在resource.h中已经定义了:#define IDC_ETHCONF_CHKP ...
- (map 并查集) codeVs 2639 约会计划
题目描述 Description cc是个超级帅哥,口才又好,rp极高(这句话似乎降rp),又非常的幽默,所以很多mm都跟他关系不错.然而,最关键的是,cc能够很好的调解各各妹妹间的关系.mm之间的关 ...
- linux服务器,发现大量TIME_WAIT
linux服务器,发现大量TIME_WAIT 今天登陆linux服务器,发现大量TIME_WAIT参考资料:http://coolnull.com/3605.html 酷喃|coolnull| » 大 ...
- JavaSE_坚持读源码_String对象_Java1.7
/** * Compares this string to the specified object. The result is {@code * true} if and only if the ...