第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"? ...
随机推荐
- return break continue的区别 js java
return :结束函数的执行, return后面的所有代码都不再执行 break: 结束循环, 执行循环后面的代码(如果有的话) continue: 结束本次循环, 循环变量继续递增或递减, 开始下 ...
- [hdu5215][Cycle]
题目链接 思路 首先可以通过二分图染色找到奇环和一部分偶环.这个比较简单 但是还有一种偶环容易忽略. 如图(别问我为啥没节点4) 第一次可以找到1-2-3-1)这个奇环,第二次可以找到(3-5-6-3 ...
- linux系统调用之进程控制
1 进程控制: fork 创建一 ...
- RedisDesktopManager如何使用命令行?
RedisDesktopManager如何使用命令行? 解决方法: 1.右键某个redis链接,如果还没创建连接,请参考:http://yayihouse.com/yayishuwu/chapter/ ...
- id选择器为变量时
使用angularjs或者freemarker的同学基本都接触过一个问题:当使用list遍历数组值显示在页面,并要对所显示的数值进行操作时,如何选取数值所在标签? 以下是一个把地址id转为中文地址的函 ...
- day15-ajax和jquery
回顾: 分页: 将数据按照页码划分,提高用户的体验度. 分类: 逻辑分页:一次性将内容加载到内存(list),获取自己想要的数据 sublist截取.缺点:维护起来麻烦 物理分页:(经常使用) 每次只 ...
- 基于TC做流量控制
1 模拟延迟传输简介 netem 与 tc: netem 是 Linux 2.6 及以上内核版本提供的一个网络模拟功能模块.该功能模块可以用来在性能良好的局域网中,模拟出复杂的互联网传输性能,诸如低带 ...
- angular 中如果表单有相同的name一般会出现如下错误
Unhandled Promise rejection Cannot assign to a reference or variable
- 利用jieba,word2vec,LR进行搜狐新闻文本分类
一.简介 1)jieba 中文叫做结巴,是一款中文分词工具,https://github.com/fxsjy/jieba 2)word2vec 单词向量化工具,https://radimrehurek ...
- C++回顾day01---<const常量重点>
一:定义常整型数 const int a;(或者int const a;) 不涉及指针 不可改变值(也不可通过指针修改) 二:定义一个指向常整型数的指针 const int* c; 可改指针指向 ...