修复bug
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 51;
|
||||
objectVersion = 52;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@@ -174,6 +174,8 @@
|
||||
2331C1BD2A60F69E00E1D940 /* UILabel+Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 2331C1BC2A60F69E00E1D940 /* UILabel+Utils.m */; };
|
||||
2369F9912A89CE0E00563B48 /* PIUserSexView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2369F9902A89CE0E00563B48 /* PIUserSexView.m */; };
|
||||
2369F9932A8B21EB00563B48 /* pi_treasure_fairy_gift_bg.svga in Resources */ = {isa = PBXBuildFile; fileRef = 2369F9922A8B21EA00563B48 /* pi_treasure_fairy_gift_bg.svga */; };
|
||||
236B2E1E2AA0786E003967A8 /* SudMGP.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 236B2E1D2AA0786E003967A8 /* SudMGP.xcframework */; };
|
||||
236B2E1F2AA079A7003967A8 /* SudMGP.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 236B2E1D2AA0786E003967A8 /* SudMGP.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
237B94BC2A984DA7007853E3 /* XPTrumpetPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94AE2A984DA7007853E3 /* XPTrumpetPresenter.m */; };
|
||||
237B94BD2A984DA7007853E3 /* XPNobleTrumpetModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94B32A984DA7007853E3 /* XPNobleTrumpetModel.m */; };
|
||||
237B94BE2A984DA7007853E3 /* XPRoomTrumpetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94B72A984DA7007853E3 /* XPRoomTrumpetViewController.m */; };
|
||||
@@ -1319,6 +1321,7 @@
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
236B2E1F2AA079A7003967A8 /* SudMGP.xcframework in Embed Frameworks */,
|
||||
1427212629A7566100C7C423 /* ZegoAudioRoom.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
@@ -1676,6 +1679,7 @@
|
||||
2369F98F2A89CE0E00563B48 /* PIUserSexView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PIUserSexView.h; sourceTree = "<group>"; };
|
||||
2369F9902A89CE0E00563B48 /* PIUserSexView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PIUserSexView.m; sourceTree = "<group>"; };
|
||||
2369F9922A8B21EA00563B48 /* pi_treasure_fairy_gift_bg.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_treasure_fairy_gift_bg.svga; sourceTree = "<group>"; };
|
||||
236B2E1D2AA0786E003967A8 /* SudMGP.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = SudMGP.xcframework; sourceTree = "<group>"; };
|
||||
237B94AD2A984DA7007853E3 /* XPTrumpetPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPTrumpetPresenter.h; sourceTree = "<group>"; };
|
||||
237B94AE2A984DA7007853E3 /* XPTrumpetPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPTrumpetPresenter.m; sourceTree = "<group>"; };
|
||||
237B94B02A984DA7007853E3 /* XPRoomTrumpetProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPRoomTrumpetProtocol.h; sourceTree = "<group>"; };
|
||||
@@ -3837,6 +3841,7 @@
|
||||
files = (
|
||||
73FFADDC93E195344047A2EC /* Pods_YuMi.framework in Frameworks */,
|
||||
186A531926FC592100D67B2C /* libresolv.tbd in Frameworks */,
|
||||
236B2E1E2AA0786E003967A8 /* SudMGP.xcframework in Frameworks */,
|
||||
E87888F42738C30E00BF1D57 /* StoreKit.framework in Frameworks */,
|
||||
9BA8A47727C60DF7000365A3 /* AVFoundation.framework in Frameworks */,
|
||||
1427212529A7566100C7C423 /* ZegoAudioRoom.framework in Frameworks */,
|
||||
@@ -4231,6 +4236,7 @@
|
||||
23E9E9B62A82200500B792F2 /* GoogleService-Info.plist */,
|
||||
E8729EBA2A3B10C10076D80A /* YuMi.entitlements */,
|
||||
E8729EB92A3B10C10076D80A /* YuMiRelease.entitlements */,
|
||||
236B2E1B2AA0786E003967A8 /* Library */,
|
||||
189DD56C26DF5B5400AB55B1 /* CustomUI */,
|
||||
189DD5A726DFA09700AB55B1 /* Tools */,
|
||||
14D8768429A752B500E1DD7F /* Network */,
|
||||
@@ -4872,6 +4878,22 @@
|
||||
path = UILabel;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
236B2E1B2AA0786E003967A8 /* Library */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
236B2E1C2AA0786E003967A8 /* SudMGPSDK */,
|
||||
);
|
||||
path = Library;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
236B2E1C2AA0786E003967A8 /* SudMGPSDK */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
236B2E1D2AA0786E003967A8 /* SudMGP.xcframework */,
|
||||
);
|
||||
path = SudMGPSDK;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
237B94AB2A984DA7007853E3 /* NobleTrumpet */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
40
YuMi/Library/SudMGPSDK/SudMGP.xcframework/Info.plist
Normal file
40
YuMi/Library/SudMGPSDK/SudMGP.xcframework/Info.plist
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SudMGP.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SudMGP.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
@@ -0,0 +1,52 @@
|
||||
|
||||
//
|
||||
// Created by Herbert on 2021/10/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol IRTSSEventHandler;
|
||||
|
||||
@interface IRTSSStartOption : NSObject
|
||||
@property (nonatomic, copy) NSString * keyword;
|
||||
@property (nonatomic, copy) NSArray * keywordList;
|
||||
@property (nonatomic, copy) NSString * wordLanguage;
|
||||
@property (nonatomic, copy) NSString * wordType;
|
||||
@property (nonatomic, assign) BOOL isCloseConnHitted;
|
||||
@property (nonatomic, assign) BOOL enableIsHit;
|
||||
@property (nonatomic, assign) BOOL enableIsReturnText;
|
||||
@property (nonatomic, copy) NSDictionary * extra;
|
||||
@end
|
||||
|
||||
|
||||
/*
|
||||
* 接口要确保在UI线程中调用
|
||||
*/
|
||||
@protocol IRTSS <NSObject>
|
||||
|
||||
|
||||
|
||||
/// 初始化SDK
|
||||
/// @param organization <#organization description#>
|
||||
/// @param accessKey <#accessKey description#>
|
||||
/// @param appId <#appId description#>
|
||||
/// @param wsURL <#wsURL description#>
|
||||
/// @param httpUrl <#httpUrl description#>
|
||||
- (BOOL)init:(NSString *)organization accessKey:(NSString *)accessKey appId:(NSString *)appId wsURL:(NSString*)wsURL httpUrl:(NSString*)httpUrl language:(NSString *)language;
|
||||
|
||||
|
||||
- (BOOL)start:(IRTSSStartOption *)option listener:(id<IRTSSEventHandler>)listener;
|
||||
|
||||
/// 传入的音频数据必须是:PCM格式,采样率:16000, 采样位数:16, 声道数: MONO
|
||||
/// @param data PCM数据
|
||||
- (void)push:(NSData *)data;
|
||||
|
||||
|
||||
/// 断开连接,如果想继续工作,必须重新调用start()新建连接
|
||||
- (void)stop;
|
||||
|
||||
|
||||
/// 销毁SDK
|
||||
- (void)destroy;
|
||||
|
||||
@end
|
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// Created by Herbert on 2021/10/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RTSSResult.h"
|
||||
|
||||
|
||||
@protocol IRTSSEventHandler <NSObject>
|
||||
|
||||
-(void)onRtssSuccess:(RTSSResult *)result repeated:(BOOL) repeated;
|
||||
|
||||
-(void)onRtssError:(NSInteger)errCode errMsg:(NSString *)errMsg;
|
||||
|
||||
@end
|
@@ -0,0 +1,10 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ISudAPPD : NSObject
|
||||
+ (void)e:(int)v;
|
||||
+ (void)d;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,15 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol ISudASR <NSObject>
|
||||
|
||||
/**
|
||||
* 传入的音频数据必须是:PCM格式,采样率:16000, 采样位数:16, 声道数: MONO
|
||||
* data一定都要是有效数据,否则精确性有影响
|
||||
*/
|
||||
- (void) pushAudio:(NSData *)data;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,55 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol ISudFSMStateHandle;
|
||||
|
||||
@protocol ISudFSMMG <NSObject>
|
||||
|
||||
/// 游戏日志
|
||||
/// 最低版本:v1.1.30.xx
|
||||
-(void) onGameLog:(NSString*)dataJson;
|
||||
|
||||
/// 游戏开始
|
||||
/// 最低版本:v1.1.30.xx
|
||||
-(void) onGameStarted;
|
||||
|
||||
/// 游戏销毁
|
||||
/// 最低版本:v1.1.30.xx
|
||||
-(void) onGameDestroyed;
|
||||
|
||||
/// 短期令牌code过期
|
||||
/// APP接入方需要调用handle.success或handle.fail
|
||||
/// @param dataJson {"code":"value"}
|
||||
-(void) onExpireCode:(id<ISudFSMStateHandle>)handle dataJson:(NSString*)dataJson;
|
||||
|
||||
/// 获取游戏View信息
|
||||
/// APP接入方需要调用handle.success或handle.fail
|
||||
/// @param handle ISudFSMStateHandle
|
||||
/// @param dataJson {}
|
||||
-(void) onGetGameViewInfo:(id<ISudFSMStateHandle>) handle dataJson:(NSString*)dataJson;
|
||||
|
||||
/// 获取游戏Config
|
||||
/// APP接入方需要调用handle.success或handle.fail
|
||||
/// @param handle ISudFSMStateHandle
|
||||
/// @param dataJson dataJson
|
||||
/// 最低版本:v1.1.30.xx
|
||||
-(void) onGetGameCfg:(id<ISudFSMStateHandle>) handle dataJson:(NSString*)dataJson;
|
||||
|
||||
/// 游戏状态变化
|
||||
/// APP接入方需要调用handle.success或handle.fail
|
||||
/// @param handle ISudFSMStateHandle
|
||||
/// @param state state
|
||||
/// @param dataJson dataJson
|
||||
-(void) onGameStateChange:(id<ISudFSMStateHandle>) handle state:(NSString*) state dataJson:(NSString*) dataJson;
|
||||
|
||||
/// 游戏玩家状态变化
|
||||
/// APP接入方需要调用handle.success或handle.fail
|
||||
/// @param handle ISudFSMStateHandle
|
||||
/// @param userId userId
|
||||
/// @param state state
|
||||
/// @param dataJson dataJson
|
||||
-(void) onPlayerStateChange:(nullable id<ISudFSMStateHandle>) handle userId:(NSString*) userId state:(NSString*) state dataJson:(NSString*) dataJson;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,11 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// APP接入方需要调用handle.success或handle.fail
|
||||
@protocol ISudFSMStateHandle <NSObject>
|
||||
-(void) success:(NSString*) dataJson;
|
||||
-(void) failure:(NSString*) dataJson;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,55 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "ISudListenerNotifyStateChange.h"
|
||||
#import "ISudListenerASR.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol ISudFSMMG;
|
||||
@protocol ISudASR;
|
||||
|
||||
@protocol ISudFSTAPP <NSObject>
|
||||
|
||||
/// 获取游戏View
|
||||
/// @return UIView
|
||||
- (UIView *)getGameView;
|
||||
|
||||
/// 销毁游戏
|
||||
/// @return boolean
|
||||
- (bool)destroyMG;
|
||||
|
||||
/// 更新短期令牌code
|
||||
/// @param code 短期令牌code
|
||||
/// @param listener 回调只表示APP状态通知到了小游戏,不表示小游戏执行了别的逻辑代码(比如:游戏业务逻辑网络请求),一般传null。
|
||||
- (void)updateCode:(NSString *) code listener:(ISudListenerNotifyStateChange) listener;
|
||||
|
||||
/// 获取游戏状态
|
||||
/// @param state state
|
||||
/// @return json
|
||||
- (NSString*)getGameState:(NSString*) state;
|
||||
|
||||
/// 获取玩家状态
|
||||
/// @param userId userId
|
||||
/// @param state state
|
||||
/// @return json
|
||||
- (NSString*)getPlayerState:(NSString*) userId state:(NSString*) state;
|
||||
|
||||
/// APP状态通知给小游戏
|
||||
/// @param state state
|
||||
/// @param dataJson example: {"key": "value"}
|
||||
/// @param listener 回调只表示APP状态通知到了小游戏,不表示小游戏执行了别的逻辑代码(比如:游戏业务逻辑网络请求),一般传null。
|
||||
- (void)notifyStateChange:(const NSString *)state dataJson:(NSString *)dataJson listener:(ISudListenerNotifyStateChange) listener;
|
||||
|
||||
/// 继续游戏
|
||||
- (void) playMG;
|
||||
|
||||
/// 暂停游戏
|
||||
- (void) pauseMG;
|
||||
|
||||
/// 传入的音频数据必须是:PCM格式,采样率:16000, 采样位数:16, 声道数: MONO
|
||||
/// @param data pcm数据
|
||||
- (void)pushAudio:(NSData *)data;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,6 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^ISudListenerASRResult)(NSString * asrResult, NSArray * asrResults);
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,9 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class GameInfo;
|
||||
|
||||
typedef void (^ISudListenerGetFQSInfo)(int retCode, const NSString* retMsg, NSString* sdkTokenUrl);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,9 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class GameInfo;
|
||||
|
||||
typedef void (^ISudListenerGetMGInfo)(int retCode, const NSString* retMsg, GameInfo* gameInfo);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^ISudListenerGetMGList)(int retCode, const NSString* retMsg, const NSString* dataJson);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^ISudListenerInitSDK)(int retCode, const NSString* retMsg);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^ISudListenerNotifyStateChange)(int retCode, const NSString* retMsg, const NSString* dataJson);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^ISudListenerUninitSDK)(int retCode, const NSString* retMsg);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,41 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Priority constant for the println method; use Log.v.
|
||||
*/
|
||||
#define LogVERBOSE 2
|
||||
|
||||
/**
|
||||
* Priority constant for the println method; use Log.d.
|
||||
*/
|
||||
#define LogDEBUG 3
|
||||
|
||||
/**
|
||||
* Priority constant for the println method; use Log.i.
|
||||
*/
|
||||
#define LogINFO 4
|
||||
|
||||
/**
|
||||
* Priority constant for the println method; use Log.w.
|
||||
*/
|
||||
#define LogWARN 5
|
||||
|
||||
/**
|
||||
* Priority constant for the println method; use Log.e.
|
||||
*/
|
||||
#define LogERROR 6
|
||||
|
||||
/**
|
||||
* Priority constant for the println method.
|
||||
*/
|
||||
#define LogASSERT 7
|
||||
|
||||
@protocol ISudLogger <NSObject>
|
||||
- (void) setLogLevel:(int) level;
|
||||
- (void) log:(int) level tag:(NSString*) tag msg:(NSString*) msg;
|
||||
- (void) log:(int) level tag:(NSString*) tag msg:(NSString*) msg error:(NSError *) error;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Created by Herbert on 2021/10/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface RTSSResult : NSObject
|
||||
|
||||
@property (nonatomic, assign) BOOL isHit;
|
||||
|
||||
@property (nonatomic, copy) NSString * keyword;
|
||||
|
||||
@property (nonatomic, copy) NSString * text;
|
||||
|
||||
@property (nonatomic, copy) NSString * wordType;
|
||||
|
||||
@property (nonatomic, copy) NSArray * keyWordList;
|
||||
|
||||
@property (nonatomic, copy) NSArray * numberList;
|
||||
|
||||
@end
|
||||
|
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// SmRtAsr.h
|
||||
// SmRtAsr
|
||||
//
|
||||
// Created by wangyankun on 2021/10/27.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
////! Project version number for SmRtAsr.
|
||||
//FOUNDATION_EXPORT double SmRtAsrVersionNumber;
|
||||
//
|
||||
////! Project version string for SmRtAsr.
|
||||
//FOUNDATION_EXPORT const unsigned char SmRtAsrVersionString[];
|
||||
//
|
||||
//// In this header, you should import all the public headers of your framework using statements like #import <SmRtAsr/PublicHeader.h>
|
||||
//
|
||||
|
||||
#import "SmRtAsrClient.h"
|
@@ -0,0 +1,126 @@
|
||||
//
|
||||
// SmRtAsrClient.h
|
||||
// SmRtAsr
|
||||
//
|
||||
// Created by wangyankun on 2021/10/28.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
uninit idle sending
|
||||
create 去到idle 不允许,回调错误 不允许,回调错误
|
||||
startSession 不允许 去到sending 去到sending
|
||||
postAudio 不允许 去到idle sending
|
||||
stopSession 不允许 去到idle 去到idle
|
||||
destroy unint unint unint
|
||||
|
||||
*/
|
||||
|
||||
//SmRtAsrClient的配置文件
|
||||
@interface SmRtAsrOption : NSObject
|
||||
|
||||
@property NSString *organization;
|
||||
@property NSString *appId;
|
||||
@property NSString *accessKey;
|
||||
@property NSString *wsUrl;
|
||||
@property NSString *httpSessionUrl;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
//定义response
|
||||
|
||||
@interface SmAsrResponse : NSObject
|
||||
|
||||
@property int code;
|
||||
@property NSString * requestId;
|
||||
@property NSString * tokenId;
|
||||
@property NSString * sessionId;
|
||||
@property int segId;
|
||||
@property NSInteger type;
|
||||
@property long startTime;
|
||||
@property long endTime;
|
||||
@property NSString * text;
|
||||
@property NSString * eventId;
|
||||
@property long wsTime;
|
||||
@property long weTime;
|
||||
@property long sessionStartTime;
|
||||
@property long sessionEndTime;
|
||||
@property long segStartTime;
|
||||
@property long segEndTime;
|
||||
@property NSArray<NSDictionary*> *matchedResults;
|
||||
@property int requestSegId;
|
||||
@property int responseSegId;
|
||||
@property NSDictionary* raw;
|
||||
//[
|
||||
//{"hitItemContent":"","positions":[[2,9],[10,13]]},
|
||||
//{"hitItemContent":"","positions":[[2,9],[10,13]]}
|
||||
//]
|
||||
@property NSArray<NSDictionary*> *numbers;
|
||||
|
||||
@property NSString *message;
|
||||
@property NSDictionary *detail;//{"errorCode":1}
|
||||
|
||||
|
||||
-(BOOL)isHit;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
//定义delegate
|
||||
@protocol SmRtDelegate <NSObject>
|
||||
|
||||
@required -(void) onRtReceived:(NSString*) sessionId
|
||||
requestId:(NSString*)requestId
|
||||
response:(SmAsrResponse *)response;
|
||||
|
||||
@required -(void) onRtError:(NSString*) sessionId
|
||||
requestId:(NSString*)requestId
|
||||
errorCode:(NSInteger)errorCode
|
||||
message:(NSString*)message;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
//定义session的config配置
|
||||
@interface SmRtSessionConfig : NSObject
|
||||
|
||||
@property NSArray<NSString*> *keyWords;
|
||||
@property BOOL returnAll;
|
||||
@property NSString *voiceType;
|
||||
@property NSString *voiceEncode;
|
||||
@property NSString *tokenId;
|
||||
@property NSString *eventId;
|
||||
@property int voiceSample;
|
||||
@property BOOL enableMatch;
|
||||
@property BOOL returnText;
|
||||
@property NSString *language;
|
||||
@property NSString *matchMode;
|
||||
@property BOOL returnNumbers;
|
||||
@property NSDictionary *extra;
|
||||
@property NSString* authToken;
|
||||
|
||||
@property __weak id delegate;
|
||||
|
||||
-(NSDictionary*) toJson;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface SmRtAsrClient : NSObject
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
+(instancetype)shareInstance;
|
||||
-(instancetype)initWithOption:(SmRtAsrOption *)option;
|
||||
|
||||
-(void) startSession:(SmRtSessionConfig*) config;
|
||||
-(BOOL) postAudio:(NSData *)audioClip;
|
||||
-(void) stopSession;
|
||||
-(void) destroy;
|
||||
|
||||
-(NSString*) getSDKVersion;
|
||||
-(SmRtAsrOption *) getAsrOption;
|
||||
|
||||
@end
|
@@ -0,0 +1,35 @@
|
||||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#else
|
||||
#ifndef FOUNDATION_EXPORT
|
||||
#if defined(__cplusplus)
|
||||
#define FOUNDATION_EXPORT extern "C"
|
||||
#else
|
||||
#define FOUNDATION_EXPORT extern
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#import "ISudListenerGetFQSInfo.h"
|
||||
#import "ISudListenerGetMGInfo.h"
|
||||
#import "ISudAPPD.h"
|
||||
#import "ISudASR.h"
|
||||
#import "ISudFSMMG.h"
|
||||
#import "ISudFSMStateHandle.h"
|
||||
#import "ISudFSTAPP.h"
|
||||
#import "ISudListenerASR.h"
|
||||
#import "ISudListenerGetMGList.h"
|
||||
#import "ISudListenerInitSDK.h"
|
||||
#import "ISudListenerNotifyStateChange.h"
|
||||
#import "ISudListenerUninitSDK.h"
|
||||
#import "ISudLogger.h"
|
||||
#import "SudMGP.h"
|
||||
#import "IRTSS.h"
|
||||
#import "IRTSSEventHandler.h"
|
||||
#import "RTSSResult.h"
|
||||
#import "SmRtAsr.h"
|
||||
#import "SmRtAsrClient.h"
|
||||
|
||||
FOUNDATION_EXPORT double SudMGPVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char SudMGPVersionString[];
|
||||
|
@@ -0,0 +1,84 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "ISudListenerInitSDK.h"
|
||||
#import "ISudListenerGetMGList.h"
|
||||
#import "ISudListenerUninitSDK.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol ISudFSTAPP;
|
||||
@protocol ISudFSMMG;
|
||||
|
||||
@interface SudMGP : NSObject
|
||||
|
||||
/**
|
||||
* 获取SDK版本
|
||||
* @return 示例:"1.1.35.286"
|
||||
*/
|
||||
+ (NSString*_Nonnull)getVersion;
|
||||
|
||||
/**
|
||||
* 初始化SDK
|
||||
* @param context Context
|
||||
* @param appId 小游戏平台生成
|
||||
* @param appKey 小游戏平台生成
|
||||
* @param isTestEnv true:测试环境 false:生产环境
|
||||
* @param listener ISudListenerInitSDK
|
||||
*/
|
||||
+ (void)initSDK:(NSString*_Nonnull)appId
|
||||
appKey:(NSString*_Nonnull)appKey
|
||||
isTestEnv:(BOOL)isTestEnv
|
||||
listener:(ISudListenerInitSDK _Nullable )listener;
|
||||
|
||||
/**
|
||||
* 反初始化SDK
|
||||
* @param listener ISudListenerUninitSDK
|
||||
*/
|
||||
+ (void)uninitSDK:(ISudListenerUninitSDK _Nullable )listener;
|
||||
|
||||
/**
|
||||
* 获取游戏列表
|
||||
* @param listener ISudListenerGetMGList
|
||||
*/
|
||||
+ (void)getMGList:(ISudListenerGetMGList _Nullable )listener;
|
||||
|
||||
/**
|
||||
* 加载游戏
|
||||
* @param userId 用户ID,业务系统保证每个用户拥有唯一ID
|
||||
* @param roomId 房间ID,业务系统保证唯一性,进入同一房间内
|
||||
* @param code 短期令牌Code
|
||||
* @param mgId 小游戏ID,测试环境和生成环境小游戏ID是一致的
|
||||
* @param language 游戏语言 现支持,简体:zh-CN 繁体:zh-TW 英语:en-US 马来语:ms-MY
|
||||
* @param fsmMG ISudFSMMG
|
||||
* @param rootView 用于显示游戏的根视图
|
||||
* @return ISudFSTAPP
|
||||
*/
|
||||
+ (id<ISudFSTAPP>_Nonnull)loadMG:(NSString*_Nonnull)userId
|
||||
roomId:(NSString*_Nonnull)roomId
|
||||
code:(NSString*_Nonnull)code
|
||||
mgId:(int64_t)mgId
|
||||
language:(NSString*_Nonnull)language
|
||||
fsmMG:(id<ISudFSMMG>_Nonnull)fsmMG
|
||||
rootView:(UIView*_Nonnull)rootView;
|
||||
|
||||
/**
|
||||
* 销毁游戏
|
||||
* @param fstApp 加载游戏返回的对象ISudFSTAPP
|
||||
* @return boolean
|
||||
*/
|
||||
+ (bool)destroyMG:(id<ISudFSTAPP>_Nonnull) fstAPP;
|
||||
|
||||
/**
|
||||
* 设置日志等级
|
||||
* @param logLevel 输出log的等级,LogVERBOSE,LogDEBUG,LogINFO 见ISudLogger.h
|
||||
*/
|
||||
+ (void)setLogLevel:(int)logLevel;
|
||||
|
||||
|
||||
/// 设置是否由SDK设置AudioSession
|
||||
/// @param autoSet 是否由SDK自动设置
|
||||
+ (void)autoSetAudioSession:(BOOL)autoSet;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
framework module SudMGP {
|
||||
umbrella header "SudMGP-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
@@ -0,0 +1,52 @@
|
||||
|
||||
//
|
||||
// Created by Herbert on 2021/10/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol IRTSSEventHandler;
|
||||
|
||||
@interface IRTSSStartOption : NSObject
|
||||
@property (nonatomic, copy) NSString * keyword;
|
||||
@property (nonatomic, copy) NSArray * keywordList;
|
||||
@property (nonatomic, copy) NSString * wordLanguage;
|
||||
@property (nonatomic, copy) NSString * wordType;
|
||||
@property (nonatomic, assign) BOOL isCloseConnHitted;
|
||||
@property (nonatomic, assign) BOOL enableIsHit;
|
||||
@property (nonatomic, assign) BOOL enableIsReturnText;
|
||||
@property (nonatomic, copy) NSDictionary * extra;
|
||||
@end
|
||||
|
||||
|
||||
/*
|
||||
* 接口要确保在UI线程中调用
|
||||
*/
|
||||
@protocol IRTSS <NSObject>
|
||||
|
||||
|
||||
|
||||
/// 初始化SDK
|
||||
/// @param organization <#organization description#>
|
||||
/// @param accessKey <#accessKey description#>
|
||||
/// @param appId <#appId description#>
|
||||
/// @param wsURL <#wsURL description#>
|
||||
/// @param httpUrl <#httpUrl description#>
|
||||
- (BOOL)init:(NSString *)organization accessKey:(NSString *)accessKey appId:(NSString *)appId wsURL:(NSString*)wsURL httpUrl:(NSString*)httpUrl language:(NSString *)language;
|
||||
|
||||
|
||||
- (BOOL)start:(IRTSSStartOption *)option listener:(id<IRTSSEventHandler>)listener;
|
||||
|
||||
/// 传入的音频数据必须是:PCM格式,采样率:16000, 采样位数:16, 声道数: MONO
|
||||
/// @param data PCM数据
|
||||
- (void)push:(NSData *)data;
|
||||
|
||||
|
||||
/// 断开连接,如果想继续工作,必须重新调用start()新建连接
|
||||
- (void)stop;
|
||||
|
||||
|
||||
/// 销毁SDK
|
||||
- (void)destroy;
|
||||
|
||||
@end
|
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// Created by Herbert on 2021/10/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RTSSResult.h"
|
||||
|
||||
|
||||
@protocol IRTSSEventHandler <NSObject>
|
||||
|
||||
-(void)onRtssSuccess:(RTSSResult *)result repeated:(BOOL) repeated;
|
||||
|
||||
-(void)onRtssError:(NSInteger)errCode errMsg:(NSString *)errMsg;
|
||||
|
||||
@end
|
@@ -0,0 +1,10 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ISudAPPD : NSObject
|
||||
+ (void)e:(int)v;
|
||||
+ (void)d;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,15 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol ISudASR <NSObject>
|
||||
|
||||
/**
|
||||
* 传入的音频数据必须是:PCM格式,采样率:16000, 采样位数:16, 声道数: MONO
|
||||
* data一定都要是有效数据,否则精确性有影响
|
||||
*/
|
||||
- (void) pushAudio:(NSData *)data;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,55 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol ISudFSMStateHandle;
|
||||
|
||||
@protocol ISudFSMMG <NSObject>
|
||||
|
||||
/// 游戏日志
|
||||
/// 最低版本:v1.1.30.xx
|
||||
-(void) onGameLog:(NSString*)dataJson;
|
||||
|
||||
/// 游戏开始
|
||||
/// 最低版本:v1.1.30.xx
|
||||
-(void) onGameStarted;
|
||||
|
||||
/// 游戏销毁
|
||||
/// 最低版本:v1.1.30.xx
|
||||
-(void) onGameDestroyed;
|
||||
|
||||
/// 短期令牌code过期
|
||||
/// APP接入方需要调用handle.success或handle.fail
|
||||
/// @param dataJson {"code":"value"}
|
||||
-(void) onExpireCode:(id<ISudFSMStateHandle>)handle dataJson:(NSString*)dataJson;
|
||||
|
||||
/// 获取游戏View信息
|
||||
/// APP接入方需要调用handle.success或handle.fail
|
||||
/// @param handle ISudFSMStateHandle
|
||||
/// @param dataJson {}
|
||||
-(void) onGetGameViewInfo:(id<ISudFSMStateHandle>) handle dataJson:(NSString*)dataJson;
|
||||
|
||||
/// 获取游戏Config
|
||||
/// APP接入方需要调用handle.success或handle.fail
|
||||
/// @param handle ISudFSMStateHandle
|
||||
/// @param dataJson dataJson
|
||||
/// 最低版本:v1.1.30.xx
|
||||
-(void) onGetGameCfg:(id<ISudFSMStateHandle>) handle dataJson:(NSString*)dataJson;
|
||||
|
||||
/// 游戏状态变化
|
||||
/// APP接入方需要调用handle.success或handle.fail
|
||||
/// @param handle ISudFSMStateHandle
|
||||
/// @param state state
|
||||
/// @param dataJson dataJson
|
||||
-(void) onGameStateChange:(id<ISudFSMStateHandle>) handle state:(NSString*) state dataJson:(NSString*) dataJson;
|
||||
|
||||
/// 游戏玩家状态变化
|
||||
/// APP接入方需要调用handle.success或handle.fail
|
||||
/// @param handle ISudFSMStateHandle
|
||||
/// @param userId userId
|
||||
/// @param state state
|
||||
/// @param dataJson dataJson
|
||||
-(void) onPlayerStateChange:(nullable id<ISudFSMStateHandle>) handle userId:(NSString*) userId state:(NSString*) state dataJson:(NSString*) dataJson;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,11 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// APP接入方需要调用handle.success或handle.fail
|
||||
@protocol ISudFSMStateHandle <NSObject>
|
||||
-(void) success:(NSString*) dataJson;
|
||||
-(void) failure:(NSString*) dataJson;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,55 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "ISudListenerNotifyStateChange.h"
|
||||
#import "ISudListenerASR.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol ISudFSMMG;
|
||||
@protocol ISudASR;
|
||||
|
||||
@protocol ISudFSTAPP <NSObject>
|
||||
|
||||
/// 获取游戏View
|
||||
/// @return UIView
|
||||
- (UIView *)getGameView;
|
||||
|
||||
/// 销毁游戏
|
||||
/// @return boolean
|
||||
- (bool)destroyMG;
|
||||
|
||||
/// 更新短期令牌code
|
||||
/// @param code 短期令牌code
|
||||
/// @param listener 回调只表示APP状态通知到了小游戏,不表示小游戏执行了别的逻辑代码(比如:游戏业务逻辑网络请求),一般传null。
|
||||
- (void)updateCode:(NSString *) code listener:(ISudListenerNotifyStateChange) listener;
|
||||
|
||||
/// 获取游戏状态
|
||||
/// @param state state
|
||||
/// @return json
|
||||
- (NSString*)getGameState:(NSString*) state;
|
||||
|
||||
/// 获取玩家状态
|
||||
/// @param userId userId
|
||||
/// @param state state
|
||||
/// @return json
|
||||
- (NSString*)getPlayerState:(NSString*) userId state:(NSString*) state;
|
||||
|
||||
/// APP状态通知给小游戏
|
||||
/// @param state state
|
||||
/// @param dataJson example: {"key": "value"}
|
||||
/// @param listener 回调只表示APP状态通知到了小游戏,不表示小游戏执行了别的逻辑代码(比如:游戏业务逻辑网络请求),一般传null。
|
||||
- (void)notifyStateChange:(const NSString *)state dataJson:(NSString *)dataJson listener:(ISudListenerNotifyStateChange) listener;
|
||||
|
||||
/// 继续游戏
|
||||
- (void) playMG;
|
||||
|
||||
/// 暂停游戏
|
||||
- (void) pauseMG;
|
||||
|
||||
/// 传入的音频数据必须是:PCM格式,采样率:16000, 采样位数:16, 声道数: MONO
|
||||
/// @param data pcm数据
|
||||
- (void)pushAudio:(NSData *)data;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,6 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^ISudListenerASRResult)(NSString * asrResult, NSArray * asrResults);
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,9 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class GameInfo;
|
||||
|
||||
typedef void (^ISudListenerGetFQSInfo)(int retCode, const NSString* retMsg, NSString* sdkTokenUrl);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,9 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class GameInfo;
|
||||
|
||||
typedef void (^ISudListenerGetMGInfo)(int retCode, const NSString* retMsg, GameInfo* gameInfo);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^ISudListenerGetMGList)(int retCode, const NSString* retMsg, const NSString* dataJson);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^ISudListenerInitSDK)(int retCode, const NSString* retMsg);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^ISudListenerNotifyStateChange)(int retCode, const NSString* retMsg, const NSString* dataJson);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^ISudListenerUninitSDK)(int retCode, const NSString* retMsg);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,41 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* Priority constant for the println method; use Log.v.
|
||||
*/
|
||||
#define LogVERBOSE 2
|
||||
|
||||
/**
|
||||
* Priority constant for the println method; use Log.d.
|
||||
*/
|
||||
#define LogDEBUG 3
|
||||
|
||||
/**
|
||||
* Priority constant for the println method; use Log.i.
|
||||
*/
|
||||
#define LogINFO 4
|
||||
|
||||
/**
|
||||
* Priority constant for the println method; use Log.w.
|
||||
*/
|
||||
#define LogWARN 5
|
||||
|
||||
/**
|
||||
* Priority constant for the println method; use Log.e.
|
||||
*/
|
||||
#define LogERROR 6
|
||||
|
||||
/**
|
||||
* Priority constant for the println method.
|
||||
*/
|
||||
#define LogASSERT 7
|
||||
|
||||
@protocol ISudLogger <NSObject>
|
||||
- (void) setLogLevel:(int) level;
|
||||
- (void) log:(int) level tag:(NSString*) tag msg:(NSString*) msg;
|
||||
- (void) log:(int) level tag:(NSString*) tag msg:(NSString*) msg error:(NSError *) error;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Created by Herbert on 2021/10/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface RTSSResult : NSObject
|
||||
|
||||
@property (nonatomic, assign) BOOL isHit;
|
||||
|
||||
@property (nonatomic, copy) NSString * keyword;
|
||||
|
||||
@property (nonatomic, copy) NSString * text;
|
||||
|
||||
@property (nonatomic, copy) NSString * wordType;
|
||||
|
||||
@property (nonatomic, copy) NSArray * keyWordList;
|
||||
|
||||
@property (nonatomic, copy) NSArray * numberList;
|
||||
|
||||
@end
|
||||
|
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// SmRtAsr.h
|
||||
// SmRtAsr
|
||||
//
|
||||
// Created by wangyankun on 2021/10/27.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
////! Project version number for SmRtAsr.
|
||||
//FOUNDATION_EXPORT double SmRtAsrVersionNumber;
|
||||
//
|
||||
////! Project version string for SmRtAsr.
|
||||
//FOUNDATION_EXPORT const unsigned char SmRtAsrVersionString[];
|
||||
//
|
||||
//// In this header, you should import all the public headers of your framework using statements like #import <SmRtAsr/PublicHeader.h>
|
||||
//
|
||||
|
||||
#import "SmRtAsrClient.h"
|
@@ -0,0 +1,126 @@
|
||||
//
|
||||
// SmRtAsrClient.h
|
||||
// SmRtAsr
|
||||
//
|
||||
// Created by wangyankun on 2021/10/28.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
uninit idle sending
|
||||
create 去到idle 不允许,回调错误 不允许,回调错误
|
||||
startSession 不允许 去到sending 去到sending
|
||||
postAudio 不允许 去到idle sending
|
||||
stopSession 不允许 去到idle 去到idle
|
||||
destroy unint unint unint
|
||||
|
||||
*/
|
||||
|
||||
//SmRtAsrClient的配置文件
|
||||
@interface SmRtAsrOption : NSObject
|
||||
|
||||
@property NSString *organization;
|
||||
@property NSString *appId;
|
||||
@property NSString *accessKey;
|
||||
@property NSString *wsUrl;
|
||||
@property NSString *httpSessionUrl;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
//定义response
|
||||
|
||||
@interface SmAsrResponse : NSObject
|
||||
|
||||
@property int code;
|
||||
@property NSString * requestId;
|
||||
@property NSString * tokenId;
|
||||
@property NSString * sessionId;
|
||||
@property int segId;
|
||||
@property NSInteger type;
|
||||
@property long startTime;
|
||||
@property long endTime;
|
||||
@property NSString * text;
|
||||
@property NSString * eventId;
|
||||
@property long wsTime;
|
||||
@property long weTime;
|
||||
@property long sessionStartTime;
|
||||
@property long sessionEndTime;
|
||||
@property long segStartTime;
|
||||
@property long segEndTime;
|
||||
@property NSArray<NSDictionary*> *matchedResults;
|
||||
@property int requestSegId;
|
||||
@property int responseSegId;
|
||||
@property NSDictionary* raw;
|
||||
//[
|
||||
//{"hitItemContent":"","positions":[[2,9],[10,13]]},
|
||||
//{"hitItemContent":"","positions":[[2,9],[10,13]]}
|
||||
//]
|
||||
@property NSArray<NSDictionary*> *numbers;
|
||||
|
||||
@property NSString *message;
|
||||
@property NSDictionary *detail;//{"errorCode":1}
|
||||
|
||||
|
||||
-(BOOL)isHit;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
//定义delegate
|
||||
@protocol SmRtDelegate <NSObject>
|
||||
|
||||
@required -(void) onRtReceived:(NSString*) sessionId
|
||||
requestId:(NSString*)requestId
|
||||
response:(SmAsrResponse *)response;
|
||||
|
||||
@required -(void) onRtError:(NSString*) sessionId
|
||||
requestId:(NSString*)requestId
|
||||
errorCode:(NSInteger)errorCode
|
||||
message:(NSString*)message;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
//定义session的config配置
|
||||
@interface SmRtSessionConfig : NSObject
|
||||
|
||||
@property NSArray<NSString*> *keyWords;
|
||||
@property BOOL returnAll;
|
||||
@property NSString *voiceType;
|
||||
@property NSString *voiceEncode;
|
||||
@property NSString *tokenId;
|
||||
@property NSString *eventId;
|
||||
@property int voiceSample;
|
||||
@property BOOL enableMatch;
|
||||
@property BOOL returnText;
|
||||
@property NSString *language;
|
||||
@property NSString *matchMode;
|
||||
@property BOOL returnNumbers;
|
||||
@property NSDictionary *extra;
|
||||
@property NSString* authToken;
|
||||
|
||||
@property __weak id delegate;
|
||||
|
||||
-(NSDictionary*) toJson;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface SmRtAsrClient : NSObject
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
+(instancetype)shareInstance;
|
||||
-(instancetype)initWithOption:(SmRtAsrOption *)option;
|
||||
|
||||
-(void) startSession:(SmRtSessionConfig*) config;
|
||||
-(BOOL) postAudio:(NSData *)audioClip;
|
||||
-(void) stopSession;
|
||||
-(void) destroy;
|
||||
|
||||
-(NSString*) getSDKVersion;
|
||||
-(SmRtAsrOption *) getAsrOption;
|
||||
|
||||
@end
|
@@ -0,0 +1,35 @@
|
||||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#else
|
||||
#ifndef FOUNDATION_EXPORT
|
||||
#if defined(__cplusplus)
|
||||
#define FOUNDATION_EXPORT extern "C"
|
||||
#else
|
||||
#define FOUNDATION_EXPORT extern
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#import "ISudListenerGetFQSInfo.h"
|
||||
#import "ISudListenerGetMGInfo.h"
|
||||
#import "ISudAPPD.h"
|
||||
#import "ISudASR.h"
|
||||
#import "ISudFSMMG.h"
|
||||
#import "ISudFSMStateHandle.h"
|
||||
#import "ISudFSTAPP.h"
|
||||
#import "ISudListenerASR.h"
|
||||
#import "ISudListenerGetMGList.h"
|
||||
#import "ISudListenerInitSDK.h"
|
||||
#import "ISudListenerNotifyStateChange.h"
|
||||
#import "ISudListenerUninitSDK.h"
|
||||
#import "ISudLogger.h"
|
||||
#import "SudMGP.h"
|
||||
#import "IRTSS.h"
|
||||
#import "IRTSSEventHandler.h"
|
||||
#import "RTSSResult.h"
|
||||
#import "SmRtAsr.h"
|
||||
#import "SmRtAsrClient.h"
|
||||
|
||||
FOUNDATION_EXPORT double SudMGPVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char SudMGPVersionString[];
|
||||
|
@@ -0,0 +1,84 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "ISudListenerInitSDK.h"
|
||||
#import "ISudListenerGetMGList.h"
|
||||
#import "ISudListenerUninitSDK.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol ISudFSTAPP;
|
||||
@protocol ISudFSMMG;
|
||||
|
||||
@interface SudMGP : NSObject
|
||||
|
||||
/**
|
||||
* 获取SDK版本
|
||||
* @return 示例:"1.1.35.286"
|
||||
*/
|
||||
+ (NSString*_Nonnull)getVersion;
|
||||
|
||||
/**
|
||||
* 初始化SDK
|
||||
* @param context Context
|
||||
* @param appId 小游戏平台生成
|
||||
* @param appKey 小游戏平台生成
|
||||
* @param isTestEnv true:测试环境 false:生产环境
|
||||
* @param listener ISudListenerInitSDK
|
||||
*/
|
||||
+ (void)initSDK:(NSString*_Nonnull)appId
|
||||
appKey:(NSString*_Nonnull)appKey
|
||||
isTestEnv:(BOOL)isTestEnv
|
||||
listener:(ISudListenerInitSDK _Nullable )listener;
|
||||
|
||||
/**
|
||||
* 反初始化SDK
|
||||
* @param listener ISudListenerUninitSDK
|
||||
*/
|
||||
+ (void)uninitSDK:(ISudListenerUninitSDK _Nullable )listener;
|
||||
|
||||
/**
|
||||
* 获取游戏列表
|
||||
* @param listener ISudListenerGetMGList
|
||||
*/
|
||||
+ (void)getMGList:(ISudListenerGetMGList _Nullable )listener;
|
||||
|
||||
/**
|
||||
* 加载游戏
|
||||
* @param userId 用户ID,业务系统保证每个用户拥有唯一ID
|
||||
* @param roomId 房间ID,业务系统保证唯一性,进入同一房间内
|
||||
* @param code 短期令牌Code
|
||||
* @param mgId 小游戏ID,测试环境和生成环境小游戏ID是一致的
|
||||
* @param language 游戏语言 现支持,简体:zh-CN 繁体:zh-TW 英语:en-US 马来语:ms-MY
|
||||
* @param fsmMG ISudFSMMG
|
||||
* @param rootView 用于显示游戏的根视图
|
||||
* @return ISudFSTAPP
|
||||
*/
|
||||
+ (id<ISudFSTAPP>_Nonnull)loadMG:(NSString*_Nonnull)userId
|
||||
roomId:(NSString*_Nonnull)roomId
|
||||
code:(NSString*_Nonnull)code
|
||||
mgId:(int64_t)mgId
|
||||
language:(NSString*_Nonnull)language
|
||||
fsmMG:(id<ISudFSMMG>_Nonnull)fsmMG
|
||||
rootView:(UIView*_Nonnull)rootView;
|
||||
|
||||
/**
|
||||
* 销毁游戏
|
||||
* @param fstApp 加载游戏返回的对象ISudFSTAPP
|
||||
* @return boolean
|
||||
*/
|
||||
+ (bool)destroyMG:(id<ISudFSTAPP>_Nonnull) fstAPP;
|
||||
|
||||
/**
|
||||
* 设置日志等级
|
||||
* @param logLevel 输出log的等级,LogVERBOSE,LogDEBUG,LogINFO 见ISudLogger.h
|
||||
*/
|
||||
+ (void)setLogLevel:(int)logLevel;
|
||||
|
||||
|
||||
/// 设置是否由SDK设置AudioSession
|
||||
/// @param autoSet 是否由SDK自动设置
|
||||
+ (void)autoSetAudioSession:(BOOL)autoSet;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
framework module SudMGP {
|
||||
umbrella header "SudMGP-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
Binary file not shown.
@@ -0,0 +1,582 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict>
|
||||
<key>EgretNativeJSConsoleRes.bundle/Info.plist</key>
|
||||
<data>
|
||||
H4tosXOt5Jgj94JFJ+bQ7DZibxA=
|
||||
</data>
|
||||
<key>EgretNativeJSConsoleRes.bundle/_CodeSignature/CodeDirectory</key>
|
||||
<data>
|
||||
U4cubFPfT2n+QApbXIm2fGW1B4E=
|
||||
</data>
|
||||
<key>EgretNativeJSConsoleRes.bundle/_CodeSignature/CodeRequirements</key>
|
||||
<data>
|
||||
OnX22wWFKRSOFN1+obRynMCeyXM=
|
||||
</data>
|
||||
<key>EgretNativeJSConsoleRes.bundle/_CodeSignature/CodeRequirements-1</key>
|
||||
<data>
|
||||
muj1o6L+njvxx86d5ZSUAnpTP84=
|
||||
</data>
|
||||
<key>EgretNativeJSConsoleRes.bundle/_CodeSignature/CodeResources</key>
|
||||
<data>
|
||||
/H+GCq1u2MTuKeO3UnDWOp72vHI=
|
||||
</data>
|
||||
<key>EgretNativeJSConsoleRes.bundle/_CodeSignature/CodeSignature</key>
|
||||
<data>
|
||||
2jmj7l5rSw0yVb/vlWAYkK/YBwk=
|
||||
</data>
|
||||
<key>EgretNativeJSConsoleRes.bundle/index.html</key>
|
||||
<data>
|
||||
K/tLkR3L9CMKspWcGjDkJx9cc/Y=
|
||||
</data>
|
||||
<key>Headers/IRTSS.h</key>
|
||||
<data>
|
||||
f8hSf6ZxCFGUre1kLu6mbYVADi0=
|
||||
</data>
|
||||
<key>Headers/IRTSSEventHandler.h</key>
|
||||
<data>
|
||||
U1L6bqMpj9HnlnslXq2FOg7WCiQ=
|
||||
</data>
|
||||
<key>Headers/ISudAPPD.h</key>
|
||||
<data>
|
||||
05P2/6AiTFKVAetmtU1REHdE/W0=
|
||||
</data>
|
||||
<key>Headers/ISudASR.h</key>
|
||||
<data>
|
||||
z/fF/gwkFzbH6ef/Q1mk8qcyNas=
|
||||
</data>
|
||||
<key>Headers/ISudFSMMG.h</key>
|
||||
<data>
|
||||
r1CyFyzrDUpN0ti2gOy2g14t1CU=
|
||||
</data>
|
||||
<key>Headers/ISudFSMStateHandle.h</key>
|
||||
<data>
|
||||
FJ3VAY39qQGfsA5RzchJsPYbjvI=
|
||||
</data>
|
||||
<key>Headers/ISudFSTAPP.h</key>
|
||||
<data>
|
||||
aItvrTmWvreLyI4LUg68DlFUGfw=
|
||||
</data>
|
||||
<key>Headers/ISudListenerASR.h</key>
|
||||
<data>
|
||||
e1c1vcvpzWtzpR0M8LXL7DAPJ+M=
|
||||
</data>
|
||||
<key>Headers/ISudListenerGetFQSInfo.h</key>
|
||||
<data>
|
||||
Z7i09z+EjOM7yuUAv56AhHTf+aM=
|
||||
</data>
|
||||
<key>Headers/ISudListenerGetMGInfo.h</key>
|
||||
<data>
|
||||
xLG4pxPnoyh3NGW1ERjDuXfSioM=
|
||||
</data>
|
||||
<key>Headers/ISudListenerGetMGList.h</key>
|
||||
<data>
|
||||
A0jH/DMV6f0s6FRS2BrasrFQzSA=
|
||||
</data>
|
||||
<key>Headers/ISudListenerInitSDK.h</key>
|
||||
<data>
|
||||
99sNc7pHhNMhxhE/ugBuz/xFC+4=
|
||||
</data>
|
||||
<key>Headers/ISudListenerNotifyStateChange.h</key>
|
||||
<data>
|
||||
iZ8b1pdDNuD7nHEQYBLp65/hkV4=
|
||||
</data>
|
||||
<key>Headers/ISudListenerUninitSDK.h</key>
|
||||
<data>
|
||||
ClT1ZLLUSYZr2uY6o7Itdtw1i/Y=
|
||||
</data>
|
||||
<key>Headers/ISudLogger.h</key>
|
||||
<data>
|
||||
jTVkYtMibuUnks31dwc+LW0ScQE=
|
||||
</data>
|
||||
<key>Headers/RTSSResult.h</key>
|
||||
<data>
|
||||
80kyv8aQpoAipg6Ia8MkA8kinNQ=
|
||||
</data>
|
||||
<key>Headers/SmRtAsr.h</key>
|
||||
<data>
|
||||
wvXLscKLU/iJogrD+w0w3hzlhaI=
|
||||
</data>
|
||||
<key>Headers/SmRtAsrClient.h</key>
|
||||
<data>
|
||||
hshBcpfi1tW5ptVbt6Ox0YI/Wog=
|
||||
</data>
|
||||
<key>Headers/SudMGP-umbrella.h</key>
|
||||
<data>
|
||||
CiDY/99QZbrSottMgxuMLMyad9M=
|
||||
</data>
|
||||
<key>Headers/SudMGP.h</key>
|
||||
<data>
|
||||
jnWohTHm9H1gS2UqqpuB7FST1Vc=
|
||||
</data>
|
||||
<key>Info.plist</key>
|
||||
<data>
|
||||
aBVqUCKzbhq6WmVyMO6W7Pew/nc=
|
||||
</data>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<data>
|
||||
SqkCCW826QrTr8CHz/pkF0Gg7Uk=
|
||||
</data>
|
||||
<key>fsm_mgp_game_loading_progress.png</key>
|
||||
<data>
|
||||
dtpNcJpsR3zafFe134BfDkM+F/8=
|
||||
</data>
|
||||
<key>fsm_mgp_game_loading_progress_bg.png</key>
|
||||
<data>
|
||||
G5Xy+4h7dGMY6FJB5kqFR+sdgmo=
|
||||
</data>
|
||||
<key>plugin.zip</key>
|
||||
<data>
|
||||
DT5CFEb70VfK0g/AcgYOm5zx5pU=
|
||||
</data>
|
||||
<key>sud.png</key>
|
||||
<data>
|
||||
vQlHDEdu0+Q1In7/lmqL55xESZU=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>EgretNativeJSConsoleRes.bundle/Info.plist</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
H4tosXOt5Jgj94JFJ+bQ7DZibxA=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
VrgR5Aq6QlBTDjXaZYYuLo3XXjmQxHt7n+PhvO5wJlc=
|
||||
</data>
|
||||
</dict>
|
||||
<key>EgretNativeJSConsoleRes.bundle/_CodeSignature/CodeDirectory</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
U4cubFPfT2n+QApbXIm2fGW1B4E=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
wyRBJ57jjdWBHfyHsD3FjEx+hRbs5MA9T0rtCkAdbjw=
|
||||
</data>
|
||||
</dict>
|
||||
<key>EgretNativeJSConsoleRes.bundle/_CodeSignature/CodeRequirements</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
OnX22wWFKRSOFN1+obRynMCeyXM=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
mHkgkE6rZQ51eIwFSqCwUk5qgL/HGqMt+NI3phdD+YY=
|
||||
</data>
|
||||
</dict>
|
||||
<key>EgretNativeJSConsoleRes.bundle/_CodeSignature/CodeRequirements-1</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
muj1o6L+njvxx86d5ZSUAnpTP84=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
p4ZGdcZRsD5sItRbkkNihcG9edsDi6w7duzPJwUJ6m0=
|
||||
</data>
|
||||
</dict>
|
||||
<key>EgretNativeJSConsoleRes.bundle/_CodeSignature/CodeResources</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
/H+GCq1u2MTuKeO3UnDWOp72vHI=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
Xz9YqA4rNI0tJMd5iF39XvmYDFNr/Hiq9RiILIbB/AY=
|
||||
</data>
|
||||
</dict>
|
||||
<key>EgretNativeJSConsoleRes.bundle/_CodeSignature/CodeSignature</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
2jmj7l5rSw0yVb/vlWAYkK/YBwk=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
|
||||
</data>
|
||||
</dict>
|
||||
<key>EgretNativeJSConsoleRes.bundle/index.html</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
K/tLkR3L9CMKspWcGjDkJx9cc/Y=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
gC2TRtg8NJ8h6hVrPmNen2ffzD1Q2jUcUnOpVwi3ue8=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/IRTSS.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
f8hSf6ZxCFGUre1kLu6mbYVADi0=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
9IadkR3YfDRV5+/J6zBMbk1mY321NOBoZkoUl73Hg6s=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/IRTSSEventHandler.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
U1L6bqMpj9HnlnslXq2FOg7WCiQ=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
0QmC550UmI5oVhvqRAutWrtwRPOF3v2wVvMMcwQm4EE=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudAPPD.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
05P2/6AiTFKVAetmtU1REHdE/W0=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
iLOzMPy0oThM1XmDMM6C7c4UWFPM6QlHQZ51R9VFD+Y=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudASR.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
z/fF/gwkFzbH6ef/Q1mk8qcyNas=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
qFUhmka9/RnhpNwRpSnwObjSu65Tuhd6QLcQE7wxQU4=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudFSMMG.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
r1CyFyzrDUpN0ti2gOy2g14t1CU=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
B9ptVM7f8cBx/ZSr6oHGwR+vMmnJiY1UlCi3lpl3BmU=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudFSMStateHandle.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
FJ3VAY39qQGfsA5RzchJsPYbjvI=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
fLMmUKo+hrfIj90HWIRHdfq7v8MI/x0MWQRd9lN1cPE=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudFSTAPP.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
aItvrTmWvreLyI4LUg68DlFUGfw=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
en0ZkBmchkyvslIrw3Io4hxHho1yObQIgflmboI/7B4=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudListenerASR.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
e1c1vcvpzWtzpR0M8LXL7DAPJ+M=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
ZvLZlglJKF/cbA2rxnPKK/qnPFnSrFjK7mN35COkbT0=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudListenerGetFQSInfo.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
Z7i09z+EjOM7yuUAv56AhHTf+aM=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
dgMWSRbsVB/VI4dn14KgIuHyVohZCd6uylOjNtfIHpE=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudListenerGetMGInfo.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
xLG4pxPnoyh3NGW1ERjDuXfSioM=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
6XPIfoDCaW2Su+1yD1OKwaNEuOLpqT8Q/6Op7rnBDqg=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudListenerGetMGList.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
A0jH/DMV6f0s6FRS2BrasrFQzSA=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
E5N+JajMeuuFCA+bQm/ITWtLis1fB8B6o0SjxC39OVA=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudListenerInitSDK.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
99sNc7pHhNMhxhE/ugBuz/xFC+4=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
BpI0OJM3O2t4jgTcMi4o+3Z7mU8f1kFE73Z3VRVbWv4=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudListenerNotifyStateChange.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
iZ8b1pdDNuD7nHEQYBLp65/hkV4=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
PWJ/qoGQoZ7q06cdLh64YQbMcdOfkPQ76KGjgzLEbPU=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudListenerUninitSDK.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
ClT1ZLLUSYZr2uY6o7Itdtw1i/Y=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
Cuq7ZfNPUJdvjQh33Bn4AiC5gjOAavE6Pu9n6FVoVwM=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ISudLogger.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
jTVkYtMibuUnks31dwc+LW0ScQE=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
iCdKI3ofxZf+tL///BgQljkcPTaFTTY5fU0ptZqIceg=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RTSSResult.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
80kyv8aQpoAipg6Ia8MkA8kinNQ=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
pU2NBhGvfAME1J7lBpqvtZhFVMFZuDiajV/0wiZNDNk=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/SmRtAsr.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
wvXLscKLU/iJogrD+w0w3hzlhaI=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
eDzfspvlVv95CQYGVBtfIw/sq8Xp831Y9aewbgc0BpA=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/SmRtAsrClient.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
hshBcpfi1tW5ptVbt6Ox0YI/Wog=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
wZqO4WGOpYS+n8/gPU5eimIMFfeYuZCaezw/2uzmh6w=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/SudMGP-umbrella.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
CiDY/99QZbrSottMgxuMLMyad9M=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
guPQE5ynbPZNhglA9m1j1LEVSet0AmuMV7bUVmscRa4=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/SudMGP.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
jnWohTHm9H1gS2UqqpuB7FST1Vc=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
4bMB1wRViS9RykPPIBLHvJkQ5Y87+6xIrwQjRLTwFaU=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
SqkCCW826QrTr8CHz/pkF0Gg7Uk=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
82DYi24VDJO9ZsI9GZScAIDV9kyxpUfN6/NyRZTI990=
|
||||
</data>
|
||||
</dict>
|
||||
<key>fsm_mgp_game_loading_progress.png</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
dtpNcJpsR3zafFe134BfDkM+F/8=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
PmZ2XWgwRMBpMFC0fewgSN0AQWnYtYfKIc73k87S9No=
|
||||
</data>
|
||||
</dict>
|
||||
<key>fsm_mgp_game_loading_progress_bg.png</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
G5Xy+4h7dGMY6FJB5kqFR+sdgmo=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
kWsbDMHTQ7BUH2wEALcw8lnRExfB0XZ+DgAVGha920M=
|
||||
</data>
|
||||
</dict>
|
||||
<key>plugin.zip</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
DT5CFEb70VfK0g/AcgYOm5zx5pU=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
tLA/Jt5EMBrB1OYfN5RMEx4QjkdrTxizY217oGxA+SU=
|
||||
</data>
|
||||
</dict>
|
||||
<key>sud.png</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
vQlHDEdu0+Q1In7/lmqL55xESZU=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
jGjXGnBah08RrghQiM7wJELGteiQM/iZdJDXE8Bq6C8=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
@@ -1648,7 +1648,7 @@
|
||||
}
|
||||
///开启普通礼物特效定时器
|
||||
- (void)startHandleGiftEffectTimer {
|
||||
NSTimeInterval period = 6.0; //设置时间间隔 6秒是 1、单纯的svga 2.有横幅有svga 3、只有横幅
|
||||
NSTimeInterval period = 1.0; //设置时间间隔 6秒是 1、单纯的svga 2.有横幅有svga 3、只有横幅
|
||||
dispatch_queue_t queue = dispatch_get_global_queue(0, 0);
|
||||
dispatch_source_t _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue);
|
||||
dispatch_source_set_timer(_timer, dispatch_walltime(NULL, 0), period * NSEC_PER_SEC, 0); //每秒执行
|
||||
@@ -1657,9 +1657,12 @@
|
||||
@kStrongify(self)
|
||||
if (self.svgaQueue.count > 0) {
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
GiftReceiveInfoModel * receiveModel = [self.svgaQueue firstObject];
|
||||
[self createGiftSvgaAnimation:receiveModel];
|
||||
[self.svgaQueue removeObject:receiveModel];
|
||||
if(self.isLargeGiftAnimating == NO){
|
||||
GiftReceiveInfoModel * receiveModel = [self.svgaQueue firstObject];
|
||||
[self createGiftSvgaAnimation:receiveModel];
|
||||
[self.svgaQueue removeObject:receiveModel];
|
||||
}
|
||||
|
||||
});
|
||||
}else {
|
||||
dispatch_source_cancel(_timer);
|
||||
@@ -1757,7 +1760,7 @@
|
||||
|
||||
- (void)largeGiftStopCarEffect:(double)goldPrice {
|
||||
if ([ClientConfig shareConfig].configInfo.hideCarEffectGiftPrice <= goldPrice) {
|
||||
|
||||
self.isLargeGiftAnimating = YES;
|
||||
[self.carEffectView stopAnimation];
|
||||
[self.carVapEffectView stopHWDMP4];
|
||||
[self.carEffectQueue removeAllObjects];
|
||||
@@ -1820,7 +1823,7 @@
|
||||
NSData *data=[NSData dataWithContentsOfFile:filePath options:0 error:NULL];
|
||||
[self.parser parseWithData:data cacheKey:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
if (videoItem != nil) {
|
||||
self.isLargeGiftAnimating = YES;
|
||||
|
||||
self.giftEffectView.hidden = NO;
|
||||
if (self.giftEffectView.superview == nil) {
|
||||
[self.middleLevelView addSubview:self.giftEffectView];
|
||||
@@ -1857,7 +1860,7 @@
|
||||
|
||||
[self.parser parseWithURL:[NSURL URLWithString:vggUrl] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
|
||||
if (videoItem != nil) {
|
||||
self.isLargeGiftAnimating = YES;
|
||||
|
||||
self.giftEffectView.hidden = NO;
|
||||
if (self.giftEffectView.superview == nil) {
|
||||
[self.middleLevelView addSubview:self.giftEffectView];
|
||||
@@ -1898,7 +1901,7 @@
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
if ([fileManager fileExistsAtPath:filePath]){
|
||||
vapUrl = filePath;
|
||||
self.isLargeGiftAnimating = YES;
|
||||
|
||||
self.vapGiftEffectView.hidden = NO;
|
||||
if (self.vapGiftEffectView.superview == nil) {
|
||||
[self.middleLevelView addSubview:self.vapGiftEffectView];
|
||||
@@ -1914,7 +1917,7 @@
|
||||
}
|
||||
[self.vapParser parseWithURL:vapUrl completionBlock:^(NSString * _Nullable videoUrl) {
|
||||
if (videoUrl.length) {
|
||||
self.isLargeGiftAnimating = YES;
|
||||
|
||||
self.vapGiftEffectView.hidden = NO;
|
||||
if (self.vapGiftEffectView.superview == nil) {
|
||||
[self.middleLevelView addSubview:self.vapGiftEffectView];
|
||||
|
Reference in New Issue
Block a user