第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"? ...
随机推荐
- 【CF242E】Xor Segment
题目大意:给定一个长度为 N 的序列,支持两种询问,即:区间异或,区间求和. 题解:加深了对线段树的理解. 对于线段树维护的变量一定是易于 modify 的,对于查询的答案只需用维护的东西进行组合而成 ...
- 第十八篇-Spinner下拉列表的使用
效果图 MainActivity.java package com.example.aimee.spinnertest; import android.support.v7.app.AppCompat ...
- 彻底删除与安装MySQL
一.下载msi安装版:https://dev.mysql.com/downloads/mysql/ 二.安装前一定要彻底删除已有的MySQL:(从未安装过,忽略此步) 1.计算机处右键快捷菜单,管理, ...
- 利用/dev/urandom文件创建随机数
1:/dev/urandom和/dev/random是什么 这两个文件记录Linux下的熵池,所谓熵池就是当前系统下的环境噪音,描述了一个系统的混乱程度,环境噪音由这几个方面组成,如内存的使用,文件的 ...
- MySQL数据库服务器整体规划(思路与步骤)
MySQL数据库服务器整体规划(思路与步骤) 参考资料: http://blog.51cto.com/zhilight/1630611 我们在搭建MySQL数据库服务器的开始阶段就合理的规划,可以避免 ...
- 2017-12-14python全栈9期第一天第六节之用户交互
9,用户交互.input 1,等待输入, 2,将你输入的内容赋值给了前面变量. 3,input出来的数据类型全部是str 10,基础数据类型初始.数字:int 12,3,45 + - * / ** % ...
- 【MSSQL】SQL Server 设置用户只能查看并访问特定数据库
#背景 SQL Server实例上有多个服务商的数据库,每个数据库要由各自的服务商进行维护, 为了限定不同服务商商的维护人员只能访问自己的数据库,且不能看到其他服务商的数据库,现需要给各个服务商商限定 ...
- Jsp语法九大内置对象和四大作用域
一.JSP 原理:JSP其实就是一个servlet. Servlet负责业务逻辑处理,JSP只负责显示.开发中,JSP中不能有一行JAVA代码 二.JSP语法 1. JSP模板元素:JSP中HTML标 ...
- Django之组件--cookie与session
cookie组件 cookie:由服务器产生,存放在客户端浏览器上的键值对. 使用: -设置值: obj=HttpResponse('ok') obj.set_cookie('key','value' ...
- IQueryable & IEnumberable 区别
Namespace And Inheritances Relations ? 1 2 3 4 5 6 7 8 9 Namespace: System.Collections [ComVisib ...