diff --git a/demo/KSYHTTPCacheDemo/Info.plist b/demo/KSYHTTPCacheDemo/Info.plist
index 66d11b8..e502b75 100644
--- a/demo/KSYHTTPCacheDemo/Info.plist
+++ b/demo/KSYHTTPCacheDemo/Info.plist
@@ -17,9 +17,9 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.2.2
+ 1.2.3
CFBundleVersion
- 1.2.2.1
+ 1.2.3.0
LSRequiresIPhoneOS
NSAppTransportSecurity
diff --git a/demo/KSYHTTPCacheDemo/KSYPlayerVC.h b/demo/KSYHTTPCacheDemo/KSYPlayerVC.h
index 7b50318..bb8ddfb 100644
--- a/demo/KSYHTTPCacheDemo/KSYPlayerVC.h
+++ b/demo/KSYHTTPCacheDemo/KSYPlayerVC.h
@@ -6,11 +6,9 @@
// Copyright (c) 2015 qyvideo. All rights reserved.
//
#import
-#if USING_DYNAMIC_FRAMEWORK
-#import
-#else
+
#import
-#endif
+
@interface KSYPlayerVC : UIViewController
- (instancetype)initWithURL:(NSURL *)url;
@end
diff --git a/demo/KSYHTTPCacheDemo/KSYPlayerVC.m b/demo/KSYHTTPCacheDemo/KSYPlayerVC.m
index ffce00a..7694521 100644
--- a/demo/KSYHTTPCacheDemo/KSYPlayerVC.m
+++ b/demo/KSYHTTPCacheDemo/KSYPlayerVC.m
@@ -495,25 +495,6 @@ - (void)initPlayerWithURL:(NSURL *)aURL {
NSLog(@"logJson is %@",logJson);
};
-#if 0
- _player.videoDataBlock = ^(CMSampleBufferRef sampleBuffer){
- CMItemCount count;
- CMSampleTimingInfo timing_info;
- OSErr ret = CMSampleBufferGetOutputSampleTimingInfoArray(sampleBuffer, 1, &timing_info, &count);
- if ( ret == noErr) {
- NSLog(@"video Pts %d %lld", timing_info.presentationTimeStamp.timescale, timing_info.presentationTimeStamp.value );
- }
- };
-
- _player.audioDataBlock = ^(CMSampleBufferRef sampleBuffer){
- CMItemCount count;
- CMSampleTimingInfo timing_info;
- OSErr ret = CMSampleBufferGetOutputSampleTimingInfoArray(sampleBuffer, 1, &timing_info, &count);
- if ( ret == noErr) {
- NSLog(@"audio Pts %d %lld", timing_info.presentationTimeStamp.timescale, timing_info.presentationTimeStamp.value );
- }
- };
-#endif
stat.text = [NSString stringWithFormat:@"url %@", aURL];
_player.controlStyle = MPMovieControlStyleNone;
[_player.view setFrame: videoView.bounds]; // player's frame must match parent's
diff --git a/demo/KSYHTTPCacheDemo/SamplesViewController.m b/demo/KSYHTTPCacheDemo/SamplesViewController.m
index bf553ef..00520e5 100644
--- a/demo/KSYHTTPCacheDemo/SamplesViewController.m
+++ b/demo/KSYHTTPCacheDemo/SamplesViewController.m
@@ -37,13 +37,6 @@ - (void)viewDidLoad {
[self initTableView];
}
--(NSMutableArray*)getNameAndProxyUrl:(NSString*)url {
- NSMutableArray* array = [[NSMutableArray alloc] init];
- [array addObject:[url lastPathComponent]];
- [array addObject: [[KSYHTTPProxyService sharedInstance] getProxyUrl:url]];
- return array;
-}
-
-(NSMutableArray*)getNameAndUrl:(NSString*)url {
NSMutableArray* array = [[NSMutableArray alloc] init];
[array addObject:[url lastPathComponent]];
@@ -60,15 +53,13 @@ - (ShowFileDownloader *)downloaderManager {
-(void)initTableView {
NSMutableArray *sampleList = [[NSMutableArray alloc] init];
- [sampleList addObject:[self getNameAndProxyUrl:@"http://ks3-cn-beijing.ksyun.com/mobile/S09E20.mp4"]];
-
- [sampleList addObject:[self getNameAndProxyUrl:@"http://lavaweb-10015286.video.myqcloud.com/hong-song-mei-gui-mu-2.mp4"]];
-
- [sampleList addObject:[self getNameAndProxyUrl:@"https://mvvideo5.meitudata.com/571090934cea5517.mp4"]];
- [sampleList addObject:[self getNameAndProxyUrl:@"http://lavaweb-10015286.video.myqcloud.com/lava-guitar-creation-2.mp4"]];
- [sampleList addObject:[self getNameAndProxyUrl:@"http://lavaweb-10015286.video.myqcloud.com/ideal-pick-2.mp4"]];
- [sampleList addObject:[self getNameAndProxyUrl:@"http://120.25.226.186:32812/resources/videos/minion_01.mp4"]];
- [sampleList addObject:[self getNameAndProxyUrl:@"http://120.25.226.186:32812/resources/videos/minion_04.mp4"]];
+ [sampleList addObject:[self getNameAndUrl:@"http://ks3-cn-beijing.ksyun.com/mobile/S09E20.mp4"]];
+ [sampleList addObject:[self getNameAndUrl:@"http://lavaweb-10015286.video.myqcloud.com/hong-song-mei-gui-mu-2.mp4"]];
+ [sampleList addObject:[self getNameAndUrl:@"https://mvvideo5.meitudata.com/571090934cea5517.mp4"]];
+ [sampleList addObject:[self getNameAndUrl:@"http://lavaweb-10015286.video.myqcloud.com/lava-guitar-creation-2.mp4"]];
+ [sampleList addObject:[self getNameAndUrl:@"http://lavaweb-10015286.video.myqcloud.com/ideal-pick-2.mp4"]];
+ [sampleList addObject:[self getNameAndUrl:@"http://120.25.226.186:32812/resources/videos/minion_01.mp4"]];
+ [sampleList addObject:[self getNameAndUrl:@"http://120.25.226.186:32812/resources/videos/minion_04.mp4"]];
self.sampleList_withhttpcache = sampleList;
NSMutableArray *sampleList2 = [[NSMutableArray alloc] init];
@@ -187,18 +178,9 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
}
if (section == 0) {
- NSString *local = @"http://127.0.0.1:8123/";
- NSString *originalUrlStr = nil;
NSString *httpServerUrlStr = [item[1] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
- if (httpServerUrlStr.length > [local length]) {
- originalUrlStr = [httpServerUrlStr substringFromIndex:local.length];
- }
- if (![originalUrlStr hasPrefix:@"http://"] && ![originalUrlStr hasPrefix:@"https://"]) {
- return;
- }
-
__weak typeof(self) weakSelf = self;
- [self.downloaderManager showDownloaderHandlerForUrl:originalUrlStr onViewController:self progressBlock:^(float progress) {
+ [self.downloaderManager showDownloaderHandlerForUrl:httpServerUrlStr onViewController:self progressBlock:^(float progress) {
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
UILabel *progressLab = [cell.contentView viewWithTag:100021];
if ((NSInteger)(progress * 10000) > 10000) {
@@ -207,7 +189,8 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
progressLab.text = [NSString stringWithFormat:@"%f", progress];
} playerBlock:^{
__strong typeof(weakSelf) strongSelf = weakSelf;
- [strongSelf presentViewController:[[KSYPlayerVC alloc] initWithURL:[NSURL URLWithString:httpServerUrlStr]] animated:YES completion:nil];
+ NSString* proxyUrlString = [[KSYHTTPProxyService sharedInstance]getProxyUrl:httpServerUrlStr];
+ [strongSelf presentViewController:[[KSYPlayerVC alloc] initWithURL:[NSURL URLWithString:proxyUrlString]] animated:YES completion:nil];
}];
} else {
NSURL *url = [NSURL URLWithString:[item[1] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
diff --git a/doc/docset-installed.txt b/doc/docset-installed.txt
index 16b3cec..9cf2967 100644
--- a/doc/docset-installed.txt
+++ b/doc/docset-installed.txt
@@ -1,4 +1,4 @@
Documentation set was installed to Xcode!
-Path: /Users/ksyci/Library/Developer/Shared/Documentation/DocSets/com.ksyun.KSYHTTPCacheDemo_iOS.docset
-Time: 2017-11-01 07:25:27 +0000
\ No newline at end of file
+Path: /Users/ksvc/Library/Developer/Shared/Documentation/DocSets/com.ksyun.KSYHTTPCacheDemo_iOS.docset
+Time: 2018-01-11 08:42:56 +0000
\ No newline at end of file
diff --git a/doc/docset/Contents/Info.plist b/doc/docset/Contents/Info.plist
index 8c28db3..2a752e0 100644
--- a/doc/docset/Contents/Info.plist
+++ b/doc/docset/Contents/Info.plist
@@ -29,6 +29,6 @@
DocSetPublisherName
Kingsoft
NSHumanReadableCopyright
- Copyright © 2017 Kingsoft. All rights reserved.
+ Copyright © 2018 Kingsoft. All rights reserved.
diff --git a/doc/docset/Contents/Resources/Documents/Classes/KSYFileDownloader.html b/doc/docset/Contents/Resources/Documents/Classes/KSYFileDownloader.html
index a63206e..7d136bb 100644
--- a/doc/docset/Contents/Resources/Documents/Classes/KSYFileDownloader.html
+++ b/doc/docset/Contents/Resources/Documents/Classes/KSYFileDownloader.html
@@ -346,7 +346,7 @@ Declared In