Skip to content

Commit

Permalink
Merge pull request volcengine#4 from volcengine/dev
Browse files Browse the repository at this point in the history
upgrede ttsdk version
  • Loading branch information
wangzy-volc committed Jul 28, 2022
2 parents 9ef5618 + 5e5218c commit ce3a9bb
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 33 deletions.
51 changes: 31 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@
VOLCDemo基于TTSDK点播SDK构建,当前版本以小视频场景演示,后续会持续迭代,短视频、长视频场景的使用;
目标帮助业务侧快速集成的点播模块,通过迭代短视频、小视频、长视频等场景帮助业务侧快速实现接入最佳实践;

TTSDK v_1.23.1.4 版本增加播放器策略模块,一期上线小视频策略:通用策略、预加载、预渲染;




## 目录结构说明

```
├─ TTSDK
| ├─ TTSDKFramework-x.x.x.x-premium-ta.zip // 解压后是高级版动态库
| ├─ TTSDKFramework-x.x.x.x-standard-ta.zip // 解压后是基础版动态库
├─ VOLCDemo
└── VOLCDemo
├── Base // Appdelegate
Expand All @@ -22,34 +15,54 @@ TTSDK v_1.23.1.4 版本增加播放器策略模块,一期上线小视频策略
└── Utils // 工具类
```



## VOLCDemo运行

1. 进入 VEVodDemo-iOS/VOLCDemo 文件夹
2. 执行 pod install
3. 打开 VOLCDemo.xcworkspace 编译运行



## TTSDK点播SDK 集成方式

### 方式一:CocoaPods集成【推荐】
### 方式一:CocoaPods集成静态库
1. 添加pod依赖
```
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/volcengine/volcengine-specs.git'
pod 'TTSDK', 'x.x.x.x', :subspecs => [ # 推荐使用最新稳定版,具体版本号请参考最下方的ChangeLog
'Player', # 点播SDK
]
platform :ios, '9.0'
target 'VOLCDemo' do
#这里需要明确指定使用 subspecs => Player
#可在 ChangeLog 获取版本号,推荐使用最新版本
pod 'TTSDK', 'x.x.x.x-premium', :subspecs => ['Player']
end
```

2. 执行 pod install
3. import <TTSDK/TTVideoEngineHeader.h>

### 方式二:CocoaPods集成动态库
1. 添加pod依赖
```
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/volcengine/volcengine-specs.git'
platform :ios, '9.0'
target 'VOLCDemo' do
#添加TTSDKFramework动态库,版本号同静态库版本号
pod 'TTSDKFramework', 'x.x.x.x-premium'
#添加日志上报SDK,用于点播日志上传
pod 'RangersAppLog', '6.9.1', :subspecs =>['Core','Log','Host/CN']
### 方式二:动态库方式手动集成
我们强烈推荐使用CocoaPods在线方式集成方式,但从业务测反馈业务侧接入时可能三方库存在冲突问题,这时候需要使用动态库方式手动集成;
- [手动集成文档](https://www.volcengine.com/docs/4/65775#%E6%96%B9%E6%B3%95%E4%BA%8C%EF%BC%9A%E6%89%8B%E5%B7%A5%E9%9B%86%E6%88%90)
end
```

2. 执行 pod install


### 更多集成相关文档链接
Expand All @@ -62,8 +75,6 @@ pod 'TTSDK', 'x.x.x.x', :subspecs => [ # 推荐使用最新稳定版,具体版
- [快速开始](https://bytedance.feishu.cn/docx/doxcnMlusNTzjPb7jn2wMf1s7oe)




## ChangeLog
链接:https://www.volcengine.com/docs/4/66438

Expand Down
Binary file removed TTSDK/TTSDKFramework-1.28.1.1-premium-ta.zip
Binary file not shown.
Binary file removed TTSDK/TTSDKFramework-1.28.1.1-standard-ta.zip
Binary file not shown.
5 changes: 4 additions & 1 deletion VOLCDemo/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ source 'https://github.com/volcengine/volcengine-specs.git'
platform :ios, '9.0'

target 'VOLCDemo' do
pod 'TTSDK', '1.28.1.1-premium', :subspecs => ['Player']
# 添加 TTSDK
pod 'TTSDK', '1.30.2.1-premium', :subspecs => ['Player']

# 添加 Demo 运行需要依赖的三方库
pod 'Masonry'
pod 'SDWebImage'
pod 'MBProgressHUD', '~> 1.2.0'
Expand Down
22 changes: 21 additions & 1 deletion VOLCDemo/VOLCDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@
2BEC93BF2657907300C64503 /* Frameworks */,
2BEC93C02657907300C64503 /* Resources */,
7ECE482F4A5502C5B185868F /* [CP] Copy Pods Resources */,
B10AFD87F4D86340305B849C /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -526,6 +527,23 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VOLCDemo/Pods-VOLCDemo-resources.sh\"\n";
showEnvVarsInLog = 0;
};
B10AFD87F4D86340305B849C /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-VOLCDemo/Pods-VOLCDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-VOLCDemo/Pods-VOLCDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VOLCDemo/Pods-VOLCDemo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -742,7 +760,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_IDENTITY = "iPhone Distribution: Beijing Volcano Engine Technology Co.,Ltd. (3XMD9D6A65)";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 0;
DEVELOPMENT_TEAM = 3XMD9D6A65;
ENABLE_BITCODE = NO;
Expand All @@ -762,6 +781,7 @@
MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.bytedance.volc.voddemo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = com.bytedance.volc.voddemo;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
2 changes: 0 additions & 2 deletions VOLCDemo/VOLCDemo/Module/SmallVideo/Model/VEVideoModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ NS_ASSUME_NONNULL_BEGIN

+ (TTVideoEngineUrlSource *)videoEngineUrlSource:(VEVideoModel *)videoModel;

+ (TTVideoEngineMultiEncodingUrlSource *)videoEngineCodecUrlSource:(VEVideoModel *)videoModel;

@end

NS_ASSUME_NONNULL_END
9 changes: 0 additions & 9 deletions VOLCDemo/VOLCDemo/Module/SmallVideo/Model/VEVideoModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,4 @@ + (TTVideoEngineUrlSource *)videoEngineUrlSource:(VEVideoModel *)videoModel {
return source;
}

+ (TTVideoEngineMultiEncodingUrlSource *)videoEngineCodecUrlSource:(VEVideoModel *)videoModel {
TTVideoEngineMultiEncodingUrlSource *codecUrlSource = [[TTVideoEngineMultiEncodingUrlSource alloc] initWithVideoId:videoModel.videoId];
[codecUrlSource addUrl:videoModel.playUrl forCodec:TTVideoEngineH264 withCacheKey:videoModel.playUrl.vloc_md5String andVideoId:videoModel.videoId andDecryptionKey:nil];
[codecUrlSource addUrl:videoModel.h265PlayUrl forCodec:TTVideoEngineh265 withCacheKey:videoModel.h265PlayUrl.vloc_md5String andVideoId:videoModel.videoId andDecryptionKey:nil];
codecUrlSource.title = videoModel.title;
codecUrlSource.cover = videoModel.coverUrl;
return codecUrlSource;
}

@end

0 comments on commit ce3a9bb

Please sign in to comment.