matrixbirds пре 4 година
родитељ
комит
14c44b42f0

+ 8
- 0
CHANGELOG Прегледај датотеку

1
 ## THE CHANGELOG
1
 ## THE CHANGELOG
2
 
2
 
3
+#### 2.8.0-alpha.1
4
+  - add `string uid` api support
5
+  - android: deprecate `lowLatency` member of LiveTranscoding
6
+  - add methods `getUserInfoByUserAccount`, `getUserInfoByUid`, `joinChannelWithUserAccount`, `registerLocalUserAccount`
7
+  - add events `localUserRegistered`, `userInfoUpdated`
8
+  - android: upgrade native sdk to 2.8.2
9
+  - ios: upgrade native sdk to 2.8.0
10
+
3
 #### 2.4.1-alpha.3
11
 #### 2.4.1-alpha.3
4
 - refactor setLiveTranscoding: rename ios & android native parameters. export enum for javascript/typescript api.
12
 - refactor setLiveTranscoding: rename ios & android native parameters. export enum for javascript/typescript api.
5
 - fix negative number case in android platform.
13
 - fix negative number case in android platform.

+ 1
- 1
android/build.gradle Прегледај датотеку

61
     def androidSupportVersion = rootProject.hasProperty("androidSupportVersion")  ? rootProject.androidSupportVersion : DEFAULT_ANDROID_SUPPORT_VERSION
61
     def androidSupportVersion = rootProject.hasProperty("androidSupportVersion")  ? rootProject.androidSupportVersion : DEFAULT_ANDROID_SUPPORT_VERSION
62
     // from internet
62
     // from internet
63
     implementation "com.android.support:appcompat-v7:$androidSupportVersion"
63
     implementation "com.android.support:appcompat-v7:$androidSupportVersion"
64
-    implementation "io.agora.rtc:full-sdk:2.4.1"
64
+    implementation "io.agora.rtc:full-sdk:2.8.2"
65
     // from node_modules
65
     // from node_modules
66
     implementation "com.facebook.react:react-native:+"
66
     implementation "com.facebook.react:react-native:+"
67
 }
67
 }

+ 2
- 0
android/src/main/java/com/syan/agora/AgoraConst.java Прегледај датотеку

10
     public final static String AGRejoinChannelSuccess = "rejoinChannelSuccess";
10
     public final static String AGRejoinChannelSuccess = "rejoinChannelSuccess";
11
     public final static String AGLeaveChannel = "leaveChannel";
11
     public final static String AGLeaveChannel = "leaveChannel";
12
     public final static String AGClientRoleChanged = "clientRoleChanged";
12
     public final static String AGClientRoleChanged = "clientRoleChanged";
13
+    public final static String AGLocalUserRegistered = "localUserRegistered";
14
+    public final static String AGUserInfoUpdated = "userInfoUpdated";
13
     public final static String AGUserJoined = "userJoined";
15
     public final static String AGUserJoined = "userJoined";
14
     public final static String AGUserOffline = "userOffline";
16
     public final static String AGUserOffline = "userOffline";
15
     public final static String AGConnectionStateChanged = "connectionStateChanged";
17
     public final static String AGConnectionStateChanged = "connectionStateChanged";

+ 94
- 3
android/src/main/java/com/syan/agora/AgoraModule.java Прегледај датотеку

30
 import io.agora.rtc.internal.LastmileProbeConfig;
30
 import io.agora.rtc.internal.LastmileProbeConfig;
31
 import io.agora.rtc.live.LiveInjectStreamConfig;
31
 import io.agora.rtc.live.LiveInjectStreamConfig;
32
 import io.agora.rtc.live.LiveTranscoding;
32
 import io.agora.rtc.live.LiveTranscoding;
33
+import io.agora.rtc.models.UserInfo;
33
 import io.agora.rtc.video.AgoraImage;
34
 import io.agora.rtc.video.AgoraImage;
34
 import io.agora.rtc.video.BeautyOptions;
35
 import io.agora.rtc.video.BeautyOptions;
35
 import io.agora.rtc.video.CameraCapturerConfiguration;
36
 import io.agora.rtc.video.CameraCapturerConfiguration;
142
     private static final String AgoraAudioMode = "AudioMode";
143
     private static final String AgoraAudioMode = "AudioMode";
143
     private static final String AgoraVideoMode = "VideoMode";
144
     private static final String AgoraVideoMode = "VideoMode";
144
 
145
 
146
+    private RtcEngine rtcEngine;
147
+    private String appId;
148
+
145
     public AgoraModule(ReactApplicationContext context) {
149
     public AgoraModule(ReactApplicationContext context) {
146
         super(context);
150
         super(context);
147
     }
151
     }
379
             });
383
             });
380
         }
384
         }
381
 
385
 
386
+        @Override
387
+        public void onLocalUserRegistered(final int uid, final String userAccount) {
388
+            runOnUiThread(new Runnable() {
389
+                @Override
390
+                public void run() {
391
+                    WritableMap map = Arguments.createMap();
392
+                    map.putInt("uid", uid);
393
+                    map.putString("userAccount", userAccount);
394
+                    sendEvent(getReactApplicationContext(), AGLocalUserRegistered, map);
395
+                }
396
+            });
397
+        }
398
+
399
+        @Override
400
+        public void onUserInfoUpdated(final int uid, final UserInfo peer) {
401
+            runOnUiThread(new Runnable() {
402
+                @Override
403
+                public void run() {
404
+                    WritableMap map = Arguments.createMap();
405
+                    map.putInt("uid", uid);
406
+                    WritableMap peerInfo = Arguments.createMap();
407
+                    peerInfo.putInt("uid", peer.uid);
408
+                    peerInfo.putString("userAccount", peer.userAccount);
409
+                    map.putMap("peer", peerInfo);
410
+                    sendEvent(getReactApplicationContext(), AGUserInfoUpdated, map);
411
+                }
412
+            });
413
+        }
414
+
382
         @Override
415
         @Override
383
         public void onUserJoined(final int uid, final int elapsed) {
416
         public void onUserJoined(final int uid, final int elapsed) {
384
             runOnUiThread(new Runnable() {
417
             runOnUiThread(new Runnable() {
775
                     statsMap.putInt("networkTransportDelay", stats.networkTransportDelay);
808
                     statsMap.putInt("networkTransportDelay", stats.networkTransportDelay);
776
                     statsMap.putInt("jitterBufferDelay", stats.jitterBufferDelay);
809
                     statsMap.putInt("jitterBufferDelay", stats.jitterBufferDelay);
777
                     statsMap.putInt("audioLossRate", stats.audioLossRate);
810
                     statsMap.putInt("audioLossRate", stats.audioLossRate);
811
+                    statsMap.putInt("totalFrozenTime", stats.totalFrozenTime);
812
+                    statsMap.putInt("frozenRate", stats.frozenRate);
813
+                    statsMap.putInt("numChannels", stats.numChannels);
814
+                    statsMap.putInt("receivedSampleRate", stats.receivedSampleRate);
815
+                    statsMap.putInt("receivedBitrate", stats.receivedBitrate);
778
                     WritableMap map = Arguments.createMap();
816
                     WritableMap map = Arguments.createMap();
779
                     map.putMap("stats", statsMap);
817
                     map.putMap("stats", statsMap);
780
                     sendEvent(getReactApplicationContext(), AGRemoteAudioStats, map);
818
                     sendEvent(getReactApplicationContext(), AGRemoteAudioStats, map);
865
                     statsMap.putInt("receivedBitrate", stats.receivedBitrate);
903
                     statsMap.putInt("receivedBitrate", stats.receivedBitrate);
866
                     statsMap.putInt("rendererOutputFrameRate", stats.rendererOutputFrameRate);
904
                     statsMap.putInt("rendererOutputFrameRate", stats.rendererOutputFrameRate);
867
                     statsMap.putInt("rxStreamType", stats.rxStreamType);
905
                     statsMap.putInt("rxStreamType", stats.rxStreamType);
906
+                    statsMap.putInt("totalFrozenTime", stats.totalFrozenTime);
907
+                    statsMap.putInt("frozenRate", stats.frozenRate);
868
                     WritableMap map = Arguments.createMap();
908
                     WritableMap map = Arguments.createMap();
869
                     map.putMap("stats", statsMap);
909
                     map.putMap("stats", statsMap);
870
                     sendEvent(getReactApplicationContext(), AGRemoteVideoStats, map);
910
                     sendEvent(getReactApplicationContext(), AGRemoteVideoStats, map);
1077
     @ReactMethod
1117
     @ReactMethod
1078
     public void init(ReadableMap options) {
1118
     public void init(ReadableMap options) {
1079
         AgoraManager.getInstance().init(getReactApplicationContext(), mRtcEventHandler, options);
1119
         AgoraManager.getInstance().init(getReactApplicationContext(), mRtcEventHandler, options);
1120
+        appId = options.getString("appid");
1121
+        rtcEngine = AgoraManager.getInstance().mRtcEngine;
1080
     }
1122
     }
1081
 
1123
 
1082
     @ReactMethod
1124
     @ReactMethod
1130
         }
1172
         }
1131
     }
1173
     }
1132
 
1174
 
1175
+    @ReactMethod
1176
+    public void registerLocalUserAccount(ReadableMap options, Promise promise) {
1177
+        Integer res = rtcEngine.registerLocalUserAccount(appId, options.getString("userAccount"));
1178
+        if (res == 0) {
1179
+            promise.resolve(null);
1180
+        } else {
1181
+            promise.reject("-1", res.toString());
1182
+        }
1183
+    }
1184
+
1185
+    @ReactMethod
1186
+    public void joinChannelWithUserAccount(ReadableMap options, Promise promise) {
1187
+        String token = null;
1188
+        if (options.hasKey("token")) {
1189
+            token = options.getString("token");
1190
+        }
1191
+        Integer res = rtcEngine.joinChannelWithUserAccount(token, options.getString("channelName"), options.getString("userAccount"));
1192
+        if (res == 0) {
1193
+            promise.resolve(null);
1194
+        } else {
1195
+            promise.reject("-1", res.toString());
1196
+        }
1197
+    }
1198
+
1199
+    @ReactMethod
1200
+    public void getUserInfoByUid(Integer uid, Promise promise) {
1201
+        UserInfo info = new UserInfo();
1202
+        Integer res = rtcEngine.getUserInfoByUid(uid, info);
1203
+        if (res == 0) {
1204
+            WritableMap map = Arguments.createMap();
1205
+            map.putInt("uid", info.uid);
1206
+            map.putString("userAccount", info.userAccount);
1207
+            promise.resolve(map);
1208
+        } else {
1209
+            promise.reject("-1", res.toString());
1210
+        }
1211
+    }
1212
+
1213
+    @ReactMethod
1214
+    public void getUserInfoByUserAccount(String userAccount, Promise promise) {
1215
+        UserInfo info = new UserInfo();
1216
+        Integer res = rtcEngine.getUserInfoByUserAccount(userAccount, info);
1217
+        if (res == 0) {
1218
+            WritableMap map = Arguments.createMap();
1219
+            map.putInt("uid", info.uid);
1220
+            map.putString("userAccount", info.userAccount);
1221
+            promise.resolve(map);
1222
+        } else {
1223
+            promise.reject("-1", res.toString());
1224
+        }
1225
+    }
1226
+
1133
     @ReactMethod
1227
     @ReactMethod
1134
     public void leaveChannel(Promise promise) {
1228
     public void leaveChannel(Promise promise) {
1135
         Integer res = AgoraManager.getInstance().leaveChannel();
1229
         Integer res = AgoraManager.getInstance().leaveChannel();
2018
         if (options.hasKey("videoFramerate")) {
2112
         if (options.hasKey("videoFramerate")) {
2019
             transcoding.videoFramerate = options.getInt("videoFramerate");
2113
             transcoding.videoFramerate = options.getInt("videoFramerate");
2020
         }
2114
         }
2021
-        if (options.hasKey("lowLatency")) {
2022
-            transcoding.lowLatency = options.getBoolean("lowLatency");
2023
-        }
2024
         if (options.hasKey("videoGop")) {
2115
         if (options.hasKey("videoGop")) {
2025
             transcoding.videoGop = options.getInt("videoGop");
2116
             transcoding.videoGop = options.getInt("videoGop");
2026
         }
2117
         }

+ 2
- 0
ios/RCTAgora/AgoraConst.h Прегледај датотеку

19
 static NSString *AGRejoinChannelSuccess = @"rejoinChannelSuccess";
19
 static NSString *AGRejoinChannelSuccess = @"rejoinChannelSuccess";
20
 static NSString *AGLeaveChannel = @"leaveChannel";
20
 static NSString *AGLeaveChannel = @"leaveChannel";
21
 static NSString *AGClientRoleChanged = @"clientRoleChanged";
21
 static NSString *AGClientRoleChanged = @"clientRoleChanged";
22
+static NSString *AGLocalUserRegistered = @"localUserRegistered";
23
+static NSString *AGUserInfoUpdated = @"userInfoUpdated";
22
 static NSString *AGUserJoined = @"userJoined";
24
 static NSString *AGUserJoined = @"userJoined";
23
 static NSString *AGUserOffline = @"userOffline";
25
 static NSString *AGUserOffline = @"userOffline";
24
 static NSString *AGConnectionStateChanged = @"connectionStateChanged";
26
 static NSString *AGConnectionStateChanged = @"connectionStateChanged";

+ 2
- 0
ios/RCTAgora/AgoraConst.m Прегледај датотеку

35
                                   AGRejoinChannelSuccess,
35
                                   AGRejoinChannelSuccess,
36
                                   AGLeaveChannel,
36
                                   AGLeaveChannel,
37
                                   AGClientRoleChanged,
37
                                   AGClientRoleChanged,
38
+                                  AGLocalUserRegistered,
39
+                                  AGUserInfoUpdated,
38
                                   AGUserJoined,
40
                                   AGUserJoined,
39
                                   AGUserOffline,
41
                                   AGUserOffline,
40
                                   AGConnectionStateChanged,
42
                                   AGConnectionStateChanged,

+ 86
- 6
ios/RCTAgora/RCTAgora.m Прегледај датотеку

17
 
17
 
18
 @interface RCTAgora ()
18
 @interface RCTAgora ()
19
 @property (strong, nonatomic) AgoraRtcEngineKit *rtcEngine;
19
 @property (strong, nonatomic) AgoraRtcEngineKit *rtcEngine;
20
+@property (strong, nonatomic) NSString *appId;
20
 @property (strong, nonatomic) NSData *metadata;
21
 @property (strong, nonatomic) NSData *metadata;
21
 @end
22
 @end
22
 
23
 
176
   [AgoraConst share].appid = options[@"appid"];
177
   [AgoraConst share].appid = options[@"appid"];
177
   
178
   
178
   self.rtcEngine = [AgoraRtcEngineKit sharedEngineWithAppId:options[@"appid"] delegate:self];
179
   self.rtcEngine = [AgoraRtcEngineKit sharedEngineWithAppId:options[@"appid"] delegate:self];
180
+  self.appId = options[@"appid"];
179
   
181
   
180
   [AgoraConst share].rtcEngine = self.rtcEngine;
182
   [AgoraConst share].rtcEngine = self.rtcEngine;
181
   
183
   
299
   }
301
   }
300
 }
302
 }
301
 
303
 
304
+// register user account
305
+RCT_EXPORT_METHOD(registerLocalUserAccount:(NSDictionary *)options
306
+                  resolve:(RCTPromiseResolveBlock)resolve
307
+                  reject:(RCTPromiseRejectBlock)reject) {
308
+  NSInteger res = [self.rtcEngine registerLocalUserAccount:options[@"userAccount"] appId:self.appId];
309
+  if (res == 0) {
310
+    resolve(nil);
311
+  } else {
312
+    reject(@(-1).stringValue, @(res).stringValue, nil);
313
+  }
314
+}
315
+
316
+// join channel with user account
317
+RCT_EXPORT_METHOD(joinChannelWithUserAccount:(NSDictionary *)options
318
+                  resolve:(RCTPromiseResolveBlock)resolve
319
+                  reject:(RCTPromiseRejectBlock)reject) {
320
+  NSString *token = [options objectForKey:@"token"] != nil ? options[@"token"] : nil;
321
+  NSInteger res = [self.rtcEngine joinChannelByUserAccount:options[@"userAccount"] token:token channelId:options[@"channelName"] joinSuccess:nil];
322
+  if (res == 0) {
323
+    resolve(nil);
324
+  } else {
325
+    reject(@(-1).stringValue, @(res).stringValue, nil);
326
+  }
327
+}
328
+
329
+// get user info by uid
330
+RCT_EXPORT_METHOD(getUserInfoByUid:(NSUInteger)uid
331
+                  resolve:(RCTPromiseResolveBlock)resolve
332
+                  reject:(RCTPromiseRejectBlock)reject) {
333
+  AgoraErrorCode code = 0;
334
+  AgoraUserInfo *info = [self.rtcEngine getUserInfoByUid:uid withError:&code];
335
+  if ((int)code == 0) {
336
+    resolve(@{
337
+        @"uid": @(info.uid),
338
+        @"userAccount": info.userAccount
339
+    });
340
+  } else {
341
+    reject(@(-1).stringValue, @((int)code).stringValue, nil);
342
+  }
343
+}
344
+
345
+// get user info by user account
346
+RCT_EXPORT_METHOD(getUserInfoByUserAccount:(NSString *)userAccount
347
+                  resolve:(RCTPromiseResolveBlock)resolve
348
+                  reject:(RCTPromiseRejectBlock)reject) {
349
+  AgoraErrorCode code = 0;
350
+  AgoraUserInfo *info = [self.rtcEngine getUserInfoByUserAccount:userAccount withError:&code];
351
+  if ((int)code == 0) {
352
+    resolve(@{
353
+              @"uid": @(info.uid),
354
+              @"userAccount": info.userAccount
355
+              });
356
+  } else {
357
+    reject(@(-1).stringValue, @((int)code).stringValue, nil);
358
+  }
359
+}
360
+
302
 // leave channel
361
 // leave channel
303
 RCT_EXPORT_METHOD(leaveChannel
362
 RCT_EXPORT_METHOD(leaveChannel
304
                   :(RCTPromiseResolveBlock) resolve
363
                   :(RCTPromiseResolveBlock) resolve
1400
   if ([options objectForKey:@"videoFramerate"]) {
1459
   if ([options objectForKey:@"videoFramerate"]) {
1401
     transcoding.videoFramerate = [options[@"videoFramerate"] integerValue];
1460
     transcoding.videoFramerate = [options[@"videoFramerate"] integerValue];
1402
   }
1461
   }
1403
-  if ([options objectForKey:@"lowLatancy"]) {
1404
-    transcoding.lowLatency = [options[@"lowLatancy"] boolValue];
1405
-  }
1406
   if ([options objectForKey:@"videoGop"]) {
1462
   if ([options objectForKey:@"videoGop"]) {
1407
     transcoding.videoGop = [options[@"videoGop"] integerValue];
1463
     transcoding.videoGop = [options[@"videoGop"] integerValue];
1408
   }
1464
   }
1714
                                         }];
1770
                                         }];
1715
 }
1771
 }
1716
 
1772
 
1773
+- (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine didRegisteredLocalUser:(NSString *_Nonnull)userAccount withUid:(NSUInteger)uid {
1774
+  [self sendEvent:AGLocalUserRegistered params:@{
1775
+                                                 @"uid": @(uid),
1776
+                                                 @"userAccount": userAccount
1777
+                                                 }];
1778
+}
1779
+
1780
+- (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine didUpdatedUserInfo:(AgoraUserInfo *_Nonnull)userInfo withUid:(NSUInteger)uid {
1781
+  [self sendEvent:AGUserInfoUpdated params:@{
1782
+                                                 @"uid": @(uid),
1783
+                                                 @"peer": @{
1784
+                                                     @"uid": @(userInfo.uid),
1785
+                                                     @"userAccount": userInfo.userAccount
1786
+                                                 }}];
1787
+}
1788
+
1789
+
1717
 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine didOfflineOfUid:(NSUInteger)uid reason:(AgoraUserOfflineReason)reason {
1790
 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine didOfflineOfUid:(NSUInteger)uid reason:(AgoraUserOfflineReason)reason {
1718
   [self sendEvent:AGUserOffline params:@{
1791
   [self sendEvent:AGUserOffline params:@{
1719
                                          @"uid": @(uid),
1792
                                          @"uid": @(uid),
1905
                                                   @"quality": @(stats.quality),
1978
                                                   @"quality": @(stats.quality),
1906
                                                   @"networkTransportDelay": @(stats.networkTransportDelay),
1979
                                                   @"networkTransportDelay": @(stats.networkTransportDelay),
1907
                                                   @"jitterBufferDelay": @(stats.jitterBufferDelay),
1980
                                                   @"jitterBufferDelay": @(stats.jitterBufferDelay),
1908
-                                                  @"audioLossRate": @(stats.audioLossRate)
1981
+                                                  @"audioLossRate": @(stats.audioLossRate),
1982
+                                                  @"totalFrozenTime": @(stats.totalFrozenTime),
1983
+                                                  @"frozenRate": @(stats.frozenRate),
1984
+                                                  @"numChannels": @(stats.numChannels),
1985
+                                                  @"receivedSampleRate": @(stats.receivedSampleRate),
1986
+                                                  @"receivedBitrate": @(stats.receivedBitrate),
1909
                                                   }
1987
                                                   }
1910
                                               }];
1988
                                               }];
1911
 }
1989
 }
1965
                                                   @"receivedBitrate": @(stats.receivedBitrate),
2043
                                                   @"receivedBitrate": @(stats.receivedBitrate),
1966
                                                   @"rendererOutputFrameRate": @(stats.rendererOutputFrameRate),
2044
                                                   @"rendererOutputFrameRate": @(stats.rendererOutputFrameRate),
1967
                                                   @"rxStreamType": @(stats.rxStreamType),
2045
                                                   @"rxStreamType": @(stats.rxStreamType),
1968
-                                                  @"decoderOutputFrameRate": @(stats.decoderOutputFrameRate)
2046
+                                                  @"decoderOutputFrameRate": @(stats.decoderOutputFrameRate),
2047
+                                                  @"totalFrozenTime": @(stats.totalFrozenTime),
2048
+                                                  @"frozenRate": @(stats.frozenRate)
1969
                                                   }
2049
                                                   }
1970
                                               }];
2050
                                               }];
1971
 }
2051
 }
2106
                                                      }];
2186
                                                      }];
2107
 }
2187
 }
2108
 
2188
 
2109
-@end
2189
+@end

+ 49
- 1
lib/RtcEngine.native.d.ts Прегледај датотеку

1
-import { Option, Callback, AudioMixingOption, PlayEffectOption, AudioRecordingOption, AudioFrameOption, MixedAudioFrameOption, ImageOption, VideoStreamOption, DefaultVideoStreamOption, InjectStreamOption, RemoveInjectStreamOption, PublishStreamOption, RemovePublishStreamOption, LiveTranscodingOption, PositionOption, BeautyOption, LastmileProbeConfig, CameraCapturerConfiguration } from "./types";
1
+import { Option, Callback, AgoraUserInfo, AudioMixingOption, PlayEffectOption, AudioRecordingOption, AudioFrameOption, MixedAudioFrameOption, ImageOption, VideoStreamOption, DefaultVideoStreamOption, InjectStreamOption, RemoveInjectStreamOption, PublishStreamOption, RemovePublishStreamOption, LiveTranscodingOption, PositionOption, BeautyOption, LastmileProbeConfig, CameraCapturerConfiguration } from "./types";
2
 /**
2
 /**
3
  * RtcEngine is the javascript object for control agora native sdk through react native bridge.
3
  * RtcEngine is the javascript object for control agora native sdk through react native bridge.
4
  *
4
  *
30
      * @param info
30
      * @param info
31
      */
31
      */
32
     static joinChannel(channelName: string, uid?: number, token?: string, info?: Object): Promise<any>;
32
     static joinChannel(channelName: string, uid?: number, token?: string, info?: Object): Promise<any>;
33
+    /**
34
+     * Registers a user account.
35
+     *
36
+     * Once registered, the user account can be used to identify the local user when the user joins the channel. After the user successfully registers a user account, the SDK triggers the `on("localUserRegistered", callback)` on the local client, reporting the user ID and user account of the local user.
37
+     * To join a channel with a user account, you can choose either of the following:
38
+     * Call the {@link registerLocalUserAccount} method to create a user account, and then the {@link joinChannelWithUserAccount} method to join the channel.
39
+     * Call the {@link joinChannelWithUserAccount} method to join the channel.
40
+     *
41
+     * @note To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the uid of the user is set to the same parameter type.
42
+     *
43
+     * @param userAccount
44
+     * @returns Promise<any>
45
+     */
46
+    static registerLocalUserAccount(userAccount: string): Promise<any>;
47
+    /**
48
+     * Joins the channel with a user account.
49
+     *
50
+     * After the user successfully joins the channel, the SDK triggers the following callbacks:
51
+     *
52
+     * The local client: `on("localUserRegistered", callback)` and `on("joinChannelSuccess", callback)`.
53
+     * The remote client: `on("userJoined", callback)` and `on("userInfoUpdated", callback)`, if the user joining the channel is in the Communication profile, or is a BROADCASTER in the Live Broadcast profile.
54
+     *
55
+     * @note To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the uid of the user is set to the same parameter type.
56
+     *
57
+     * @param channelName
58
+     * @param userAccount
59
+     * @param token
60
+     * @returns Promise<any>
61
+     */
62
+    static joinChannelWithUserAccount(channelName: string, userAccount: string, token: string): Promise<any>;
63
+    /**
64
+     * Gets the user information by passing in the user account.
65
+     *
66
+     * After receiving the "userInfoUpdated" callback, you can call this method to get the user ID of the remote user from the {@link AgoraUserInfo} object by passing in the userAccount.
67
+     * @param uid
68
+     * @returns Promise<{@link AgoraUserInfo}>
69
+     */
70
+    static getUserInfoByUid(uid: number): Promise<AgoraUserInfo>;
71
+    /**
72
+     * Gets the user information by passing in the user account.
73
+     *
74
+     * After receiving the "userInfoUpdated" callback, you can call this method to get the user ID of the remote user from the {@link AgoraUserInfo} object by passing in the userAccount.
75
+     * @param userAccount
76
+     * @returns Promise<{@link AgoraUserInfo}>
77
+     */
78
+    static getUserInfoByUserAccount(userAccount: string): Promise<AgoraUserInfo>;
33
     /**
79
     /**
34
      * add event listener
80
      * add event listener
35
      *
81
      *
109
      * localVideoChanged | occurs when the local video changed  | on("localVideoChanged", evt) |
155
      * localVideoChanged | occurs when the local video changed  | on("localVideoChanged", evt) |
110
      * networkTypeChanged | occurs when the device network type changed | on("networkTypeChanged", evt) |
156
      * networkTypeChanged | occurs when the device network type changed | on("networkTypeChanged", evt) |
111
      * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) |
157
      * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) |
158
+     * localUserRegistered | occurs when you register user account success | on("localUserRegistered", evt) |
159
+     * userInfoUpdated | occurs when you peer side using user account join channel | on("userInfoUpdated", evt) |
112
      * ---
160
      * ---
113
      *
161
      *
114
      * @param eventType
162
      * @param eventType

+ 84
- 0
lib/RtcEngine.native.js Прегледај датотеку

35
     static joinChannel(channelName, uid, token, info) {
35
     static joinChannel(channelName, uid, token, info) {
36
         return Agora.joinChannel({ channelName, uid, token, info });
36
         return Agora.joinChannel({ channelName, uid, token, info });
37
     }
37
     }
38
+    /**
39
+     * Registers a user account.
40
+     *
41
+     * Once registered, the user account can be used to identify the local user when the user joins the channel. After the user successfully registers a user account, the SDK triggers the `on("localUserRegistered", callback)` on the local client, reporting the user ID and user account of the local user.
42
+     * To join a channel with a user account, you can choose either of the following:
43
+     * Call the {@link registerLocalUserAccount} method to create a user account, and then the {@link joinChannelWithUserAccount} method to join the channel.
44
+     * Call the {@link joinChannelWithUserAccount} method to join the channel.
45
+     *
46
+     * @note To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the uid of the user is set to the same parameter type.
47
+     *
48
+     * @param userAccount
49
+     * @returns Promise<any>
50
+     */
51
+    static registerLocalUserAccount(userAccount) {
52
+        return Agora.registerLocalUserAccount({ userAccount });
53
+    }
54
+    /**
55
+     * Joins the channel with a user account.
56
+     *
57
+     * After the user successfully joins the channel, the SDK triggers the following callbacks:
58
+     *
59
+     * The local client: `on("localUserRegistered", callback)` and `on("joinChannelSuccess", callback)`.
60
+     * The remote client: `on("userJoined", callback)` and `on("userInfoUpdated", callback)`, if the user joining the channel is in the Communication profile, or is a BROADCASTER in the Live Broadcast profile.
61
+     *
62
+     * @note To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the uid of the user is set to the same parameter type.
63
+     *
64
+     * @param channelName
65
+     * @param userAccount
66
+     * @param token
67
+     * @returns Promise<any>
68
+     */
69
+    static joinChannelWithUserAccount(channelName, userAccount, token) {
70
+        return Agora.joinChannelWithUserAccount({ channelName, userAccount, token });
71
+    }
72
+    /**
73
+     * Gets the user information by passing in the user account.
74
+     *
75
+     * After receiving the "userInfoUpdated" callback, you can call this method to get the user ID of the remote user from the {@link AgoraUserInfo} object by passing in the userAccount.
76
+     * @param uid
77
+     * @returns Promise<{@link AgoraUserInfo}>
78
+     */
79
+    static getUserInfoByUid(uid) {
80
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
81
+            if (react_native_1.Platform.OS === 'android') {
82
+                const _uid = this.Uint32ToInt32(uid);
83
+                let result = yield Agora.getUserInfoByUid(_uid);
84
+                result.uid = this.Uint32ToInt32(result.uid);
85
+                return result;
86
+            }
87
+            return Agora.getUserInfoByUid(uid);
88
+        });
89
+    }
90
+    /**
91
+     * Gets the user information by passing in the user account.
92
+     *
93
+     * After receiving the "userInfoUpdated" callback, you can call this method to get the user ID of the remote user from the {@link AgoraUserInfo} object by passing in the userAccount.
94
+     * @param userAccount
95
+     * @returns Promise<{@link AgoraUserInfo}>
96
+     */
97
+    static getUserInfoByUserAccount(userAccount) {
98
+        return tslib_1.__awaiter(this, void 0, void 0, function* () {
99
+            if (react_native_1.Platform.OS === 'android') {
100
+                let result = yield Agora.getUserInfoByUserAccount(userAccount);
101
+                result.uid = this.Uint32ToInt32(result.uid);
102
+                return result;
103
+            }
104
+            return Agora.getUserInfoByUserAccount(userAccount);
105
+        });
106
+    }
38
     /**
107
     /**
39
      * add event listener
108
      * add event listener
40
      *
109
      *
114
      * localVideoChanged | occurs when the local video changed  | on("localVideoChanged", evt) |
183
      * localVideoChanged | occurs when the local video changed  | on("localVideoChanged", evt) |
115
      * networkTypeChanged | occurs when the device network type changed | on("networkTypeChanged", evt) |
184
      * networkTypeChanged | occurs when the device network type changed | on("networkTypeChanged", evt) |
116
      * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) |
185
      * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) |
186
+     * localUserRegistered | occurs when you register user account success | on("localUserRegistered", evt) |
187
+     * userInfoUpdated | occurs when you peer side using user account join channel | on("userInfoUpdated", evt) |
117
      * ---
188
      * ---
118
      *
189
      *
119
      * @param eventType
190
      * @param eventType
143
             'remoteSubscribeFallbackToAudioOnly',
214
             'remoteSubscribeFallbackToAudioOnly',
144
             'networkQuality',
215
             'networkQuality',
145
             'streamInjectedStatus',
216
             'streamInjectedStatus',
217
+            'localUserRegistered'
146
         ].indexOf(eventType) != -1) {
218
         ].indexOf(eventType) != -1) {
147
             AgoraEventEmitter.addListener(`${RtcEngine.AG_PREFIX}${eventType}`, (args) => {
219
             AgoraEventEmitter.addListener(`${RtcEngine.AG_PREFIX}${eventType}`, (args) => {
148
                 const uint32_uid = new Uint32Array(1);
220
                 const uint32_uid = new Uint32Array(1);
158
             });
230
             });
159
             return;
231
             return;
160
         }
232
         }
233
+        if (['userInfoUpdated'].indexOf(eventType) != -1) {
234
+            AgoraEventEmitter.addListener(`${RtcEngine.AG_PREFIX}${eventType}`, (args) => {
235
+                const uint32_uid = new Uint32Array(1);
236
+                uint32_uid[0] = args.uid;
237
+                args.uid = uint32_uid[0];
238
+                const uint32_peer_uid = new Uint32Array(1);
239
+                uint32_peer_uid[0] = args.peer.uid;
240
+                args.peer.uid = uint32_peer_uid[0];
241
+                listener(args);
242
+            });
243
+            return;
244
+        }
161
         if (['audioVolumeIndication'].indexOf(eventType) != -1) {
245
         if (['audioVolumeIndication'].indexOf(eventType) != -1) {
162
             AgoraEventEmitter.addListener(`${RtcEngine.AG_PREFIX}${eventType}`, (args) => {
246
             AgoraEventEmitter.addListener(`${RtcEngine.AG_PREFIX}${eventType}`, (args) => {
163
                 args.speakers.map((speaker) => {
247
                 args.speakers.map((speaker) => {

+ 1
- 1
lib/RtcEngine.native.js.map
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 9
- 0
lib/types.d.ts Прегледај датотеку

8
     HIDDEN = 1,
8
     HIDDEN = 1,
9
     FIT = 2
9
     FIT = 2
10
 }
10
 }
11
+/**
12
+ * AgoraUserInfo
13
+ * @property uid: number
14
+ * @property userAccount: string
15
+ */
16
+export interface AgoraUserInfo {
17
+    uid: number;
18
+    userAccount: string;
19
+}
11
 /**
20
 /**
12
  * VideoEncoderConfig details
21
  * VideoEncoderConfig details
13
  * @property width: number | The encoder video's width
22
  * @property width: number | The encoder video's width

+ 1
- 0
lib/types.js Прегледај датотеку

10
     AgoraViewMode[AgoraViewMode["HIDDEN"] = 1] = "HIDDEN";
10
     AgoraViewMode[AgoraViewMode["HIDDEN"] = 1] = "HIDDEN";
11
     AgoraViewMode[AgoraViewMode["FIT"] = 2] = "FIT";
11
     AgoraViewMode[AgoraViewMode["FIT"] = 2] = "FIT";
12
 })(AgoraViewMode = exports.AgoraViewMode || (exports.AgoraViewMode = {}));
12
 })(AgoraViewMode = exports.AgoraViewMode || (exports.AgoraViewMode = {}));
13
+;
13
 var VideoCodecProfile;
14
 var VideoCodecProfile;
14
 (function (VideoCodecProfile) {
15
 (function (VideoCodecProfile) {
15
     VideoCodecProfile[VideoCodecProfile["BASELINE"] = 66] = "BASELINE";
16
     VideoCodecProfile[VideoCodecProfile["BASELINE"] = 66] = "BASELINE";

+ 1
- 1
lib/types.js.map Прегледај датотеку

1
-{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;AAEA;;;;GAIG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,qDAAU,CAAA;IACV,+CAAO,CAAA;AACT,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAuGD,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,kEAAa,CAAA;IACb,0DAAS,CAAA;IACT,2DAAU,CAAA;AACZ,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,6DAAU,CAAA;IACV,6DAAU,CAAA;AACZ,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,qEAAkB,CAAA;IAClB,qEAAkB,CAAA;IAClB,qEAAkB,CAAA;AACpB,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B;AAED;;;GAGG;AACH,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,yDAAO,CAAA;IACP,yDAAO,CAAA;IACP,6DAAS,CAAA;IACT,2DAAQ,CAAA;IACR,2DAAQ,CAAA;AACV,CAAC,EANW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAM7B"}
1
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;AAEA;;;;GAIG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,qDAAU,CAAA;IACV,+CAAO,CAAA;AACT,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAUA,CAAC;AAuGF,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,kEAAa,CAAA;IACb,0DAAS,CAAA;IACT,2DAAU,CAAA;AACZ,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,6DAAU,CAAA;IACV,6DAAU,CAAA;AACZ,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,qEAAkB,CAAA;IAClB,qEAAkB,CAAA;IAClB,qEAAkB,CAAA;AACpB,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B;AAED;;;GAGG;AACH,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,yDAAO,CAAA;IACP,yDAAO,CAAA;IACP,6DAAS,CAAA;IACT,2DAAQ,CAAA;IACR,2DAAQ,CAAA;AACV,CAAC,EANW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAM7B"}

+ 1
- 1
package.json Прегледај датотеку

1
 {
1
 {
2
   "name": "react-native-agora",
2
   "name": "react-native-agora",
3
-  "version": "2.4.1-alpha.3",
3
+  "version": "2.8.0-alpha.1",
4
   "description": "React Native around the Agora RTC SDKs for Android and iOS agora",
4
   "description": "React Native around the Agora RTC SDKs for Android and iOS agora",
5
   "summary": "agora native sdk for react-native",
5
   "summary": "agora native sdk for react-native",
6
   "main": "lib/index.js",
6
   "main": "lib/index.js",

+ 3
- 3
react-native-agora.podspec Прегледај датотеку

18
         sp.source_files = './ios/RCTAgora/libs/AgoraRtcCryptoLoader.framework/**/*.{c,h,m,mm,S,cpp}'
18
         sp.source_files = './ios/RCTAgora/libs/AgoraRtcCryptoLoader.framework/**/*.{c,h,m,mm,S,cpp}'
19
         sp.vendored_libraries = 'libcrypto.a'
19
         sp.vendored_libraries = 'libcrypto.a'
20
     end
20
     end
21
-      
21
+
22
     s.dependency 'React'
22
     s.dependency 'React'
23
-    s.dependency "AgoraRtcEngine_iOS", "2.4.1"
24
-end
23
+    s.dependency "AgoraRtcEngine_iOS", "2.8"
24
+end

+ 87
- 0
src/RtcEngine.native.ts Прегледај датотеку

7
 import {
7
 import {
8
     Option, Callback,
8
     Option, Callback,
9
     VideoOption,
9
     VideoOption,
10
+    AgoraUserInfo,
10
     AudioMixingOption,
11
     AudioMixingOption,
11
     DataStreamOption,
12
     DataStreamOption,
12
     PlayEffectOption,
13
     PlayEffectOption,
70
         return Agora.joinChannel({channelName, uid, token, info});
71
         return Agora.joinChannel({channelName, uid, token, info});
71
     }
72
     }
72
 
73
 
74
+    /**
75
+     * Registers a user account.
76
+     * 
77
+     * Once registered, the user account can be used to identify the local user when the user joins the channel. After the user successfully registers a user account, the SDK triggers the `on("localUserRegistered", callback)` on the local client, reporting the user ID and user account of the local user.
78
+     * To join a channel with a user account, you can choose either of the following:
79
+     * Call the {@link registerLocalUserAccount} method to create a user account, and then the {@link joinChannelWithUserAccount} method to join the channel.
80
+     * Call the {@link joinChannelWithUserAccount} method to join the channel.
81
+     * 
82
+     * @note To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the uid of the user is set to the same parameter type.
83
+     * 
84
+     * @param userAccount
85
+     * @returns Promise<any>
86
+     */
87
+    public static registerLocalUserAccount(userAccount: string): Promise<any> {
88
+        return Agora.registerLocalUserAccount({userAccount});
89
+    }
90
+
91
+    /**
92
+     * Joins the channel with a user account.
93
+     * 
94
+     * After the user successfully joins the channel, the SDK triggers the following callbacks:
95
+     *
96
+     * The local client: `on("localUserRegistered", callback)` and `on("joinChannelSuccess", callback)`.
97
+     * The remote client: `on("userJoined", callback)` and `on("userInfoUpdated", callback)`, if the user joining the channel is in the Communication profile, or is a BROADCASTER in the Live Broadcast profile.
98
+     * 
99
+     * @note To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the uid of the user is set to the same parameter type.
100
+     * 
101
+     * @param channelName
102
+     * @param userAccount
103
+     * @param token
104
+     * @returns Promise<any>
105
+     */
106
+    public static joinChannelWithUserAccount(channelName: string, userAccount: string, token: string): Promise<any> {
107
+        return Agora.joinChannelWithUserAccount({channelName, userAccount, token});
108
+    }
109
+
110
+    /**
111
+     * Gets the user information by passing in the user account.
112
+     * 
113
+     * After receiving the "userInfoUpdated" callback, you can call this method to get the user ID of the remote user from the {@link AgoraUserInfo} object by passing in the userAccount.
114
+     * @param uid 
115
+     * @returns Promise<{@link AgoraUserInfo}>
116
+     */
117
+    public static async getUserInfoByUid(uid: number): Promise<AgoraUserInfo> {
118
+        if (Platform.OS === 'android') {
119
+            const _uid = this.Uint32ToInt32(uid);
120
+            let result = await Agora.getUserInfoByUid(_uid);
121
+            result.uid = this.Uint32ToInt32(result.uid);
122
+            return result;
123
+        }
124
+        return Agora.getUserInfoByUid(uid);
125
+    }
126
+
127
+    /**
128
+     * Gets the user information by passing in the user account.
129
+     * 
130
+     * After receiving the "userInfoUpdated" callback, you can call this method to get the user ID of the remote user from the {@link AgoraUserInfo} object by passing in the userAccount.
131
+     * @param userAccount 
132
+     * @returns Promise<{@link AgoraUserInfo}>
133
+     */
134
+    public static async getUserInfoByUserAccount(userAccount: string): Promise<AgoraUserInfo> {
135
+        if (Platform.OS === 'android') {
136
+            let result = await Agora.getUserInfoByUserAccount(userAccount);
137
+            result.uid = this.Uint32ToInt32(result.uid);
138
+            return result;
139
+        }
140
+        return Agora.getUserInfoByUserAccount(userAccount);
141
+    }
142
+
73
     /**
143
     /**
74
      * add event listener
144
      * add event listener
75
      *
145
      *
149
      * localVideoChanged | occurs when the local video changed  | on("localVideoChanged", evt) | 
219
      * localVideoChanged | occurs when the local video changed  | on("localVideoChanged", evt) | 
150
      * networkTypeChanged | occurs when the device network type changed | on("networkTypeChanged", evt) | 
220
      * networkTypeChanged | occurs when the device network type changed | on("networkTypeChanged", evt) | 
151
      * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) | 
221
      * mediaMetaDataReceived | occurs when you received media meta data from the remote side through sendMediaData | on("mediaMetaDataReceived", evt) | 
222
+     * localUserRegistered | occurs when you register user account success | on("localUserRegistered", evt) |
223
+     * userInfoUpdated | occurs when you peer side using user account join channel | on("userInfoUpdated", evt) |
152
      * ---
224
      * ---
153
      * 
225
      * 
154
      * @param eventType
226
      * @param eventType
178
             'remoteSubscribeFallbackToAudioOnly',
250
             'remoteSubscribeFallbackToAudioOnly',
179
             'networkQuality',
251
             'networkQuality',
180
             'streamInjectedStatus',
252
             'streamInjectedStatus',
253
+            'localUserRegistered'
181
         ].indexOf(eventType) != -1) {
254
         ].indexOf(eventType) != -1) {
182
             AgoraEventEmitter.addListener(`${RtcEngine.AG_PREFIX}${eventType}`, (args) => {
255
             AgoraEventEmitter.addListener(`${RtcEngine.AG_PREFIX}${eventType}`, (args) => {
183
                 const uint32_uid = new Uint32Array(1);
256
                 const uint32_uid = new Uint32Array(1);
195
             return;
268
             return;
196
         }
269
         }
197
 
270
 
271
+        if (['userInfoUpdated'].indexOf(eventType) != -1) {
272
+            AgoraEventEmitter.addListener(`${RtcEngine.AG_PREFIX}${eventType}`, (args) => {
273
+                const uint32_uid = new Uint32Array(1);
274
+                uint32_uid[0] = args.uid;
275
+                args.uid = uint32_uid[0];
276
+
277
+                const uint32_peer_uid = new Uint32Array(1);
278
+                uint32_peer_uid[0] = args.peer.uid;
279
+                args.peer.uid = uint32_peer_uid[0];
280
+                listener(args);
281
+            });
282
+            return;
283
+        }
284
+
198
         if (['audioVolumeIndication'].indexOf(eventType) != -1) {
285
         if (['audioVolumeIndication'].indexOf(eventType) != -1) {
199
             AgoraEventEmitter.addListener(`${RtcEngine.AG_PREFIX}${eventType}`, (args) => {
286
             AgoraEventEmitter.addListener(`${RtcEngine.AG_PREFIX}${eventType}`, (args) => {
200
                 args.speakers.map((speaker: any) => {
287
                 args.speakers.map((speaker: any) => {

+ 11
- 1
src/types.ts Прегледај датотеку

10
   FIT = 2
10
   FIT = 2
11
 }
11
 }
12
 
12
 
13
+/**
14
+ * AgoraUserInfo
15
+ * @property uid: number
16
+ * @property userAccount: string
17
+ */
18
+export interface AgoraUserInfo {
19
+  uid: number
20
+  userAccount: string
21
+};
22
+
13
 /**
23
 /**
14
  * VideoEncoderConfig details
24
  * VideoEncoderConfig details
15
  * @property width: number | The encoder video's width
25
  * @property width: number | The encoder video's width
161
   size: Size,
171
   size: Size,
162
   videoBitrate: number,
172
   videoBitrate: number,
163
   videoFramerate: number,
173
   videoFramerate: number,
164
-  lowLatency: boolean,
174
+  lowLatency: boolean, // @deprecate lowLatency
165
   videoGop: number,
175
   videoGop: number,
166
   videoCodecProfile: VideoCodecProfile,
176
   videoCodecProfile: VideoCodecProfile,
167
   audioCodecProfile: AudioCodecProfile,
177
   audioCodecProfile: AudioCodecProfile,