Commit 71d052cc authored by Han Ruisong's avatar Han Ruisong
Browse files

更新到 4.7.0

1.优化SDK解密模块,提升稳定性。
2.新增平台统计功能。
3.调整SDK架构,解决与其他产品线的冲突。
parent c2540542
No preview for this file type
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Bucket <Bucket
uuid = "C71384DB-48D4-4A83-8E55-E58993DDD8D8" uuid = "D493E4A5-FF32-4C5D-B61B-0D88D4BD1AD4"
type = "1" type = "1"
version = "2.0"> version = "2.0">
</Bucket> </Bucket>
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#import "DWVodPlayViewController.h" #import "DWVodPlayViewController.h"
#import "DWDownloadManagerViewController.h" #import "DWDownloadManagerViewController.h"
#import "DWUploadViewController.h" #import "DWUploadViewController.h"
#import "DWVodPlayerSkinViewController.h"
#define VIDEOINFOURL @"https://p.bokecc.com/demo/videoinfo.json" #define VIDEOINFOURL @"https://p.bokecc.com/demo/videoinfo.json"
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#import "DWNetworkMonitorViewController.h" #import "DWNetworkMonitorViewController.h"
#import "DWNetworkMonitor.h" #import "DWNetworkMonitor.h"
#import "Reachability.h"
#import "MBProgressHUD.h" #import "MBProgressHUD.h"
@interface DWNetworkMonitorViewController () @interface DWNetworkMonitorViewController ()
...@@ -29,7 +28,7 @@ ...@@ -29,7 +28,7 @@
@property(nonatomic,strong) NSString * vid; @property(nonatomic,strong) NSString * vid;
//开始网络测试 等等等 状态描述 //开始网络测试 等等等 状态描述
@property(nonatomic,strong) NSString * networkDescription; @property(nonatomic,strong) NSString * networkDescription;
@property(nonatomic,strong) Reachability * reachability; @property(nonatomic,strong) HDReachability * reachability;
@property(nonatomic,strong) NSString * networkStatus; @property(nonatomic,strong) NSString * networkStatus;
@property(nonatomic,strong) NSString * localIP; @property(nonatomic,strong) NSString * localIP;
//@property(nonatomic,strong) NSString * city; //@property(nonatomic,strong) NSString * city;
...@@ -47,20 +46,20 @@ ...@@ -47,20 +46,20 @@
if (self == [super init]) { if (self == [super init]) {
//增加网络状态监听 //增加网络状态监听
self.reachability = [Reachability reachabilityForInternetConnection]; self.reachability = [HDReachability reachabilityForInternetConnection];
[self.reachability startNotifier]; [self.reachability startNotifier];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkStateChange) name:kReachabilityChangedNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkStateChange) name:kHDReachabilityChangedNotification object:nil];
NetworkStatus status = [_reachability currentReachabilityStatus]; HDNetworkStatus status = [_reachability currentReachabilityStatus];
switch (status) { switch (status) {
case NotReachable:{ case HDNotReachable:{
self.networkStatus = @"未知"; self.networkStatus = @"未知";
} }
break; break;
case ReachableViaWiFi:{ case HDReachableViaWiFi:{
self.networkStatus = @"WIFI"; self.networkStatus = @"WIFI";
} }
break; break;
case ReachableViaWWAN:{ case HDReachableViaWWAN:{
self.networkStatus = @"流量"; self.networkStatus = @"流量";
} }
break; break;
...@@ -99,7 +98,7 @@ ...@@ -99,7 +98,7 @@
[self.reachability stopNotifier]; [self.reachability stopNotifier];
self.reachability = nil; self.reachability = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self name:kReachabilityChangedNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:kHDReachabilityChangedNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillResignActiveNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillResignActiveNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil];
...@@ -297,17 +296,17 @@ ...@@ -297,17 +296,17 @@
-(void)networkStateChange -(void)networkStateChange
{ {
NSString * oldStatus = self.networkStatus; NSString * oldStatus = self.networkStatus;
NetworkStatus status = [_reachability currentReachabilityStatus]; HDNetworkStatus status = [_reachability currentReachabilityStatus];
switch (status) { switch (status) {
case NotReachable:{ case HDNotReachable:{
self.networkStatus = @"未知"; self.networkStatus = @"未知";
} }
break; break;
case ReachableViaWiFi:{ case HDReachableViaWiFi:{
self.networkStatus = @"WIFI"; self.networkStatus = @"WIFI";
} }
break; break;
case ReachableViaWWAN:{ case HDReachableViaWWAN:{
self.networkStatus = @"流量"; self.networkStatus = @"流量";
} }
break; break;
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#import <MobileCoreServices/MobileCoreServices.h> #import <MobileCoreServices/MobileCoreServices.h>
#include <AssetsLibrary/AssetsLibrary.h> #include <AssetsLibrary/AssetsLibrary.h>
#import "DWUploadSessionManager.h" #import "DWUploadSessionManager.h"
#import "Reachability.h"
static NSString *const uploadsArray =@"uploadsArray"; static NSString *const uploadsArray =@"uploadsArray";
...@@ -22,7 +21,7 @@ static NSString *const uploadsArray =@"uploadsArray"; ...@@ -22,7 +21,7 @@ static NSString *const uploadsArray =@"uploadsArray";
@property(nonatomic,strong)NSArray * uploadList; @property(nonatomic,strong)NSArray * uploadList;
@property(nonatomic,strong)Reachability * reachability; //网络状态监听 @property(nonatomic,strong)HDReachability * reachability; //网络状态监听
@end @end
...@@ -45,9 +44,9 @@ static NSString *const uploadsArray =@"uploadsArray"; ...@@ -45,9 +44,9 @@ static NSString *const uploadsArray =@"uploadsArray";
[self setUploadingList]; [self setUploadingList];
//增加网络状态监听 //增加网络状态监听
self.reachability = [Reachability reachabilityForInternetConnection]; self.reachability = [HDReachability reachabilityForInternetConnection];
[self.reachability startNotifier]; [self.reachability startNotifier];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkStateChange) name:kReachabilityChangedNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkStateChange) name:kHDReachabilityChangedNotification object:nil];
} }
-(void)setUploadingList -(void)setUploadingList
...@@ -114,7 +113,7 @@ static NSString *const uploadsArray =@"uploadsArray"; ...@@ -114,7 +113,7 @@ static NSString *const uploadsArray =@"uploadsArray";
-(void)dealloc -(void)dealloc
{ {
[self.reachability stopNotifier]; [self.reachability stopNotifier];
[[NSNotificationCenter defaultCenter] removeObserver:self name:kReachabilityChangedNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:kHDReachabilityChangedNotification object:nil];
NSLog(@"DWUploadViewController dealloc"); NSLog(@"DWUploadViewController dealloc");
} }
...@@ -199,18 +198,18 @@ static NSString *const uploadsArray =@"uploadsArray"; ...@@ -199,18 +198,18 @@ static NSString *const uploadsArray =@"uploadsArray";
-(void)networkStateChange -(void)networkStateChange
{ {
NetworkStatus status = [self.reachability currentReachabilityStatus]; HDNetworkStatus status = [self.reachability currentReachabilityStatus];
switch (status) { switch (status) {
case NotReachable:{ case HDNotReachable:{
//暂无网络 //暂无网络
[self suspendOrResumeUploadWithNetwork:NO]; [self suspendOrResumeUploadWithNetwork:NO];
break; break;
} }
case ReachableViaWiFi:{ case HDReachableViaWiFi:{
[self suspendOrResumeUploadWithNetwork:YES]; [self suspendOrResumeUploadWithNetwork:YES];
break; break;
} }
case ReachableViaWWAN:{ case HDReachableViaWWAN:{
[self suspendOrResumeUploadWithNetwork:YES]; [self suspendOrResumeUploadWithNetwork:YES];
break; break;
} }
......
...@@ -74,7 +74,10 @@ typedef enum : NSUInteger { ...@@ -74,7 +74,10 @@ typedef enum : NSUInteger {
playInfo.timeoutSeconds = 30; playInfo.timeoutSeconds = 30;
//音频 + 视频数据,这里仅做示范,可根据自己项目业务逻辑来调整 //音频 + 视频数据,这里仅做示范,可根据自己项目业务逻辑来调整
playInfo.mediatype = @"0"; playInfo.mediatype = @"0";
//开启授权验证功能传入
playInfo.verificationCode = [DWConfigurationManager sharedInstance].verification; playInfo.verificationCode = [DWConfigurationManager sharedInstance].verification;
//客户端用户id,选填
// playInfo.roleId = @"";
playInfo.finishBlock = ^(DWVodVideoModel *vodVideo) { playInfo.finishBlock = ^(DWVodVideoModel *vodVideo) {
NSLog(@"%@",vodVideo); NSLog(@"%@",vodVideo);
//下载时,保存图片,名字等数据 //下载时,保存图片,名字等数据
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#import "DWFeedBackView.h" #import "DWFeedBackView.h"
#import "DWSubtitleView.h" #import "DWSubtitleView.h"
#import "DWMessageView.h" #import "DWMessageView.h"
#import "Reachability.h"
#import <MediaPlayer/MediaPlayer.h> #import <MediaPlayer/MediaPlayer.h>
#import "DWGIFManager.h" #import "DWGIFManager.h"
#import "DWToastView.h" #import "DWToastView.h"
...@@ -123,7 +122,7 @@ ...@@ -123,7 +122,7 @@
@property(nonatomic,assign)CGFloat systemSound;//系统音量 @property(nonatomic,assign)CGFloat systemSound;//系统音量
@property(nonatomic,strong)UISlider * volumeViewSlider; @property(nonatomic,strong)UISlider * volumeViewSlider;
@property(nonatomic,strong)Reachability * reachability; //网络状态监听 @property(nonatomic,strong)HDReachability * reachability; //网络状态监听
@property(nonatomic,strong)DWVodPlayerPanGesture * pan;//亮度,音量,快进快退调节 @property(nonatomic,strong)DWVodPlayerPanGesture * pan;//亮度,音量,快进快退调节
...@@ -190,9 +189,7 @@ ...@@ -190,9 +189,7 @@
//@property(nonatomic,strong)NSTimer * testTimer; //@property(nonatomic,strong)NSTimer * testTimer;
//**************************** marquee **************************** //**************************** marquee ****************************
#if __has_include(<HDMarqueeTool/HDMarqueeTool.h>)
@property(nonatomic,strong)HDMarqueeView * marqueeView; @property(nonatomic,strong)HDMarqueeView * marqueeView;
#endif
//**************************** 弹幕 **************************** //**************************** 弹幕 ****************************
//弹幕数据 //弹幕数据
...@@ -258,9 +255,9 @@ static CGFloat barrageBgHeight = 40; ...@@ -258,9 +255,9 @@ static CGFloat barrageBgHeight = 40;
[self reLayoutWithScreenState:self.isFull]; [self reLayoutWithScreenState:self.isFull];
//增加网络状态监听 //增加网络状态监听
self.reachability = [Reachability reachabilityForInternetConnection]; self.reachability = [HDReachability reachabilityForInternetConnection];
[self.reachability startNotifier]; [self.reachability startNotifier];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkStateChange) name:kReachabilityChangedNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkStateChange) name:kHDReachabilityChangedNotification object:nil];
//开启远程控制 //开启远程控制
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents]; [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
...@@ -307,7 +304,7 @@ static CGFloat barrageBgHeight = 40; ...@@ -307,7 +304,7 @@ static CGFloat barrageBgHeight = 40;
//移除网络监听 //移除网络监听
[self.reachability stopNotifier]; [self.reachability stopNotifier];
self.reachability = nil; self.reachability = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self name:kReachabilityChangedNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:kHDReachabilityChangedNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidEnterBackgroundNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidEnterBackgroundNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:MPVolumeViewWirelessRouteActiveDidChangeNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:MPVolumeViewWirelessRouteActiveDidChangeNotification object:nil];
...@@ -342,10 +339,8 @@ static CGFloat barrageBgHeight = 40; ...@@ -342,10 +339,8 @@ static CGFloat barrageBgHeight = 40;
//设置videoId,关联弹幕 //设置videoId,关联弹幕
self.barrageManager.videoId = self.videoModel.videoId; self.barrageManager.videoId = self.videoModel.videoId;
#if __has_include(<HDMarqueeTool/HDMarqueeTool.h>)
//开启跑马灯功能 //开启跑马灯功能
[self initMarqueeView]; [self initMarqueeView];
#endif
} }
-(void)playLocalVideo:(DWDownloadModel *)downloadModel -(void)playLocalVideo:(DWDownloadModel *)downloadModel
...@@ -374,10 +369,8 @@ static CGFloat barrageBgHeight = 40; ...@@ -374,10 +369,8 @@ static CGFloat barrageBgHeight = 40;
[self.playerView playLocalVideo:downloadModel]; [self.playerView playLocalVideo:downloadModel];
[self play]; [self play];
#if __has_include(<HDMarqueeTool/HDMarqueeTool.h>)
//开启跑马灯功能 //开启跑马灯功能
[self initMarqueeView]; [self initMarqueeView];
#endif
} }
-(void)reLayoutWithScreenState:(BOOL)isFull -(void)reLayoutWithScreenState:(BOOL)isFull
...@@ -388,11 +381,9 @@ static CGFloat barrageBgHeight = 40; ...@@ -388,11 +381,9 @@ static CGFloat barrageBgHeight = 40;
[self updateConstraintsAndHidden]; [self updateConstraintsAndHidden];
#if __has_include(<HDMarqueeTool/HDMarqueeTool.h>)
if (self.marqueeView) { if (self.marqueeView) {
[self.marqueeView startMarquee]; [self.marqueeView startMarquee];
} }
#endif
[self.barrageBgView screenRotate:self.isFull]; [self.barrageBgView screenRotate:self.isFull];
} }
...@@ -1574,11 +1565,8 @@ static CGFloat barrageBgHeight = 40; ...@@ -1574,11 +1565,8 @@ static CGFloat barrageBgHeight = 40;
//处理选集数据 //处理选集数据
[self dealChooseArray]; [self dealChooseArray];
#if __has_include(<HDMarqueeTool/HDMarqueeTool.h>)
//开启跑马灯功能 //开启跑马灯功能
[self initMarqueeView]; [self initMarqueeView];
#endif
} }
//处理拖拽事件 //处理拖拽事件
...@@ -2000,16 +1988,16 @@ static CGFloat barrageBgHeight = 40; ...@@ -2000,16 +1988,16 @@ static CGFloat barrageBgHeight = 40;
#pragma mark - 网络状态改变 #pragma mark - 网络状态改变
-(void)networkStateChange -(void)networkStateChange
{ {
NetworkStatus status = [self.reachability currentReachabilityStatus]; HDNetworkStatus status = [self.reachability currentReachabilityStatus];
switch (status) { switch (status) {
case NotReachable:{ case HDNotReachable:{
if (self.videoModel) { if (self.videoModel) {
[@"暂无网络" showAlert]; [@"暂无网络" showAlert];
} }
break; break;
} }
case ReachableViaWiFi:{ case HDReachableViaWiFi:{
[@"切换到wi-fi网络" showAlert]; [@"切换到wi-fi网络" showAlert];
if (self.videoModel) { if (self.videoModel) {
//切换到wifi 继续播放 //切换到wifi 继续播放
...@@ -2024,7 +2012,7 @@ static CGFloat barrageBgHeight = 40; ...@@ -2024,7 +2012,7 @@ static CGFloat barrageBgHeight = 40;
break; break;
} }
case ReachableViaWWAN:{ case HDReachableViaWWAN:{
[@"切换到4g网络,暂停播放" showAlert]; [@"切换到4g网络,暂停播放" showAlert];
if (self.videoModel) { if (self.videoModel) {
...@@ -3646,7 +3634,6 @@ static CGFloat barrageBgHeight = 40; ...@@ -3646,7 +3634,6 @@ static CGFloat barrageBgHeight = 40;
self.pan.vodPanDelegate = self; self.pan.vodPanDelegate = self;
} }
#if __has_include(<HDMarqueeTool/HDMarqueeTool.h>)
-(void)initMarqueeView -(void)initMarqueeView
{ {
if (self.marqueeView) { if (self.marqueeView) {
...@@ -3734,7 +3721,6 @@ static CGFloat barrageBgHeight = 40; ...@@ -3734,7 +3721,6 @@ static CGFloat barrageBgHeight = 40;
// [self.marqueeView startMarquee]; // [self.marqueeView startMarquee];
} }
#endif
//设置弹幕视图 //设置弹幕视图
-(void)initBarrageView -(void)initBarrageView
......
...@@ -14,4 +14,5 @@ ...@@ -14,4 +14,5 @@
//视频列表。窗口播放时,跳转视频播放页面需要 //视频列表。窗口播放时,跳转视频播放页面需要
@property(nonatomic,strong)NSArray * videoList; @property(nonatomic,strong)NSArray * videoList;
@end @end
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
{ {
[DWLog setIsDebugHttpLog:YES]; [DWLog setIsDebugHttpLog:YES];
//设置AVAudioSession //设置AVAudioSession
NSError *categoryError = nil; NSError *categoryError = nil;
BOOL success = [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&categoryError]; BOOL success = [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&categoryError];
...@@ -37,7 +38,6 @@ ...@@ -37,7 +38,6 @@
} }
//后台下载设置 //后台下载设置
[[DWDownloadSessionManager manager] configureBackroundSession];
//设置最大下载并发数,默认不设置 //设置最大下载并发数,默认不设置
// [DWDownloadSessionManager manager].maxDownloadCount = 2; // [DWDownloadSessionManager manager].maxDownloadCount = 2;
// [DWDownloadSessionManager manager].isBatchDownload = NO; // [DWDownloadSessionManager manager].isBatchDownload = NO;
......
...@@ -43,8 +43,6 @@ ...@@ -43,8 +43,6 @@
<string>使用期间允许定位</string> <string>使用期间允许定位</string>
<key>NSMicrophoneUsageDescription</key> <key>NSMicrophoneUsageDescription</key>
<string>请求访问麦克风</string> <string>请求访问麦克风</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>添加截图到您的相册</string>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
<string>我们需要访问您的相册</string> <string>我们需要访问您的相册</string>
<key>UIBackgroundModes</key> <key>UIBackgroundModes</key>
......
...@@ -56,6 +56,5 @@ ...@@ -56,6 +56,5 @@
#import "DWConfigurationManager.h" #import "DWConfigurationManager.h"
#import "UIImageView+WebCache.h" #import "UIImageView+WebCache.h"
#if __has_include(<HDMarqueeTool/HDMarqueeTool.h>) #import <HDBaseUtils/HDBaseUtils.h>
#import <HDMarqueeTool/HDMarqueeTool.h>
#endif
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>com.apple.external-accessory.wireless-configuration</key> <key>com.apple.developer.networking.wifi-info</key>
<true/> <true/>
</dict> </dict>
</plist> </plist>
//
// HDMarqueeTool.h
// HDMarqueeTool
//
// Created by zwl on 2020/3/9.
// Copyright © 2020 zwl. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for HDMarqueeTool.
FOUNDATION_EXPORT double HDMarqueeToolVersionNumber;
//! Project version string for HDMarqueeTool.
FOUNDATION_EXPORT const unsigned char HDMarqueeToolVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <HDMarqueeTool/PublicHeader.h>
#import "HDMarqueeAction.h"
#import "HDMarqueeView.h"
//
// HDMarqueeTool.h
// HDMarqueeTool
//
// Created by zwl on 2020/3/9.
// Copyright © 2020 zwl. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for HDMarqueeTool.
FOUNDATION_EXPORT double HDMarqueeToolVersionNumber;
//! Project version string for HDMarqueeTool.
FOUNDATION_EXPORT const unsigned char HDMarqueeToolVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <HDMarqueeTool/PublicHeader.h>
#import "HDMarqueeAction.h"
#import "HDMarqueeView.h"
/*
Copyright (C) 2016 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
Basic demonstration of how to use the SystemConfiguration Reachablity APIs.
*/
#import <arpa/inet.h>
#import <ifaddrs.h>
#import <netdb.h>
#import <sys/socket.h>
#import <netinet/in.h>
#import <CoreFoundation/CoreFoundation.h>
#import "Reachability.h"
#pragma mark IPv6 Support