Skip to content

Commit

Permalink
others: upgrade ttsdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzy-volc committed Dec 29, 2022
1 parent 287b1da commit a1ce1e6
Show file tree
Hide file tree
Showing 13 changed files with 110 additions and 134 deletions.
17 changes: 15 additions & 2 deletions VOLCDemo/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
34 changes: 18 additions & 16 deletions VOLCDemo/VEPlayModule/Classes/Data/DataManager/VESettingManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

#import <MBProgressHUD/MBProgressHUD.h>

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 ()

Expand Down Expand Up @@ -48,53 +48,53 @@ - (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;
model;
})];
[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;
model;
})];
[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;
model;
})];
[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 = ^{
Expand All @@ -106,28 +106,30 @@ - (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)];
}
}

- (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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import "VESettingDisplayDetailCell.h"
#import "VESettingModel.h"
#import <MBProgressHUD/MBProgressHUD.h>

const NSString *VESettingDisplayDetailCellReuseID = @"VESettingDisplayDetailCellReuseID";

Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
}
Expand Down
2 changes: 1 addition & 1 deletion VOLCDemo/VEPlayerKit/VEPlayerKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,69 +16,5 @@
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "28D33C1E-274F-470B-9594-FAF060D608F5"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "VEPlayerUIModule/Classes/Private/UI/VEInterface.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "110"
endingLineNumber = "110"
landmarkName = "-destory"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "88DE3D04-7BBD-4F68-9DB0-DF0FA6DC2CB1"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "VEPlayerUIModule/Classes/Private/Event/VEEventMessageBus.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "55"
endingLineNumber = "55"
landmarkName = "-registEvent:withAction:ofTarget:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "7A76718A-7D7F-4D50-9590-CE4F77D40F32"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "VEPlayModule/Classes/FeedVideo/VEFeedVideoViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "81"
endingLineNumber = "81"
landmarkName = "-tableView:didEndDisplayingCell:forRowAtIndexPath:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "53AED69B-CF61-48D8-8A34-523E04E9D72B"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "VEPlayModule/Classes/FeedVideo/Cell/VEFeedVideoNormalCell.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "60"
endingLineNumber = "60"
landmarkName = "-cellDidEndDisplay:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
2 changes: 0 additions & 2 deletions VOLCDemo/VOLCDemo/Base/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@

@property (nonatomic, setter=setShouldRotation:) BOOL shouldRotation;//是否允许横屏,默认为NO

- (void)forceRotate;

@end
33 changes: 0 additions & 33 deletions VOLCDemo/VOLCDemo/Base/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 !!!!!
Expand All @@ -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
19 changes: 17 additions & 2 deletions VOLCDemo/VOLCDemo/Base/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";

19 changes: 17 additions & 2 deletions VOLCDemo/VOLCDemo/Base/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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" = "复制成功";
Loading

0 comments on commit a1ce1e6

Please sign in to comment.