第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"? ...
随机推荐
- 组件之间的数据传递--Vuex
安装Vuex: npm install Vuex -S 在main.js中引入 import Vue from 'vue' import App from './App' import Vuex fr ...
- 小R的树(权限题)
解:考场上爆0了...... 回想怎么求两个排列的最长公共子序列. 回想怎么求1~n每个数恰出现两次的两个序列的最长公共子序列.就是每个数替换为它在另一个序列里的出现位置,降序. 所以我们可以把这每个 ...
- 对PDF的操作
PDF是个常见的格式,当我们需要对PDF做操作时,可以主要利用PDFbox和itext.这里主要介绍PDfbox,itext自己去 查找资料.添加pom配置. <dependency> & ...
- 通过锁字符串达到控制并发的效果C#
lock锁的是地址 而.net有内部机制使得相同的字符串内存地址是相同的(new string)除外 下面上实验代码 using System; using System.Collections.Ge ...
- POJ 2240 Arbitrage (Bellman Ford判正环)
Arbitrage Time Limit: 1000MS Memory Limit: 65536K Total Submissions:27167 Accepted: 11440 Descri ...
- 自定义数据类型 typedef
其实就是为数据类型起一个别名. typedef unsigned char AGE; //字符类型AGE x; //等价于 unsigned char x; typedef int * IPointe ...
- 退回win7后无法上网 的解决方法
如果网卡驱动没问题的话,那你是不是装了360安全卫士,如果装了你打开网络和共享中心———更改适配器设置————右键本地连接———属性————把360局域网防护驱动程序前面的对勾去掉然后确定,一般就能解 ...
- PHP操作cookie
1.当只有一个参数的时候,默认是删除,响应报文里面设置了一个过去的时间 setcookie('key2'); 2.当有两个参数的时候,是设置cookie setcookie('key','value1 ...
- mongodb的sql日志
在Yii2中是没有打印出mongodb的sql语句,故借用下log来查看吧. 在网上有说可以使用$model->find()->createCommand()->getRawSql( ...
- day13-(事务&mvc&反射补充)
回顾: jsp: java服务器页面 jsp的脚本 jsp的注释 html注释 java注释 jsp注释 <%-- --%> jsp的指令 page:声明页面一些属性 重要的属性: imp ...