10 #define AgoraMetaKit_h
13 #import <Foundation/Foundation.h>
14 #include <objc/objc.h>
15 #include <objc/NSObjCRuntime.h>
75 @property (nonatomic, assign) NSInteger
bundleId;
76 @property (nonatomic, assign) NSInteger
sceneId;
78 @property (nonatomic, copy) NSString * _Nonnull
bundleCode;
79 @property (nonatomic, copy) NSString * _Nonnull
bundleName;
80 @property (nonatomic, copy) NSString * _Nonnull
desc;
82 @property (nonatomic, copy) NSString * _Nonnull
bundlePath;
85 @property (nonatomic, copy) NSString * _Nonnull
assets;
86 @property (nonatomic, copy) NSString * _Nullable
extraInfo;
92 @property (nonatomic, assign) NSInteger
sceneId;
93 @property (nonatomic, copy) NSString * _Nonnull sceneName;
96 @property (nonatomic, copy) NSString * _Nonnull scenePath;
97 @property (nonatomic, copy) NSString * _Nonnull parentScenePath;
98 @property (nonatomic, copy) NSString * _Nonnull
desc;
99 @property (nonatomic, copy) NSString * _Nonnull sceneConfig;
100 @property (nonatomic, copy) NSString * _Nullable
extraInfo;
101 @property (nonatomic, copy) NSString * _Nonnull sceneVersion;
102 @property (nonatomic, copy) NSString * _Nonnull sceneLocalVersion;
103 @property (nonatomic, assign) NSInteger totalSize;
105 @property (nonatomic, strong) NSArray<AgoraMetaBundleInfo *> * _Nonnull bundles;
109 @property (nonatomic, copy) NSString * _Nonnull userId;
110 @property (nonatomic, copy) NSString * _Nonnull userName;
111 @property (nonatomic, copy) NSString * _Nonnull userIconUrl;
115 @property (nonatomic, copy) NSArray * _Nonnull position;
116 @property (nonatomic, copy) NSArray * _Nonnull forward;
117 @property (nonatomic, copy) NSArray * _Nonnull right;
118 @property (nonatomic, copy) NSArray * _Nonnull up;
124 - (void)onCreateSceneResult:(
AgoraMetaScene *_Nullable)scene errorCode:(NSInteger)errorCode;
127 - (void)onGetSceneAssetsInfoResult:(NSMutableArray * _Nonnull)sceneInfos errorCode:(NSInteger)errorCode;
128 - (void)onDownloadSceneAssetsProgress:(NSInteger)sceneId progress:(NSInteger)progress state:(
AgoraMetaDownloadStateType)state;
132 - (void)metaScene:(
AgoraMetaScene *_Nonnull)scene onReleasedScene:(NSInteger)errorCode;
133 - (void)metaScene:(
AgoraMetaScene *_Nonnull)scene onEnterSceneResult:(NSInteger)errorCode;
134 - (void)metaScene:(
AgoraMetaScene *_Nonnull)scene onLeaveSceneResult:(NSInteger)errorCode;
135 - (void)metaScene:(
AgoraMetaScene *_Nonnull)scene onSceneMessageReceived:(NSData * _Nonnull)message;
137 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
142 - (void)metaScene:(
AgoraMetaScene *_Nonnull)scene onRecvMessageFromUser:(NSString * _Nonnull)userId message:(NSData * _Nonnull)message;
143 - (void)metaScene:(
AgoraMetaScene *_Nonnull)scene onRecvBroadcastMessage:(NSData * _Nonnull)message;
144 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
145 - (void)metaScene:(
AgoraMetaScene *_Nonnull)scene onAddSceneViewResult:(NSView * _Nonnull)view errorCode:(NSInteger)errorCode;
147 - (void)metaScene:(
AgoraMetaScene *_Nonnull)scene onAddSceneViewResult:(UIView * _Nonnull)view errorCode:(NSInteger)errorCode;
149 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
150 - (void)metaScene:(
AgoraMetaScene *_Nonnull)scene onRemoveSceneViewResult:(NSView * _Nonnull)view errorCode:(NSInteger)errorCode;
152 - (void)metaScene:(
AgoraMetaScene *_Nonnull)scene onRemoveSceneViewResult:(UIView * _Nonnull)view errorCode:(NSInteger)errorCode;
158 @property (nonatomic,assign) BOOL localVisible;
159 @property (nonatomic,assign) BOOL remoteVisible;
160 @property (nonatomic,assign) BOOL syncPosition;
164 @property (nonatomic, copy) NSString * _Nonnull appId;
165 @property (nonatomic, copy) NSString * _Nonnull rtmToken;
166 @property (nonatomic, copy) NSString * _Nonnull rtcToken;
167 @property (nonatomic, copy) NSString * _Nonnull userId;
168 @property (nonatomic, weak) id<AgoraMetaEventDelegate> _Nullable delegate;
169 @property (nonatomic, copy) NSString * _Nonnull localDownloadPath;
175 @property (nonatomic, weak) id<AgoraMetaSceneEventDelegate> _Nullable delegate;
176 @property (nonatomic, assign) BOOL enableFaceCapture;
177 @property (nonatomic, copy) NSString * _Nonnull faceCaptureAppId;
178 @property (nonatomic, copy) NSString * _Nonnull faceCaptureCertificate;
182 @property (nonatomic, copy) NSString * _Nonnull roomName;
183 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
184 @property (nonatomic, strong) NSView * _Nonnull sceneView;
186 @property (nonatomic, strong) UIView * _Nonnull sceneView;
188 @property (nonatomic, assign) NSInteger
sceneId;
189 @property (nonatomic, copy) NSString * _Nullable scenePath;
190 @property (nonatomic, strong) NSData * _Nullable
extraInfo;
194 @property (nonatomic, assign) NSInteger width;
195 @property (nonatomic, assign) NSInteger height;
196 @property (nonatomic, strong) NSData * _Nullable
extraInfo;
204 - (NSInteger)setExtraInfo:(NSData *_Nullable)customInfo;
212 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
213 - (NSView *_Nullable)createRenderView:(CGRect)frame;
215 - (UIView *_Nullable)createRenderView:(CGRect)frame;
220 - (NSInteger)sendSceneMessage:(NSData *_Nonnull)message;
221 - (NSInteger)setSceneParameters:(NSString *_Nonnull)jsonParam;
222 - (NSInteger)enableVideoDisplay:(NSString *_Nonnull)displayId enable:(BOOL)enable;
223 - (NSInteger)pushVideoFrameToDisplay:(NSString *_Nonnull)displayId frame:(
AgoraVideoFrame *_Nullable)frame;
224 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
225 - (NSInteger)enableSceneVideoCapture:(NSView *_Nonnull)view enable:(BOOL)enable;
227 - (NSInteger)removeSceneView:(NSView *_Nonnull)view;
229 - (NSInteger)enableSceneVideoCapture:(UIView *_Nonnull)view enable:(BOOL)enable;
231 - (NSInteger)removeSceneView:(UIView *_Nonnull)view;
233 - (NSInteger)enableFaceCapture:(BOOL)enable;
236 - (void)enableMainQueueDispatch:(BOOL)enabled NS_SWIFT_NAME(enableMainQueueDispatch(_:));
240 + (instancetype _Nonnull)sharedMetaServiceWithConfig:(
AgoraMetaServiceConfig* _Nonnull)config NS_SWIFT_NAME(sharedMetaServiceWithConfig(_:));
243 - (NSInteger)renewToken:(NSString *_Nonnull)token;
247 - (NSInteger)isSceneAssetsDownloaded:(NSInteger)sceneId;
248 - (NSInteger)downloadSceneAssets:(NSInteger)sceneId;
249 - (NSInteger)cancelDownloadSceneAssets:(NSInteger)sceneId;
250 - (NSInteger)cleanSceneAssets:(NSInteger)sceneId;