diff --git a/VOLCDemo/Podfile b/VOLCDemo/Podfile index b697a7d..15f15c6 100644 --- a/VOLCDemo/Podfile +++ b/VOLCDemo/Podfile @@ -6,7 +6,7 @@ platform :ios, '9.0' target 'VOLCDemo' do # vod SDK - pod 'TTSDK', '1.32.1.1-premium', :subspecs => ['Player'] + pod 'TTSDK', '1.35.1.3-premium', :subspecs => ['Player'] # vod all scene exhibition pod 'VEPlayModule', :path=> './VEPlayModule/' # vod player kit @@ -25,6 +25,19 @@ target 'VOLCDemo' do pod 'Reachability' pod 'JSONModel' pod 'YYKit' - + end +# xcode14 code sign +post_install do |installer| + [installer.generated_projects, installer.pods_project] + .flatten.map{ |p| p.targets} + .flatten.each do |target| + target.build_configurations.each do |config| + config.build_settings["CODE_SIGN_IDENTITY"] = "-" + config.build_settings["CODE_SIGN_ENTITLEMENTS"] = "-" + config.build_settings["CODE_SIGNING_ALLOWED"] = "NO" + config.build_settings["CODE_SIGNING_REQUIRED"] = "NO" + end + end +end diff --git a/VOLCDemo/VEPlayModule/Classes/Data/DataManager/VESettingManager.m b/VOLCDemo/VEPlayModule/Classes/Data/DataManager/VESettingManager.m index 35f581e..22b4763 100644 --- a/VOLCDemo/VEPlayModule/Classes/Data/DataManager/VESettingManager.m +++ b/VOLCDemo/VEPlayModule/Classes/Data/DataManager/VESettingManager.m @@ -12,11 +12,11 @@ #import -const NSString *shortVideoSectionKey = @"短视频策略"; +const NSString *shortVideoSectionKey = @"title_setting_short_strategy"; -const NSString *universalSectionKey = @"通用选项"; +const NSString *universalSectionKey = @"title_setting_common_option"; -const NSString *universalActionSectionKey = @"通用操作"; // clear, log out? +const NSString *universalActionSectionKey = @"universal_action"; // clear, log out? @interface VESettingManager () @@ -48,7 +48,7 @@ - (void)initialDefaultSettings { NSMutableArray *shortVideoSection = [NSMutableArray array]; [shortVideoSection addObject:({ VESettingModel *model = [VESettingModel new]; - model.displayText = @"预加载策略"; + model.displayText = NSLocalizedString(@"title_setting_short_strategy_preload", nil); model.settingKey = VESettingKeyShortVideoPreloadStrategy; model.open = YES; model.settingType = VESettingTypeSwitcher; @@ -56,18 +56,18 @@ - (void)initialDefaultSettings { })]; [shortVideoSection addObject:({ VESettingModel *model = [VESettingModel new]; - model.displayText = @"预渲染策略"; + model.displayText = NSLocalizedString(@"title_setting_short_strategy_preRender", nil); model.settingKey = VESettingKeyShortVideoPreRenderStrategy; model.open = YES; model.settingType = VESettingTypeSwitcher; model; })]; - [self.settings setValue:shortVideoSection forKey:shortVideoSectionKey]; + [self.settings setValue:shortVideoSection forKey:NSLocalizedString(shortVideoSectionKey.copy, nil)]; NSMutableArray *universalSection = [NSMutableArray array]; [universalSection addObject:({ VESettingModel *model = [VESettingModel new]; - model.displayText = @"H.265"; + model.displayText = NSLocalizedString(@"title_setting_common_option_h265", nil); model.settingKey = VESettingKeyUniversalH265; model.open = YES; model.settingType = VESettingTypeSwitcher; @@ -75,7 +75,7 @@ - (void)initialDefaultSettings { })]; [universalSection addObject:({ VESettingModel *model = [VESettingModel new]; - model.displayText = @"硬件解码"; + model.displayText = NSLocalizedString(@"title_setting_common_option_hardware", nil); model.settingKey = VESettingKeyUniversalHardwareDecode; model.open = YES; model.settingType = VESettingTypeSwitcher; @@ -83,18 +83,18 @@ - (void)initialDefaultSettings { })]; [universalSection addObject:({ VESettingModel *model = [VESettingModel new]; - model.displayText = @"Device ID"; + model.displayText = NSLocalizedString(@"title_setting_common_option_deviceId", nil); model.settingKey = VESettingKeyUniversalDeviceID; model.detailText = [VEVideoPlayerController deviceID]; model.settingType = VESettingTypeDisplayDetail; model; })]; - [self.settings setValue:universalSection forKey:universalSectionKey]; + [self.settings setValue:universalSection forKey:NSLocalizedString(universalSectionKey.copy, nil)]; NSMutableArray *universalActionSection = [NSMutableArray array]; [universalActionSection addObject:({ VESettingModel *model = [VESettingModel new]; - model.displayText = @"清理缓存"; + model.displayText = NSLocalizedString(@"title_setting_clean_cache", nil); model.settingKey = VESettingKeyUniversalActionCleanCache; model.settingType = VESettingTypeDisplay; model.allAreaAction = ^{ @@ -106,12 +106,14 @@ - (void)initialDefaultSettings { }; model; })]; - [self.settings setValue:universalActionSection forKey:universalActionSectionKey]; + [self.settings setValue:universalActionSection forKey:NSLocalizedString(universalActionSectionKey.copy, nil)]; } - (NSArray *)settingSections { @autoreleasepool { - return @[shortVideoSectionKey, universalSectionKey, universalActionSectionKey]; + return @[NSLocalizedString(shortVideoSectionKey.copy, nil), + NSLocalizedString(universalSectionKey.copy, nil), + NSLocalizedString(universalActionSectionKey.copy, nil)]; } } @@ -119,15 +121,15 @@ - (VESettingModel *)settingForKey:(VESettingKey)key { NSArray *settings = [NSArray array]; switch (key / 1000) { case 0:{ - settings = [self.settings objectForKey:universalSectionKey]; + settings = [self.settings objectForKey:NSLocalizedString(universalSectionKey.copy, nil)]; } break; case 1:{ - settings = [self.settings objectForKey:universalActionSectionKey]; + settings = [self.settings objectForKey:NSLocalizedString(universalActionSectionKey.copy, nil)]; } break; case 10:{ - settings = [self.settings objectForKey:shortVideoSectionKey]; + settings = [self.settings objectForKey:NSLocalizedString(shortVideoSectionKey.copy, nil)]; } break; } diff --git a/VOLCDemo/VEPlayModule/Classes/FeedVideo/VEFeedVideoViewController.m b/VOLCDemo/VEPlayModule/Classes/FeedVideo/VEFeedVideoViewController.m index e1717c7..ef1d3e8 100644 --- a/VOLCDemo/VEPlayModule/Classes/FeedVideo/VEFeedVideoViewController.m +++ b/VOLCDemo/VEPlayModule/Classes/FeedVideo/VEFeedVideoViewController.m @@ -53,7 +53,7 @@ - (void)initialUI { [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(self.view); }]; - self.title = NSLocalizedString(@"title_feed_video", nil); + self.title = NSLocalizedString(@"title_middle_video", nil); self.navigationItem.leftBarButtonItem = ({ UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back"] style:UIBarButtonItemStylePlain target:self action:@selector(close)]; leftItem.tintColor = [UIColor blackColor]; diff --git a/VOLCDemo/VEPlayModule/Classes/Setting/Cell/VESettingDisplayDetailCell.m b/VOLCDemo/VEPlayModule/Classes/Setting/Cell/VESettingDisplayDetailCell.m index 89557e5..2cfcdc0 100644 --- a/VOLCDemo/VEPlayModule/Classes/Setting/Cell/VESettingDisplayDetailCell.m +++ b/VOLCDemo/VEPlayModule/Classes/Setting/Cell/VESettingDisplayDetailCell.m @@ -8,6 +8,7 @@ #import "VESettingDisplayDetailCell.h" #import "VESettingModel.h" +#import const NSString *VESettingDisplayDetailCellReuseID = @"VESettingDisplayDetailCellReuseID"; @@ -27,12 +28,17 @@ @implementation VESettingDisplayDetailCell - (void)setSettingModel:(VESettingModel *)settingModel { _settingModel = settingModel; + [self.operationButton setTitle:NSLocalizedString(@"title_common_copy", nil) forState:UIControlStateNormal]; self.titleLabel.text = [NSString stringWithFormat:@"%@", settingModel.displayText]; self.detailLabel.text = [NSString stringWithFormat:@"%@", settingModel.detailText]; } - (IBAction)operationButtonTouchUpInsideAction:(id)sender { [UIPasteboard generalPasteboard].string = [NSString stringWithFormat:@"%@", self.settingModel.detailText]; + MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:UIApplication.sharedApplication.keyWindow animated:YES]; + hud.mode = MBProgressHUDModeText; + hud.label.text = NSLocalizedString(@"tip_copy_success", nil); + [hud hideAnimated:YES afterDelay:1.0]; } @end diff --git a/VOLCDemo/VEPlayModule/Classes/Setting/VESettingViewController.m b/VOLCDemo/VEPlayModule/Classes/Setting/VESettingViewController.m index 4c755da..27f0752 100644 --- a/VOLCDemo/VEPlayModule/Classes/Setting/VESettingViewController.m +++ b/VOLCDemo/VEPlayModule/Classes/Setting/VESettingViewController.m @@ -91,8 +91,8 @@ - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger return ({ UILabel *headerLabel = [UILabel new]; headerLabel.text = [NSString stringWithFormat:@" %@", sectionKey]; - headerLabel.font = [UIFont systemFontOfSize:14.0]; - headerLabel.textColor = [UIColor colorWithRGB:0x86909C alpha:1.0]; + headerLabel.font = [UIFont boldSystemFontOfSize:16.0]; + headerLabel.textColor = [UIColor darkGrayColor]; headerLabel; }); } diff --git a/VOLCDemo/VEPlayerKit/VEPlayerKit.podspec b/VOLCDemo/VEPlayerKit/VEPlayerKit.podspec index abaf9f9..a78f52e 100644 --- a/VOLCDemo/VEPlayerKit/VEPlayerKit.podspec +++ b/VOLCDemo/VEPlayerKit/VEPlayerKit.podspec @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.source_files = 'Classes/*' s.public_header_files = 'Classes/*.{h}' - s.dependency 'TTSDK/Player', '1.32.1.1-premium' + s.dependency 'TTSDK/Player', '1.35.1.3-premium' s.dependency 'Masonry' s.dependency 'SDWebImage' diff --git a/VOLCDemo/VOLCDemo.xcworkspace/xcuserdata/bytedance.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/VOLCDemo/VOLCDemo.xcworkspace/xcuserdata/bytedance.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index ddff2c8..50a230d 100644 --- a/VOLCDemo/VOLCDemo.xcworkspace/xcuserdata/bytedance.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/VOLCDemo/VOLCDemo.xcworkspace/xcuserdata/bytedance.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -16,69 +16,5 @@ stopOnStyle = "0"> - - - - - - - - - - - - - - - - diff --git a/VOLCDemo/VOLCDemo/Base/AppDelegate.h b/VOLCDemo/VOLCDemo/Base/AppDelegate.h index a1a1142..36be8bc 100644 --- a/VOLCDemo/VOLCDemo/Base/AppDelegate.h +++ b/VOLCDemo/VOLCDemo/Base/AppDelegate.h @@ -11,6 +11,4 @@ @property (nonatomic, setter=setShouldRotation:) BOOL shouldRotation;//是否允许横屏,默认为NO -- (void)forceRotate; - @end diff --git a/VOLCDemo/VOLCDemo/Base/AppDelegate.m b/VOLCDemo/VOLCDemo/Base/AppDelegate.m index 1cd6343..3c175af 100644 --- a/VOLCDemo/VOLCDemo/Base/AppDelegate.m +++ b/VOLCDemo/VOLCDemo/Base/AppDelegate.m @@ -16,11 +16,6 @@ #endif -FOUNDATION_EXTERN NSString * const TTLicenseNotificationLicenseDidAdd; -FOUNDATION_EXTERN NSString * const TTLicenseNotificationLicenseInfoDidUpdate;; -FOUNDATION_EXTERN NSString * const TTLicenseNotificationLicenseResultKey; - - @interface AppDelegate () @property (nonatomic, assign) UIInterfaceOrientation screenDirection; @@ -73,8 +68,6 @@ - (void)initTTSDK { #ifdef DEBUG /// 建议Debug期间打开Log开关 [TTVideoEngine setLogFlag:TTVideoEngineLogFlagAll]; - /// 建议Debug期间打开,监听 license 是否加载成功, - [self addLicenseObserver]; #endif NSString *appId = @"229234"; /// initialize ttsdk, configure Liscene ,this step cannot be skipped !!!!! @@ -86,30 +79,4 @@ - (void)initTTSDK { [TTSDKManager startWithConfiguration:configuration]; } -- (void)addLicenseObserver { - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(licenseDidAdd:) name:TTLicenseNotificationLicenseDidAdd object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(licenseInfoDidUpdate:) name:TTLicenseNotificationLicenseInfoDidUpdate object:nil]; -} - -- (void)licenseDidAdd:(NSNotification *)noti { - NSNumber *success = [noti userInfo][TTLicenseNotificationLicenseResultKey]; - BOOL isSuccess = [success boolValue]; - if (isSuccess) { - NSLog(@"add license successfully"); - } else { - NSLog(@"failed to add license"); - } -} - -- (void)licenseInfoDidUpdate:(NSNotification *)noti { - NSNumber *success = [noti userInfo][TTLicenseNotificationLicenseResultKey]; - BOOL isSuccess = [success boolValue]; - if (isSuccess) { - NSLog(@"update license successfully"); - } else { - NSLog(@"failed to update license"); - } -} - - @end diff --git a/VOLCDemo/VOLCDemo/Base/en.lproj/Localizable.strings b/VOLCDemo/VOLCDemo/Base/en.lproj/Localizable.strings index 3bac1d1..0aa24a7 100644 --- a/VOLCDemo/VOLCDemo/Base/en.lproj/Localizable.strings +++ b/VOLCDemo/VOLCDemo/Base/en.lproj/Localizable.strings @@ -6,12 +6,27 @@ */ +"title_volc_vod" = "VOLC VOD"; +"title_volc_vod_desc" = "volc engine video solution"; + "title_short_video" = "short video"; -"title_feed_video" = "feed video"; -"title_long_video" = "normal video"; +"title_middle_video" = "middle video"; +"title_long_video" = "long video"; "title_clean_cache" = "clean cache"; "title_video_setting" = "video setting"; +"title_setting_short_strategy" = "Short Scene Settings"; +"title_setting_short_strategy_preload" = "preload strategy"; +"title_setting_short_strategy_preRender" = "prerender strategy"; + +"title_setting_common_option" = "Common Settings"; +"title_setting_common_option_h265" = "H.265"; +"title_setting_common_option_hardware" = "Hardware Decode"; +"title_setting_common_option_deviceId" = "Device ID"; +"title_setting_clean_cache" = "clean cache"; + +"title_common_copy" = "copy"; "tip_clean_success" = "clean success"; +"tip_copy_success" = "copy success"; diff --git a/VOLCDemo/VOLCDemo/Base/zh-Hans.lproj/Localizable.strings b/VOLCDemo/VOLCDemo/Base/zh-Hans.lproj/Localizable.strings index 2afb64f..493cdf9 100644 --- a/VOLCDemo/VOLCDemo/Base/zh-Hans.lproj/Localizable.strings +++ b/VOLCDemo/VOLCDemo/Base/zh-Hans.lproj/Localizable.strings @@ -6,11 +6,26 @@ */ -"title_short_video" = "短视频"; -"title_feed_video" = "中视频"; +"title_volc_vod" = "视频点播"; +"title_volc_vod_desc" = "体验一站式视频解决方案"; + +"title_short_video" = "短视频(竖屏类抖音)"; +"title_middle_video" = "中视频(横屏)"; "title_long_video" = "长视频"; "title_clean_cache" = "清理缓存"; "title_video_setting" = "播放设置"; +"title_setting_short_strategy" = "短视频场景(抖音)策略配置"; +"title_setting_short_strategy_preload" = "预加载策略"; +"title_setting_short_strategy_preRender" = "预渲染策略"; + +"title_setting_common_option" = "通用配置"; +"title_setting_common_option_h265" = "H.265"; +"title_setting_common_option_hardware" = "硬解"; +"title_setting_common_option_deviceId" = "Device ID"; +"title_setting_clean_cache" = "清理缓存"; + +"title_common_copy" = "复制"; "tip_clean_success" = "缓存清理成功"; +"tip_copy_success" = "复制成功"; diff --git a/VOLCDemo/VOLCDemo/Entry/VEMainViewController.m b/VOLCDemo/VOLCDemo/Entry/VEMainViewController.m index 42689d4..40c6c38 100644 --- a/VOLCDemo/VOLCDemo/Entry/VEMainViewController.m +++ b/VOLCDemo/VOLCDemo/Entry/VEMainViewController.m @@ -14,15 +14,33 @@ @interface VEMainViewController () +@property (weak, nonatomic) IBOutlet UILabel *vodTitleLabel; +@property (weak, nonatomic) IBOutlet UILabel *vodSubTitleLabel; @property (weak, nonatomic) IBOutlet UILabel *versionLabel; +@property (weak, nonatomic) IBOutlet UILabel *shortSceneLable; +@property (weak, nonatomic) IBOutlet UILabel *middleSceneLabel; +@property (weak, nonatomic) IBOutlet UILabel *longSceneLabel; +@property (weak, nonatomic) IBOutlet UILabel *settingsLabel; + @end @implementation VEMainViewController - (void)viewDidLoad { - self.versionLabel.text = [NSString stringWithFormat:@"TTSDK - %@", [TTSDKManager SDKVersionString]]; + [self configuratoinCustomView]; +} + +- (void)configuratoinCustomView { + self.vodTitleLabel.text = NSLocalizedString(@"title_volc_vod", nil); + self.vodSubTitleLabel.text = NSLocalizedString(@"title_volc_vod_desc", nil); + + self.shortSceneLable.text = NSLocalizedString(@"title_short_video", nil); + self.middleSceneLabel.text = NSLocalizedString(@"title_middle_video", nil); + self.longSceneLabel.text = NSLocalizedString(@"title_long_video", nil); + self.settingsLabel.text = NSLocalizedString(@"title_video_setting", nil); + self.versionLabel.text = [NSString stringWithFormat:@"TTSDK - %@", [TTSDKManager SDKVersionString]]; } - (void)viewWillAppear:(BOOL)animated { diff --git a/VOLCDemo/VOLCDemo/Entry/VEMainViewController.xib b/VOLCDemo/VOLCDemo/Entry/VEMainViewController.xib index 5738af6..55d824f 100644 --- a/VOLCDemo/VOLCDemo/Entry/VEMainViewController.xib +++ b/VOLCDemo/VOLCDemo/Entry/VEMainViewController.xib @@ -1,17 +1,23 @@ - + - + + + + + + + @@ -27,7 +33,7 @@ - + @@ -91,7 +97,7 @@ - + @@ -138,7 +144,7 @@ - + - +