Commit e0fed438cf956d260c2e1c09a14cc1b88830e6cb
Merge branch 'master' of bj.gitlab.cnlive.com:ios-team/LiveVideoCloud
Showing
9 changed files
with
305 additions
and
20 deletions
LiveVideoCloud.xcodeproj/project.pbxproj
| @@ -84,13 +84,14 @@ | @@ -84,13 +84,14 @@ | ||
| 84 | 810B650A1E77B39D00133E15 /* LVCFullScreenPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */; }; | 84 | 810B650A1E77B39D00133E15 /* LVCFullScreenPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */; }; |
| 85 | 8112D4311E7927A5002E00F6 /* LVCPlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */; }; | 85 | 8112D4311E7927A5002E00F6 /* LVCPlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */; }; |
| 86 | 811BB6801E80F858005C6291 /* LVCChatView.m in Sources */ = {isa = PBXBuildFile; fileRef = 811BB67D1E80F858005C6291 /* LVCChatView.m */; }; | 86 | 811BB6801E80F858005C6291 /* LVCChatView.m in Sources */ = {isa = PBXBuildFile; fileRef = 811BB67D1E80F858005C6291 /* LVCChatView.m */; }; |
| 87 | - 811BB6831E8106A2005C6291 /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 811BB6821E8106A2005C6291 /* CNLivePlayerSDK.framework */; }; | ||
| 88 | - 811BB6851E8106AF005C6291 /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 811BB6821E8106A2005C6291 /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | ||
| 89 | 811BB6881E8107B4005C6291 /* LVCChatViewTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 811BB6871E8107B4005C6291 /* LVCChatViewTableViewCell.m */; }; | 87 | 811BB6881E8107B4005C6291 /* LVCChatViewTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 811BB6871E8107B4005C6291 /* LVCChatViewTableViewCell.m */; }; |
| 90 | 811BB68E1E8116C8005C6291 /* NSString+StringSize.m in Sources */ = {isa = PBXBuildFile; fileRef = 811BB68D1E8116C8005C6291 /* NSString+StringSize.m */; }; | 88 | 811BB68E1E8116C8005C6291 /* NSString+StringSize.m in Sources */ = {isa = PBXBuildFile; fileRef = 811BB68D1E8116C8005C6291 /* NSString+StringSize.m */; }; |
| 91 | 8128E2881E8A6A3600B40E75 /* CNBarrageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8128E2851E8A6A3600B40E75 /* CNBarrageManager.m */; }; | 89 | 8128E2881E8A6A3600B40E75 /* CNBarrageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8128E2851E8A6A3600B40E75 /* CNBarrageManager.m */; }; |
| 92 | 8128E2891E8A6A3600B40E75 /* CNBarrageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8128E2871E8A6A3600B40E75 /* CNBarrageView.m */; }; | 90 | 8128E2891E8A6A3600B40E75 /* CNBarrageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8128E2871E8A6A3600B40E75 /* CNBarrageView.m */; }; |
| 93 | 8130911E1E84C0F0005F0BFF /* LVCMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 8130911D1E84C0F0005F0BFF /* LVCMessage.m */; }; | 91 | 8130911E1E84C0F0005F0BFF /* LVCMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 8130911D1E84C0F0005F0BFF /* LVCMessage.m */; }; |
| 92 | + 8157A0181EE1451800ADD6B9 /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8157A0171EE1451800ADD6B9 /* CNLivePlayerSDK.framework */; }; | ||
| 93 | + 8157A0191EE1452800ADD6B9 /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8157A0171EE1451800ADD6B9 /* CNLivePlayerSDK.framework */; }; | ||
| 94 | + 8157A01A1EE1452800ADD6B9 /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8157A0171EE1451800ADD6B9 /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | ||
| 94 | 81A1B9A91E8277410079FF5F /* LVCInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81A1B9A81E8277410079FF5F /* LVCInputView.m */; }; | 95 | 81A1B9A91E8277410079FF5F /* LVCInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81A1B9A81E8277410079FF5F /* LVCInputView.m */; }; |
| 95 | 81A482F51E88ACC80097A80A /* LVCTelevisionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81A482F41E88ACC80097A80A /* LVCTelevisionView.m */; }; | 96 | 81A482F51E88ACC80097A80A /* LVCTelevisionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81A482F41E88ACC80097A80A /* LVCTelevisionView.m */; }; |
| 96 | 81A482F81E88AFA20097A80A /* LVCFirstHeaderReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81A482F71E88AFA20097A80A /* LVCFirstHeaderReusableView.m */; }; | 97 | 81A482F81E88AFA20097A80A /* LVCFirstHeaderReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81A482F71E88AFA20097A80A /* LVCFirstHeaderReusableView.m */; }; |
| @@ -287,7 +288,7 @@ | @@ -287,7 +288,7 @@ | ||
| 287 | dstSubfolderSpec = 10; | 288 | dstSubfolderSpec = 10; |
| 288 | files = ( | 289 | files = ( |
| 289 | 4BD8561A1EBAD4E30082061D /* CNLiveUserSystemSDK.framework in Embed Frameworks */, | 290 | 4BD8561A1EBAD4E30082061D /* CNLiveUserSystemSDK.framework in Embed Frameworks */, |
| 290 | - 811BB6851E8106AF005C6291 /* CNLivePlayerSDK.framework in Embed Frameworks */, | 291 | + 8157A01A1EE1452800ADD6B9 /* CNLivePlayerSDK.framework in Embed Frameworks */, |
| 291 | D2994BA91E8F490400E8D2CC /* CNLiveChatManager.framework in Embed Frameworks */, | 292 | D2994BA91E8F490400E8D2CC /* CNLiveChatManager.framework in Embed Frameworks */, |
| 292 | D2994BAB1E8F490700E8D2CC /* CNLiveMsgTools.framework in Embed Frameworks */, | 293 | D2994BAB1E8F490700E8D2CC /* CNLiveMsgTools.framework in Embed Frameworks */, |
| 293 | ); | 294 | ); |
| @@ -455,7 +456,6 @@ | @@ -455,7 +456,6 @@ | ||
| 455 | 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCPlayerLoadingView.m; sourceTree = "<group>"; }; | 456 | 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCPlayerLoadingView.m; sourceTree = "<group>"; }; |
| 456 | 811BB67C1E80F858005C6291 /* LVCChatView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCChatView.h; sourceTree = "<group>"; }; | 457 | 811BB67C1E80F858005C6291 /* LVCChatView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCChatView.h; sourceTree = "<group>"; }; |
| 457 | 811BB67D1E80F858005C6291 /* LVCChatView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCChatView.m; sourceTree = "<group>"; }; | 458 | 811BB67D1E80F858005C6291 /* LVCChatView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCChatView.m; sourceTree = "<group>"; }; |
| 458 | - 811BB6821E8106A2005C6291 /* CNLivePlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLivePlayerSDK.framework; sourceTree = "<group>"; }; | ||
| 459 | 811BB6861E8107B4005C6291 /* LVCChatViewTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCChatViewTableViewCell.h; sourceTree = "<group>"; }; | 459 | 811BB6861E8107B4005C6291 /* LVCChatViewTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCChatViewTableViewCell.h; sourceTree = "<group>"; }; |
| 460 | 811BB6871E8107B4005C6291 /* LVCChatViewTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCChatViewTableViewCell.m; sourceTree = "<group>"; }; | 460 | 811BB6871E8107B4005C6291 /* LVCChatViewTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCChatViewTableViewCell.m; sourceTree = "<group>"; }; |
| 461 | 811BB68C1E8116C8005C6291 /* NSString+StringSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+StringSize.h"; sourceTree = "<group>"; }; | 461 | 811BB68C1E8116C8005C6291 /* NSString+StringSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+StringSize.h"; sourceTree = "<group>"; }; |
| @@ -466,6 +466,7 @@ | @@ -466,6 +466,7 @@ | ||
| 466 | 8128E2871E8A6A3600B40E75 /* CNBarrageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNBarrageView.m; sourceTree = "<group>"; }; | 466 | 8128E2871E8A6A3600B40E75 /* CNBarrageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNBarrageView.m; sourceTree = "<group>"; }; |
| 467 | 8130911C1E84C0F0005F0BFF /* LVCMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCMessage.h; sourceTree = "<group>"; }; | 467 | 8130911C1E84C0F0005F0BFF /* LVCMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCMessage.h; sourceTree = "<group>"; }; |
| 468 | 8130911D1E84C0F0005F0BFF /* LVCMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCMessage.m; sourceTree = "<group>"; }; | 468 | 8130911D1E84C0F0005F0BFF /* LVCMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCMessage.m; sourceTree = "<group>"; }; |
| 469 | + 8157A0171EE1451800ADD6B9 /* CNLivePlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLivePlayerSDK.framework; sourceTree = "<group>"; }; | ||
| 469 | 81A1B9A71E8277410079FF5F /* LVCInputView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCInputView.h; sourceTree = "<group>"; }; | 470 | 81A1B9A71E8277410079FF5F /* LVCInputView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCInputView.h; sourceTree = "<group>"; }; |
| 470 | 81A1B9A81E8277410079FF5F /* LVCInputView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCInputView.m; sourceTree = "<group>"; }; | 471 | 81A1B9A81E8277410079FF5F /* LVCInputView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCInputView.m; sourceTree = "<group>"; }; |
| 471 | 81A482F31E88ACC80097A80A /* LVCTelevisionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LVCTelevisionView.h; path = LiveVideoCloud/Classes/Sections/homeSections/View/LVCTelevisionView.h; sourceTree = SOURCE_ROOT; }; | 472 | 81A482F31E88ACC80097A80A /* LVCTelevisionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LVCTelevisionView.h; path = LiveVideoCloud/Classes/Sections/homeSections/View/LVCTelevisionView.h; sourceTree = SOURCE_ROOT; }; |
| @@ -812,12 +813,13 @@ | @@ -812,12 +813,13 @@ | ||
| 812 | 4BD855D31EBAC8B20082061D /* CNLiveUserSystemSDK.framework in Frameworks */, | 813 | 4BD855D31EBAC8B20082061D /* CNLiveUserSystemSDK.framework in Frameworks */, |
| 813 | D25BF8A31E80C4FC007FB138 /* Accelerate.framework in Frameworks */, | 814 | D25BF8A31E80C4FC007FB138 /* Accelerate.framework in Frameworks */, |
| 814 | D2994BA71E8F48DE00E8D2CC /* CNLiveMsgTools.framework in Frameworks */, | 815 | D2994BA71E8F48DE00E8D2CC /* CNLiveMsgTools.framework in Frameworks */, |
| 816 | + 8157A0181EE1451800ADD6B9 /* CNLivePlayerSDK.framework in Frameworks */, | ||
| 815 | D2575C7D1E76A4F300E3A8FC /* NHGiftAnimtionSDK.a in Frameworks */, | 817 | D2575C7D1E76A4F300E3A8FC /* NHGiftAnimtionSDK.a in Frameworks */, |
| 816 | D2994BAA1E8F490700E8D2CC /* CNLiveMsgTools.framework in Frameworks */, | 818 | D2994BAA1E8F490700E8D2CC /* CNLiveMsgTools.framework in Frameworks */, |
| 817 | 4BD856191EBAD4E30082061D /* CNLiveUserSystemSDK.framework in Frameworks */, | 819 | 4BD856191EBAD4E30082061D /* CNLiveUserSystemSDK.framework in Frameworks */, |
| 818 | - 811BB6831E8106A2005C6291 /* CNLivePlayerSDK.framework in Frameworks */, | ||
| 819 | D2994BA61E8F48DE00E8D2CC /* CNLiveChatManager.framework in Frameworks */, | 820 | D2994BA61E8F48DE00E8D2CC /* CNLiveChatManager.framework in Frameworks */, |
| 820 | D2994BA81E8F490400E8D2CC /* CNLiveChatManager.framework in Frameworks */, | 821 | D2994BA81E8F490400E8D2CC /* CNLiveChatManager.framework in Frameworks */, |
| 822 | + 8157A0191EE1452800ADD6B9 /* CNLivePlayerSDK.framework in Frameworks */, | ||
| 821 | ); | 823 | ); |
| 822 | runOnlyForDeploymentPostprocessing = 0; | 824 | runOnlyForDeploymentPostprocessing = 0; |
| 823 | }; | 825 | }; |
| @@ -1104,9 +1106,9 @@ | @@ -1104,9 +1106,9 @@ | ||
| 1104 | 812E504E1E7699B9004F5FCD /* CNLiveSDK */ = { | 1106 | 812E504E1E7699B9004F5FCD /* CNLiveSDK */ = { |
| 1105 | isa = PBXGroup; | 1107 | isa = PBXGroup; |
| 1106 | children = ( | 1108 | children = ( |
| 1109 | + 8157A0171EE1451800ADD6B9 /* CNLivePlayerSDK.framework */, | ||
| 1107 | D2994BA41E8F48DE00E8D2CC /* CNLiveChatManager.framework */, | 1110 | D2994BA41E8F48DE00E8D2CC /* CNLiveChatManager.framework */, |
| 1108 | D2994BA51E8F48DE00E8D2CC /* CNLiveMsgTools.framework */, | 1111 | D2994BA51E8F48DE00E8D2CC /* CNLiveMsgTools.framework */, |
| 1109 | - 811BB6821E8106A2005C6291 /* CNLivePlayerSDK.framework */, | ||
| 1110 | D25BF87C1E7B8C78007FB138 /* KSYGPUResource.bundle */, | 1112 | D25BF87C1E7B8C78007FB138 /* KSYGPUResource.bundle */, |
| 1111 | ); | 1113 | ); |
| 1112 | path = CNLiveSDK; | 1114 | path = CNLiveSDK; |
LiveVideoCloud/Classes/CNLiveSDK/CNLivePlayerSDK.framework/CNLivePlayerSDK
No preview for this file type
LiveVideoCloud/Classes/CNLiveSDK/CNLivePlayerSDK.framework/Headers/CNLiveAudioCapture.h
| @@ -26,7 +26,13 @@ | @@ -26,7 +26,13 @@ | ||
| 26 | @abstract 设置mic采集的声音音量 | 26 | @abstract 设置mic采集的声音音量 |
| 27 | @discussion 调整范围 0.0~1.0 | 27 | @discussion 调整范围 0.0~1.0 |
| 28 | */ | 28 | */ |
| 29 | -@property(nonatomic, assign) Float32 micVolume; | 29 | +@property(nonatomic, assign) float micVolume; |
| 30 | + | ||
| 31 | +/** | ||
| 32 | + @abstract 设置耳返音量 | ||
| 33 | + @discussion 调整范围 0.0~1.0 | ||
| 34 | + */ | ||
| 35 | +@property(nonatomic, assign) Float32 bPlayVolume; | ||
| 30 | 36 | ||
| 31 | /** | 37 | /** |
| 32 | @abstract 混响类型 | 38 | @abstract 混响类型 |
| @@ -40,4 +46,16 @@ | @@ -40,4 +46,16 @@ | ||
| 40 | */ | 46 | */ |
| 41 | @property(nonatomic, assign) int reverbType; | 47 | @property(nonatomic, assign) int reverbType; |
| 42 | 48 | ||
| 49 | +/** | ||
| 50 | + @abstract 音效类型 | ||
| 51 | + @discussion 目前提供了4种音效类型, type和音效的对应关系如下 | ||
| 52 | + | ||
| 53 | + - 0 关闭 | ||
| 54 | + - 1 大叔 | ||
| 55 | + - 2 萝莉 | ||
| 56 | + - 3 庄严 | ||
| 57 | + - 4 机器人 | ||
| 58 | + */ | ||
| 59 | +@property (nonatomic, assign) int audioEffectType; | ||
| 60 | + | ||
| 43 | @end | 61 | @end |
LiveVideoCloud/Classes/CNLiveSDK/CNLivePlayerSDK.framework/Headers/CNLiveBgmPlayer.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveBgmPlayer.h | ||
| 3 | +// CNLivePlayerSDKDemo | ||
| 4 | +// | ||
| 5 | +// Created by iOS on 17/4/18. | ||
| 6 | +// Copyright © 2017年 雷浩杰. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | +#import <AVFoundation/AVFoundation.h> | ||
| 11 | +#import "CNLiveTypeDef.h" | ||
| 12 | + | ||
| 13 | +@interface CNLiveBgmPlayer : NSObject | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + @abstract 开始播放背景音乐 | ||
| 17 | + @param path 本地音乐的路径 | ||
| 18 | + @param loop 是否循环播放此音乐 | ||
| 19 | + @return 是否能够开始播放 | ||
| 20 | + */ | ||
| 21 | +- (BOOL) startPlayBgm:(NSString*) path | ||
| 22 | + isLoop:(BOOL) loop; | ||
| 23 | +/** | ||
| 24 | + @abstract 停止播放背景音乐 | ||
| 25 | + */ | ||
| 26 | +- (void) stopPlayBgm; | ||
| 27 | +/** | ||
| 28 | + @abstract 暂停播放背景音乐 | ||
| 29 | + */ | ||
| 30 | +- (void) pauseBgm; | ||
| 31 | +/** | ||
| 32 | + @abstract 恢复播放背景音乐 | ||
| 33 | + */ | ||
| 34 | +- (void) resumeBgm; | ||
| 35 | + | ||
| 36 | +/** | ||
| 37 | + @abstract seek到指定时间 (拖动进度条) | ||
| 38 | + @param time 时间, 请参考 bgmDuration (单位,秒) | ||
| 39 | + @return 是否seek 成功 | ||
| 40 | + */ | ||
| 41 | +- (BOOL) seekToTime:(float)time; | ||
| 42 | + | ||
| 43 | +/** | ||
| 44 | + @abstract seek到指定进度 (拖动进度条) | ||
| 45 | + @param prog 进度, 请参考 bgmProgress | ||
| 46 | + @return 是否seek 成功 | ||
| 47 | + */ | ||
| 48 | +- (BOOL) seekToProgress:(float)prog; | ||
| 49 | + | ||
| 50 | +/** | ||
| 51 | + @abstract 背景音乐的音量 | ||
| 52 | + @discussion 调整范围 0.0~1.0 | ||
| 53 | + @discussion 仅仅调整播放的音量, 不影响回调的音频数据 | ||
| 54 | + */ | ||
| 55 | +@property (nonatomic, assign) double bgmVolume; | ||
| 56 | + | ||
| 57 | +/** | ||
| 58 | + @abstract 播放声音的音调 | ||
| 59 | + @discussion 调整范围 [-24.0 ~ 24.0], 默认为0.01, 单位为半音 | ||
| 60 | + @discussion 0.01 为1度, 1.0为一个半音, 12个半音为1个八度 | ||
| 61 | + */ | ||
| 62 | +@property (nonatomic, assign) double bgmPitch; | ||
| 63 | + | ||
| 64 | +/** | ||
| 65 | + @abstract 背景音乐播放静音 | ||
| 66 | + @discussion 仅仅静音播放, 不影响回调的音频数据 | ||
| 67 | + */ | ||
| 68 | +@property (nonatomic, assign) BOOL bMutBgmPlay; | ||
| 69 | + | ||
| 70 | +#pragma mark - callbacks | ||
| 71 | +/** | ||
| 72 | + @abstract 音频数据输出回调 | ||
| 73 | + @discussion sampleBuffer 从音乐文件中解码得到的PCM数据 | ||
| 74 | + */ | ||
| 75 | +@property(nonatomic, copy) BOOL (^cnBgmAudioDataBlock)(uint8_t** pData, int len, const AudioStreamBasicDescription* fmt, CMTime pts); | ||
| 76 | + | ||
| 77 | +/** | ||
| 78 | + @abstract 当背景音乐播放完成时,调用此回调函数 | ||
| 79 | + @discussion 只有设置 loop为NO时才有效, 在开始播放前设置有效 | ||
| 80 | + */ | ||
| 81 | +@property(nonatomic, copy) void(^cnBgmFinishBlock)(void); | ||
| 82 | + | ||
| 83 | +#pragma mark - player state | ||
| 84 | +/** | ||
| 85 | + @abstract 背景音的duration信息(总时长, 单位:秒) | ||
| 86 | + */ | ||
| 87 | +@property (nonatomic, readonly) float bgmDuration; | ||
| 88 | + | ||
| 89 | +/** | ||
| 90 | + @abstract 背景音的已经播放长度 (单位:秒) | ||
| 91 | + @discussion 从0开始,最大为bgmDuration长度 | ||
| 92 | + */ | ||
| 93 | +@property (nonatomic, readonly) float bgmPlayTime; | ||
| 94 | + | ||
| 95 | +/** | ||
| 96 | + @abstract 音频的播放进度 | ||
| 97 | + @discussion 取值从0.0~1.0,大小为bgmPlayTime/bgmDuration; | ||
| 98 | + */ | ||
| 99 | +@property (nonatomic, readonly) float bgmProcess; | ||
| 100 | + | ||
| 101 | +/** | ||
| 102 | + @abstract 音频播放是否运行 | ||
| 103 | + @discussion 音频是否输出到speaker播放 | ||
| 104 | + */ | ||
| 105 | +@property (nonatomic, readonly) BOOL isRunning; | ||
| 106 | + | ||
| 107 | +/** | ||
| 108 | + @abstract 播放错误码 | ||
| 109 | + @discussion 播放错误码具体内容可以参考AudioQueue的Apple文档。 | ||
| 110 | + */ | ||
| 111 | +@property (nonatomic, readonly) OSStatus audioErrorCode; | ||
| 112 | + | ||
| 113 | +/** | ||
| 114 | + @abstract 播放状态 | ||
| 115 | + */ | ||
| 116 | +@property (nonatomic, readonly) CNLiveBgmPlayerState bgmPlayerState; | ||
| 117 | + | ||
| 118 | +/** | ||
| 119 | + @abstract 单曲循环 | ||
| 120 | + */ | ||
| 121 | +@property (nonatomic, assign) BOOL bLoop; | ||
| 122 | + | ||
| 123 | +// Posted when audio state changes | ||
| 124 | +FOUNDATION_EXPORT NSString *const CNLiveBgmAudioStateDidChangeNotification NS_AVAILABLE_IOS(7_0); | ||
| 125 | + | ||
| 126 | +@end |
LiveVideoCloud/Classes/CNLiveSDK/CNLivePlayerSDK.framework/Headers/CNLiveGPUStreamerKit.h
| @@ -9,22 +9,39 @@ | @@ -9,22 +9,39 @@ | ||
| 9 | #import <Foundation/Foundation.h> | 9 | #import <Foundation/Foundation.h> |
| 10 | #import "CNLiveWebcastManager.h" | 10 | #import "CNLiveWebcastManager.h" |
| 11 | #import <AVFoundation/AVFoundation.h> | 11 | #import <AVFoundation/AVFoundation.h> |
| 12 | +#import "CNLiveBgmPlayer.h" | ||
| 12 | 13 | ||
| 13 | @interface CNLiveGPUStreamerKit : NSObject | 14 | @interface CNLiveGPUStreamerKit : NSObject |
| 14 | 15 | ||
| 15 | #pragma mark - 使用视讯云平台 | 16 | #pragma mark - 使用视讯云平台 |
| 16 | 17 | ||
| 17 | /** | 18 | /** |
| 18 | - @abstract 初始化 | 19 | + @abstract 初始化(不会打断其他后台的音乐播放) |
| 19 | @warning 实例化的对象必须赋值给一个全局变量 | 20 | @warning 实例化的对象必须赋值给一个全局变量 |
| 20 | - @param activityId 活动ID,确保SP下的唯一性 | ||
| 21 | - @param channelId 主播ID | ||
| 22 | - @param isHorizontalScreen 屏幕方向,0:垂直即竖屏 /1:水平即横屏 ,默认为1 | 21 | + @param pureAudioMode YES:纯音频推流 |
| 23 | @warning 必传参数 | 22 | @warning 必传参数 |
| 24 | */ | 23 | */ |
| 25 | --(instancetype)initWithDefaultConfigWithActivityId:(NSString *)activityId | ||
| 26 | - channelId:(NSString *)channelId | ||
| 27 | - isHorizontalScreen:(NSString *)isHorizontalScreen; | 24 | +-(instancetype)initCNLiveKitWithDefaultConfigWithPureAudioMode:(BOOL)mode; |
| 25 | + | ||
| 26 | +/** | ||
| 27 | + @abstract 初始化(会打断其他后台的音乐播放) | ||
| 28 | + @warning 实例化的对象必须赋值给一个全局变量 | ||
| 29 | + @param pureAudioMode YES:纯音频推流 | ||
| 30 | + @warning 必传参数 | ||
| 31 | + */ | ||
| 32 | +-(instancetype)initCNLiveKitWithInterruptConfigWithPureAudioMode:(BOOL)mode; | ||
| 33 | + | ||
| 34 | +/** | ||
| 35 | + @abstract 活动ID,确保SP下的唯一性 | ||
| 36 | + @discussion 必传参数 | ||
| 37 | + */ | ||
| 38 | +@property (nonatomic, strong) NSString *activityId; | ||
| 39 | + | ||
| 40 | +/** | ||
| 41 | + @abstract 主播ID | ||
| 42 | + @discussion 必传参数 | ||
| 43 | + */ | ||
| 44 | +@property (nonatomic, strong) NSString *channelId; | ||
| 28 | 45 | ||
| 29 | /** | 46 | /** |
| 30 | @abstract 是否开启控制台输出日志 | 47 | @abstract 是否开启控制台输出日志 |
| @@ -33,6 +50,11 @@ | @@ -33,6 +50,11 @@ | ||
| 33 | @property (nonatomic, assign) BOOL logPrintEnable; | 50 | @property (nonatomic, assign) BOOL logPrintEnable; |
| 34 | 51 | ||
| 35 | /** | 52 | /** |
| 53 | + @abstract 屏幕方向,0:垂直即竖屏 /1:水平即横屏 ,默认为0 | ||
| 54 | + */ | ||
| 55 | +@property (nonatomic, assign) BOOL isHorizontalScreen; | ||
| 56 | + | ||
| 57 | +/** | ||
| 36 | @abstract 活动名称(非必传) | 58 | @abstract 活动名称(非必传) |
| 37 | */ | 59 | */ |
| 38 | @property (nonatomic, strong) NSString *activityName; | 60 | @property (nonatomic, strong) NSString *activityName; |
| @@ -74,17 +96,34 @@ | @@ -74,17 +96,34 @@ | ||
| 74 | 96 | ||
| 75 | /** | 97 | /** |
| 76 | @abstract 启动推流 | 98 | @abstract 启动推流 |
| 77 | - @warning 鉴权成功后开启推流 | 99 | + @warning 鉴权成功后开启推流(SDK内部创建活动并开启推流) |
| 100 | + */ | ||
| 101 | +- (void)startStream:(void (^)(void))successBlock failure:(void (^)(NSDictionary *errorDic))failureBlock; | ||
| 102 | + | ||
| 103 | +/** | ||
| 104 | + @abstract 启动推流 | ||
| 105 | + @param url 推流地址 | ||
| 106 | + @param activityId 活动ID | ||
| 107 | + @warning 后台创建活动完成,开启推流(仅视讯云平台有效) | ||
| 78 | */ | 108 | */ |
| 79 | -- (void) startStream:(void (^)(void))successBlock failure:(void (^)(NSDictionary *errorDic))failureBlock; | 109 | +- (void)startStreamWithUrl:(NSString *)url activityId:(NSString *)activityId success:(void (^)(void))successBlock failure:(void (^)(NSDictionary *errorDic))failureBlock; |
| 110 | + | ||
| 80 | 111 | ||
| 81 | #pragma mark - 普通推流 | 112 | #pragma mark - 普通推流 |
| 82 | 113 | ||
| 83 | /** | 114 | /** |
| 84 | - @abstract 初始化 | 115 | + @abstract 初始化(不会打断其他后台的音乐播放) |
| 116 | + @param mode YES:纯音频推流 | ||
| 117 | + @warning 实例化的对象必须赋值给一个全局变量 | ||
| 118 | + */ | ||
| 119 | +-(instancetype)initWithDefaultConfigWithPureAudioMode:(BOOL)mode; | ||
| 120 | + | ||
| 121 | +/** | ||
| 122 | + @abstract 初始化(会打断其他后台的音乐播放) | ||
| 123 | + @param mode YES:纯音频推流 | ||
| 85 | @warning 实例化的对象必须赋值给一个全局变量 | 124 | @warning 实例化的对象必须赋值给一个全局变量 |
| 86 | */ | 125 | */ |
| 87 | --(instancetype)initWithDefaultConfig; | 126 | +-(instancetype)initWithInterruptConfigWithPureAudioMode:(BOOL)mode; |
| 88 | 127 | ||
| 89 | /** | 128 | /** |
| 90 | @abstract 获取水印工具 | 129 | @abstract 获取水印工具 |
| @@ -108,6 +147,11 @@ | @@ -108,6 +147,11 @@ | ||
| 108 | */ | 147 | */ |
| 109 | @property (nonatomic, readonly) CNLiveBeautifyFaceFilter *beautifyFaceFilter; | 148 | @property (nonatomic, readonly) CNLiveBeautifyFaceFilter *beautifyFaceFilter; |
| 110 | 149 | ||
| 150 | +/** | ||
| 151 | + @abstract 背景音乐工具 | ||
| 152 | + */ | ||
| 153 | +@property (nonatomic, readonly) CNLiveBgmPlayer *bgmPlayer; | ||
| 154 | + | ||
| 111 | #pragma mark - capture & preview settings | 155 | #pragma mark - capture & preview settings |
| 112 | 156 | ||
| 113 | /** | 157 | /** |
| @@ -187,6 +231,37 @@ FOUNDATION_EXPORT NSString *const CNLiveStreamStateDidChangeNotification NS_AVAI | @@ -187,6 +231,37 @@ FOUNDATION_EXPORT NSString *const CNLiveStreamStateDidChangeNotification NS_AVAI | ||
| 187 | */ | 231 | */ |
| 188 | @property (nonatomic, readonly) CNLiveStreamErrorCode streamErrorCode; | 232 | @property (nonatomic, readonly) CNLiveStreamErrorCode streamErrorCode; |
| 189 | 233 | ||
| 234 | +#pragma mark - reconnect | ||
| 235 | +/** | ||
| 236 | + @abstract 自动重连次数 关闭(0), 开启(>0), 默认为0 | ||
| 237 | + @discussion 当内部发现推流错误后, 会在一段时间后尝试重连 | ||
| 238 | + 自动重连不会重新获取推流地址, 仍然使用上次推流的地址 | ||
| 239 | + @warning 如果在推流地址有过期时间, 请勿开启 | ||
| 240 | + */ | ||
| 241 | +@property (nonatomic, assign) int maxAutoRetry; | ||
| 242 | + | ||
| 243 | +/** | ||
| 244 | + @abstract 自动重连延时, 发现连接错误后, 重试的延时 | ||
| 245 | + @discussion 单位为秒, 默认为2s, 最小值为0.1s | ||
| 246 | + */ | ||
| 247 | +@property (nonatomic, assign) double autoRetryDelay; | ||
| 248 | + | ||
| 249 | +/** | ||
| 250 | + @abstract 视讯云平台下重连状态(普通推流无效) | ||
| 251 | + */ | ||
| 252 | +@property (nonatomic, assign) CNLiveReconnectStatus reconnectStatus; | ||
| 253 | + | ||
| 254 | +/** | ||
| 255 | + @abstract 自动重连失败通知(注*仅视讯云平台有效,普通方法推流自动重连失败收不到该通知) | ||
| 256 | + @discussion 仅推流错误码为 CNLiveStreamErrorCode_CONNECT_BREAK、 | ||
| 257 | + CNLiveStreamErrorCode_AV_SYNC_ERROR、 | ||
| 258 | + CNLiveStreamErrorCode_Connect_Server_failed、 | ||
| 259 | + CNLiveStreamErrorCode_DNS_Parse_failed、 | ||
| 260 | + CNLiveStreamErrorCode_CODEC_OPEN_FAILED、 | ||
| 261 | + CNLiveStreamErrorCode_ABNORMAL 时为可重连状态; | ||
| 262 | + */ | ||
| 263 | +FOUNDATION_EXPORT NSString *const CNLiveStreamReconnectStatusChangedNotification NS_AVAILABLE_IOS(7_0); | ||
| 264 | + | ||
| 190 | /** | 265 | /** |
| 191 | @abstract 切换摄像头 | 266 | @abstract 切换摄像头 |
| 192 | @return TRUE: 成功切换摄像头,开启预览后设置有效 | 267 | @return TRUE: 成功切换摄像头,开启预览后设置有效 |
| @@ -237,6 +312,18 @@ FOUNDATION_EXPORT NSString *const CNLiveStreamStateDidChangeNotification NS_AVAI | @@ -237,6 +312,18 @@ FOUNDATION_EXPORT NSString *const CNLiveStreamStateDidChangeNotification NS_AVAI | ||
| 237 | - (void) stopStream; | 312 | - (void) stopStream; |
| 238 | 313 | ||
| 239 | /** | 314 | /** |
| 315 | + @abstract 开始录制本地视频(不支持边推边录) | ||
| 316 | + @param path 本地存储路径 | ||
| 317 | + */ | ||
| 318 | +- (void)startRecordWithFilePath:(NSString *)path; | ||
| 319 | + | ||
| 320 | +/** | ||
| 321 | + @abstract 停止录制本地视频 | ||
| 322 | + @discussion 与 - (void)startRecordWithFilePath: 搭配使用 | ||
| 323 | + */ | ||
| 324 | +- (void)stopRecord; | ||
| 325 | + | ||
| 326 | +/** | ||
| 240 | @abstract 进入后台: 暂停图像采集 | 327 | @abstract 进入后台: 暂停图像采集 |
| 241 | @discussion 暂停图像采集和预览 | 328 | @discussion 暂停图像采集和预览 |
| 242 | */ | 329 | */ |
| @@ -248,6 +335,11 @@ FOUNDATION_EXPORT NSString *const CNLiveStreamStateDidChangeNotification NS_AVAI | @@ -248,6 +335,11 @@ FOUNDATION_EXPORT NSString *const CNLiveStreamStateDidChangeNotification NS_AVAI | ||
| 248 | */ | 335 | */ |
| 249 | - (void) appBecomeActive; | 336 | - (void) appBecomeActive; |
| 250 | 337 | ||
| 338 | +/** | ||
| 339 | + @abstract 退出推流页面时调用 | ||
| 340 | + */ | ||
| 341 | +- (void)quitStreaming; | ||
| 342 | + | ||
| 251 | #pragma mark - mirror & rotate | 343 | #pragma mark - mirror & rotate |
| 252 | 344 | ||
| 253 | /** | 345 | /** |
| @@ -290,4 +382,5 @@ FOUNDATION_EXPORT NSString *const CNLiveStreamStateDidChangeNotification NS_AVAI | @@ -290,4 +382,5 @@ FOUNDATION_EXPORT NSString *const CNLiveStreamStateDidChangeNotification NS_AVAI | ||
| 290 | */ | 382 | */ |
| 291 | @property (nonatomic, assign) CGFloat pinchZoomFactor; | 383 | @property (nonatomic, assign) CGFloat pinchZoomFactor; |
| 292 | 384 | ||
| 385 | + | ||
| 293 | @end | 386 | @end |
LiveVideoCloud/Classes/CNLiveSDK/CNLivePlayerSDK.framework/Headers/CNLiveMoviePlayerController.h
| @@ -72,6 +72,11 @@ | @@ -72,6 +72,11 @@ | ||
| 72 | */ | 72 | */ |
| 73 | - (void)retryToGetAnchorStatusResult:(void(^)(BOOL result))result; | 73 | - (void)retryToGetAnchorStatusResult:(void(^)(BOOL result))result; |
| 74 | 74 | ||
| 75 | +/** | ||
| 76 | + * 销毁播放器 | ||
| 77 | + */ | ||
| 78 | +- (void)destroyPlayer; | ||
| 79 | + | ||
| 75 | /* 主播直播状态(只读) | 80 | /* 主播直播状态(只读) |
| 76 | * | 81 | * |
| 77 | */ | 82 | */ |
LiveVideoCloud/Classes/CNLiveSDK/CNLivePlayerSDK.framework/Headers/CNLiveTypeDef.h
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | 11 | ||
| 12 | #pragma mark - Video Dimension | 12 | #pragma mark - Video Dimension |
| 13 | 13 | ||
| 14 | -/// 采集分辨率 | 14 | +/// 采集分辨率(弃用) |
| 15 | typedef NS_ENUM(NSUInteger, CNLiveVideoDimension) { | 15 | typedef NS_ENUM(NSUInteger, CNLiveVideoDimension) { |
| 16 | /// 16 : 9 宽高比,1280 x 720 分辨率 | 16 | /// 16 : 9 宽高比,1280 x 720 分辨率 |
| 17 | CNLiveVideoDimension_16_9__1280x720 = 0, | 17 | CNLiveVideoDimension_16_9__1280x720 = 0, |
| @@ -146,6 +146,13 @@ typedef NS_ENUM(NSUInteger, CNLiveStreamErrorCode) { | @@ -146,6 +146,13 @@ typedef NS_ENUM(NSUInteger, CNLiveStreamErrorCode) { | ||
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | #pragma mark - 美颜 | 148 | #pragma mark - 美颜 |
| 149 | +typedef NS_ENUM(NSUInteger, CNLiveReconnectStatus) { | ||
| 150 | + CNLiveReconnectStatusStart = 0, | ||
| 151 | + CNLiveReconnectStatusSuccess, | ||
| 152 | + CNLiveReconnectStatusFailed | ||
| 153 | +}; | ||
| 154 | + | ||
| 155 | +#pragma mark - 美颜 | ||
| 149 | 156 | ||
| 150 | typedef NS_ENUM(NSUInteger, CNLiveBeautyType) { | 157 | typedef NS_ENUM(NSUInteger, CNLiveBeautyType) { |
| 151 | ///无 | 158 | ///无 |
| @@ -170,7 +177,39 @@ typedef NS_ENUM(NSUInteger, CNLiveSpecialEffects) { | @@ -170,7 +177,39 @@ typedef NS_ENUM(NSUInteger, CNLiveSpecialEffects) { | ||
| 170 | ///蓝调 | 177 | ///蓝调 |
| 171 | CNLiveSpecialEffectsBlues, | 178 | CNLiveSpecialEffectsBlues, |
| 172 | ///老照片 | 179 | ///老照片 |
| 173 | - CNLiveSpecialEffectsOldPicture | 180 | + CNLiveSpecialEffectsOldPicture, |
| 181 | + ///樱花 | ||
| 182 | + CNLiveSpecialEffectsCherry, | ||
| 183 | + ///樱花(光线较暗) | ||
| 184 | + CNLiveSpecialEffectsCherryDark, | ||
| 185 | + ///红润(光线较暗) | ||
| 186 | + CNLiveSpecialEffectsRuddyDark, | ||
| 187 | + ///阳光(光线较暗) | ||
| 188 | + CNLiveSpecialEffectsSunlightDark, | ||
| 189 | + ///红润 | ||
| 190 | + CNLiveSpecialEffectsRuddy, | ||
| 191 | + ///阳光 | ||
| 192 | + CNLiveSpecialEffectsSunlight, | ||
| 193 | + ///自然 | ||
| 194 | + CNLiveSpecialEffectsNature | ||
| 195 | +}; | ||
| 196 | + | ||
| 197 | +#pragma mark - 音频播放状态 | ||
| 198 | +typedef NS_ENUM(NSUInteger, CNLiveBgmPlayerState) { | ||
| 199 | + /// 初始状态 | ||
| 200 | + CNLiveBgmPlayerStateInit, | ||
| 201 | + /// 背景音正在播放 | ||
| 202 | + CNLiveBgmPlayerStateStarting, | ||
| 203 | + /// 背景音停止 | ||
| 204 | + CNLiveBgmPlayerStateStopped, | ||
| 205 | + /// 背景音正在播放 | ||
| 206 | + CNLiveBgmPlayerStatePlaying, | ||
| 207 | + /// 背景音暂停 | ||
| 208 | + CNLiveBgmPlayerStatePaused, | ||
| 209 | + /// 背景音播放出错 | ||
| 210 | + CNLiveBgmPlayerStateError, | ||
| 211 | + /// 背景音被打断 | ||
| 212 | + CNLiveBgmPlayerStateInterrupted | ||
| 174 | }; | 213 | }; |
| 175 | 214 | ||
| 176 | #pragma mark - player | 215 | #pragma mark - player |
LiveVideoCloud/Classes/CNLiveSDK/CNLivePlayerSDK.framework/Headers/CNLiveWebcastManager.h
| @@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
| 14 | #import "CNLiveAudioCapture.h" | 14 | #import "CNLiveAudioCapture.h" |
| 15 | #import "CNLiveGPUStreamerKit.h" | 15 | #import "CNLiveGPUStreamerKit.h" |
| 16 | #import "CNLiveMoviePlayerController.h" | 16 | #import "CNLiveMoviePlayerController.h" |
| 17 | +#import "CNLiveBgmPlayer.h" | ||
| 17 | 18 | ||
| 18 | @interface CNLiveWebcastManager : NSObject | 19 | @interface CNLiveWebcastManager : NSObject |
| 19 | 20 | ||
| @@ -42,4 +43,5 @@ | @@ -42,4 +43,5 @@ | ||
| 42 | */ | 43 | */ |
| 43 | + (NSString *)getVersion; | 44 | + (NSString *)getVersion; |
| 44 | 45 | ||
| 46 | + | ||
| 45 | @end | 47 | @end |
LiveVideoCloud/Classes/CNLiveSDK/CNLivePlayerSDK.framework/Info.plist
No preview for this file type