agora-rte-sdk 2.0.1-beta → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/lib/configs/index.d.ts +1 -9
  2. package/lib/core/decorator/lodash/index.d.ts +12 -2
  3. package/lib/core/engine/index.d.ts +2 -1
  4. package/lib/core/logger/index.d.ts +6 -6
  5. package/lib/core/processor/channel-msg/handler.d.ts +2 -0
  6. package/lib/core/rtc/adapter/base.d.ts +1 -0
  7. package/lib/core/rtc/adapter/electron/index.d.ts +9 -0
  8. package/lib/core/rtc/adapter/electron/stats.d.ts +3 -2
  9. package/lib/core/rtc/adapter/web/client.d.ts +2 -0
  10. package/lib/core/rtc/adapter/web/index.d.ts +1 -0
  11. package/lib/core/rtc/adapter/web/stats.d.ts +3 -2
  12. package/lib/core/rtc/channel.d.ts +1 -0
  13. package/lib/core/rtc/type.d.ts +16 -2
  14. package/lib/core/rtm/index.d.ts +1 -0
  15. package/lib/core/services/log.d.ts +5 -4
  16. package/lib/core/services/oss.d.ts +10 -2
  17. package/lib/core/utils/error.d.ts +3 -0
  18. package/lib/core/utils/networkutils.d.ts +9 -0
  19. package/lib/index.d.ts +2 -1
  20. package/lib/index.js +1 -1
  21. package/lib/index.js.LICENSE.txt +6 -3
  22. package/lib/index.worker.js +1 -1
  23. package/lib/scene/index.d.ts +3 -0
  24. package/lib/user/index.d.ts +5 -1
  25. package/package.json +2 -3
  26. package/lib/.DS_Store +0 -0
  27. package/lib/core/index.d.ts +0 -1
  28. package/lib/core/logger/edu-sdk-logger.d.ts +0 -15
  29. package/lib/core/logger/interfaces/index.d.ts +0 -4
  30. package/lib/core/media-service/electron/index.d.ts +0 -239
  31. package/lib/core/media-service/index.d.ts +0 -75
  32. package/lib/core/media-service/interfaces/index.d.ts +0 -318
  33. package/lib/core/media-service/renderer/index.d.ts +0 -73
  34. package/lib/core/media-service/utils.d.ts +0 -16
  35. package/lib/core/media-service/web/coordinator.d.ts +0 -55
  36. package/lib/core/media-service/web/index.d.ts +0 -157
  37. package/lib/core/rtm/constants.d.ts +0 -32
  38. package/lib/core/rtm/message-serializer.d.ts +0 -45
  39. package/lib/core/services/edu-api.d.ts +0 -178
  40. package/lib/core/services/interface.d.ts +0 -122
  41. package/lib/core/services/log-upload.d.ts +0 -22
  42. package/lib/core/services/report-service.d.ts +0 -77
  43. package/lib/core/utils/fetch.d.ts +0 -2
  44. package/lib/core/utils/generic-error.d.ts +0 -11
  45. package/lib/interfaces/index.d.ts +0 -522
  46. package/lib/manager/index.d.ts +0 -50
  47. package/lib/room/edu-classroom-data-controller.d.ts +0 -114
  48. package/lib/room/edu-classroom-manager.d.ts +0 -50
  49. package/lib/room/types.d.ts +0 -108
  50. package/lib/user/edu-user-service.d.ts +0 -98
  51. package/lib/utils/syntax.d.ts +0 -3
@@ -1,5 +1,3 @@
1
- import { AREAS } from 'agora-rtc-sdk-ng';
2
- import { RtmStatusCode } from 'agora-rtm-sdk';
3
1
  import { AGRtcConfig } from '../core/rtc/adapter';
4
2
  declare global {
5
3
  interface Window {
@@ -48,20 +46,14 @@ export declare class AgoraRteEngineConfig {
48
46
  rtcConfigs: AGRtcConfig;
49
47
  logFilePath?: string;
50
48
  static logLevel: AgoraRteLogLevel;
51
- static readonly platform: AgoraRteRuntimePlatform;
49
+ static get platform(): AgoraRteRuntimePlatform;
52
50
  userId: string;
53
51
  token: string;
54
52
  ignoreUrlRegionPrefix: boolean;
55
53
  language: RteLanguage;
56
54
  debugI18n: boolean;
57
55
  region: AgoraRegion;
58
- private _rtcRegion?;
59
- private _rtmRegion?;
60
56
  SCENE_JOIN_RETRY_ATTEMPTS: number;
61
57
  constructor(appId: string, opts?: AgoraRteOptions);
62
- get rtcRegion(): AREAS;
63
- get rtmRegion(): RtmStatusCode.AreaCode;
64
- setRtcRegion(area: AgoraComponentRegion): void;
65
- setRtmRegion(area: AgoraComponentRegion): void;
66
58
  static get version(): string;
67
59
  }
@@ -3,11 +3,21 @@ export declare const Lodash: {
3
3
  debounced: (wait?: number | undefined, options?: DebounceSettings | undefined) => (proto: any, propertyName: string, descriptor: PropertyDescriptor) => {
4
4
  configurable: boolean;
5
5
  enumerable: boolean;
6
- get(): import("lodash").DebouncedFunc<any>;
6
+ get(this: {
7
+ __cacheMap: WeakMap<Object, any>;
8
+ }): any;
9
+ set(this: {
10
+ __cacheMap: WeakMap<Object, any>;
11
+ }, v: any): void;
7
12
  };
8
13
  throttled: (wait?: number | undefined, options?: ThrottleSettings | undefined) => (proto: any, propertyName: string, descriptor: PropertyDescriptor) => {
9
14
  configurable: boolean;
10
15
  enumerable: boolean;
11
- get(): import("lodash").DebouncedFunc<any>;
16
+ get(this: {
17
+ __cacheMap: WeakMap<Object, any>;
18
+ }): any;
19
+ set(this: {
20
+ __cacheMap: WeakMap<Object, any>;
21
+ }, v: any): void;
12
22
  };
13
23
  };
@@ -3,6 +3,7 @@ import { AgoraRteEngineConfig } from '../../configs';
3
3
  import { AgoraRteScene } from '../../scene';
4
4
  import { AgoraMediaControl } from '../media/control';
5
5
  import { AgoraRteService } from '../services/api';
6
+ import { TagInfo } from '../services/oss';
6
7
  export declare class AgoraRteEngine extends AGEventEmitter {
7
8
  private _mediaControl;
8
9
  private _apiService;
@@ -21,5 +22,5 @@ export declare class AgoraRteEngine extends AGEventEmitter {
21
22
  createAgoraRteScene(sceneId: string): AgoraRteScene;
22
23
  getAgoraMediaControl(): AgoraMediaControl;
23
24
  getApiService(): AgoraRteService;
24
- uploadSDKLogToAgoraService(roomId: string): Promise<void>;
25
+ uploadSDKLogToAgoraService(tagInfo: TagInfo): Promise<void>;
25
26
  }
@@ -1,9 +1,5 @@
1
- export interface LogFileCollection {
2
- electron?: File;
3
- web?: File;
4
- clean: () => void;
5
- }
6
1
  export declare class Logger {
2
+ private _lastObjectIndex;
7
3
  thread: any;
8
4
  constructor();
9
5
  static logger: Logger;
@@ -14,5 +10,9 @@ export declare class Logger {
14
10
  private static log;
15
11
  static originConsole: Console;
16
12
  static setupConsoleHijack(): void;
17
- collectLogs(): Promise<LogFileCollection>;
13
+ collectConsoleLogs(): Promise<File>;
14
+ cleanupConsoleLogs(): Promise<void>;
15
+ private _addLocalFolderAsync;
16
+ private _readFile;
17
+ collectElectronLogs(logBasePath: string, logFolderPath: string): Promise<File>;
18
18
  }
@@ -10,6 +10,7 @@ export declare enum AgoraRteChannelMessageCmd {
10
10
  UserInfo = 21,
11
11
  UserProperty = 22,
12
12
  UserProperties = 23,
13
+ UserSubscribeInOut = 24,
13
14
  StreamInOut = 40,
14
15
  StreamsInOut = 41,
15
16
  MessageExtension = 99
@@ -67,6 +68,7 @@ export declare class AgoraRteChannelMessageHandle extends AGEventEmitter {
67
68
  private _handleChat;
68
69
  private _mergeProperties;
69
70
  private _handleRoomProperties;
71
+ private _handleUserSubscribe;
70
72
  private _handleUserInOut;
71
73
  private _handleUserInfo;
72
74
  private _handleUserProperty;
@@ -26,6 +26,7 @@ export declare abstract class RtcAudioDeviceManagerBase extends AGEventEmitter {
26
26
  }
27
27
  export declare abstract class RtcChannelAdapterBase extends AGEventEmitter {
28
28
  abstract join(token: string, streamUuid: string, connectionType: AGRtcConnectionType): Promise<void>;
29
+ abstract getSessionId(): string;
29
30
  abstract leave(connectionType?: AGRtcConnectionType): Promise<void>;
30
31
  abstract muteLocalVideo(mute: boolean, connectionType: AGRtcConnectionType): number;
31
32
  abstract muteLocalAudio(mute: boolean, connectionType: AGRtcConnectionType): number;
@@ -26,6 +26,9 @@ export declare class RtcAdapterElectron extends RtcAdapterBase {
26
26
  cameraThread: AgoraRteElectronCameraThread;
27
27
  private _localVideoEnabled;
28
28
  private _localAudioEnabled;
29
+ static get remote(): any;
30
+ screenShareId?: string;
31
+ screenShareType?: AGScreenShareType;
29
32
  get configs(): {};
30
33
  get rtcEngine(): AgoraRtcEngine;
31
34
  constructor();
@@ -57,6 +60,10 @@ export declare class RtcAdapterElectron extends RtcAdapterBase {
57
60
  hasScreenSharePermission(): boolean;
58
61
  destroy(): number;
59
62
  static getRtcVersion(): string;
63
+ static get logBasePath(): any;
64
+ static get logFolderPath(): any;
65
+ static get logPath(): any;
66
+ private get _region();
60
67
  private _addEventListeners;
61
68
  private updateRole;
62
69
  }
@@ -67,6 +74,7 @@ export declare class RtcChannelAdapterElectron extends RtcChannelAdapterBase {
67
74
  private _networkStats;
68
75
  private get _channelProfile();
69
76
  constructor(channelName: string, configs: RtcAdapterElectronConfig, base: RtcAdapterBase);
77
+ getSessionId(): string;
70
78
  onConnectionStateChanged(cb: (state: RtcState, connectionType: AGRtcConnectionType) => void): number;
71
79
  leave(connectionType?: AGRtcConnectionType): Promise<void>;
72
80
  setChannelProfile(profile: ChannelProfile): number;
@@ -75,6 +83,7 @@ export declare class RtcChannelAdapterElectron extends RtcChannelAdapterBase {
75
83
  onAudioVolumeIndication(cb: (volumes: Map<string, number>) => void): number;
76
84
  muteRemoteVideo(streamUuid: string, mute: boolean): number;
77
85
  muteRemoteAudio(streamUuid: string, mute: boolean): number;
86
+ private _startScreenCapture;
78
87
  join(token: string, streamUuid: string, connectionType: AGRtcConnectionType): Promise<void>;
79
88
  muteLocalVideo(mute: boolean, connectionType: AGRtcConnectionType): number;
80
89
  muteLocalAudio(mute: boolean, connectionType: AGRtcConnectionType): number;
@@ -1,5 +1,5 @@
1
1
  import type { AgoraNetworkQuality } from 'agora-electron-sdk/types/Api/native_type';
2
- import { AGNetworkQuality, NetworkStats } from '../../type';
2
+ import { NetworkStats } from '../../type';
3
3
  export declare class RtcNetworkQualityElectron {
4
4
  rtt?: number;
5
5
  downlinkNetworkQuality: AgoraNetworkQuality;
@@ -9,6 +9,7 @@ export declare class RtcNetworkQualityElectron {
9
9
  rxVideoPacketLoss: number;
10
10
  cpu: number;
11
11
  cpuTotal: number;
12
- toAGQuality(electronQuality?: AgoraNetworkQuality): AGNetworkQuality;
12
+ private _downlinkNetworkQualityClacInstance;
13
+ private _uplinkNetworkQualityClacInstance;
13
14
  networkStats(): NetworkStats;
14
15
  }
@@ -21,11 +21,13 @@ export declare class AgoraRteWebClientBase extends AGEventEmitter {
21
21
  constructor(channelName: string, configs: RtcAdapterWebConfig, base: RtcAdapterBase, connectionType: AGRtcConnectionType);
22
22
  get ready(): boolean;
23
23
  protected setConnectionState(state: RtcState): void;
24
+ getClientSessionId(): any;
24
25
  join(appId: string, token: string, streamUuid: string): Promise<void>;
25
26
  leave(): Promise<void>;
26
27
  muteLocalVideo(mute: boolean): number;
27
28
  muteLocalAudio(mute: boolean): number;
28
29
  muteLocalScreenShare(mute: boolean): number;
30
+ private _rtcRegion;
29
31
  private _getRtcState;
30
32
  private _getEncryptionMode;
31
33
  }
@@ -62,6 +62,7 @@ export declare class RtcChannelAdapterWeb extends RtcChannelAdapterBase {
62
62
  readonly sub: AgoraRteWebClientSub;
63
63
  channelName: string;
64
64
  constructor(channelName: string, configs: RtcAdapterWebConfig, base: RtcAdapterBase);
65
+ getSessionId(): any;
65
66
  private client;
66
67
  join(token: string, streamUuid: string, connectionType: AGRtcConnectionType): Promise<void>;
67
68
  leave(connectionType?: AGRtcConnectionType): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { AGNetworkQuality, NetworkStats } from '../../type';
1
+ import { NetworkStats } from '../../type';
2
2
  export declare class RtcNetworkQualityWeb {
3
3
  rtt?: number;
4
4
  downlinkNetworkQuality: number;
@@ -6,6 +6,7 @@ export declare class RtcNetworkQualityWeb {
6
6
  end2EndDelay: number;
7
7
  txVideoPacketLoss: number;
8
8
  rxVideoPacketLoss: number;
9
- toAGQuality(webquality?: number): AGNetworkQuality;
9
+ private _downlinkNetworkQualityClacInstance;
10
+ private _uplinkNetworkQualityClacInstance;
10
11
  networkStats(): NetworkStats;
11
12
  }
@@ -10,6 +10,7 @@ export declare class AGRtcChannel {
10
10
  private _adapter;
11
11
  constructor(channelName: string, adapter: RtcChannelAdapterBase);
12
12
  private connectionType;
13
+ getRtcSid(): string;
13
14
  join(token: string, streamUuid: string, connectionType?: AGRtcConnectionType): Promise<void>;
14
15
  leave(connectionType?: AGRtcConnectionType): Promise<void>;
15
16
  setClientRole(role: ClientRole): number;
@@ -3,7 +3,8 @@ export declare enum AGNetworkQuality {
3
3
  bad = 1,
4
4
  poor = 2,
5
5
  good = 3,
6
- great = 4
6
+ great = 4,
7
+ down = 5
7
8
  }
8
9
  export declare enum AGRteTrackErrorReason {
9
10
  Unknown = 0,
@@ -11,15 +12,28 @@ export declare enum AGRteTrackErrorReason {
11
12
  }
12
13
  export interface NetworkStats {
13
14
  packetLoss?: number;
14
- networkQuality?: AGNetworkQuality;
15
+ downlinkNetworkQuality?: AGNetworkQuality;
16
+ uplinkNetworkQuality?: AGNetworkQuality;
15
17
  cpu?: number;
16
18
  cpuTotal?: number;
17
19
  delay?: number;
18
20
  }
19
21
  export declare enum AgoraRteMediaSourceState {
22
+ /**
23
+ * 设备停止采集
24
+ */
20
25
  stopped = 0,
26
+ /**
27
+ * 设备开启中
28
+ */
21
29
  starting = 2,
30
+ /**
31
+ * 设备已开启
32
+ */
22
33
  started = 1,
34
+ /**
35
+ * 设备错误
36
+ */
23
37
  error = -1
24
38
  }
25
39
  export declare enum RtcState {
@@ -26,6 +26,7 @@ export declare class AGRtmManager extends EventEmitter {
26
26
  track: boolean;
27
27
  debug: boolean;
28
28
  };
29
+ private get _region();
29
30
  login(token: string, uid: string, configs: AGRtmManagerInitConfig): Promise<void>;
30
31
  createObserverChannel(channelName: string): [RtmChannel, EventEmitter];
31
32
  join(channel: RtmChannel, bus: EventEmitter, channelName: string): Promise<void>;
@@ -1,7 +1,8 @@
1
1
  import { ApiBase } from './base';
2
+ import { TagInfo } from './oss';
2
3
  export declare class AgoraLogService extends ApiBase {
3
- uploadZipLogFile(roomId: string, file: any): Promise<void>;
4
- uploadLogFile(roomId: string, file: any): Promise<void>;
5
- uploadToOss(roomId: string, file: File, ext: string): Promise<void>;
6
- uploadElectronLog(roomId: any): Promise<void>;
4
+ uploadZipLogFile(tagInfo: TagInfo, file: any): Promise<void>;
5
+ uploadLogFile(tagInfo: TagInfo, file: any): Promise<void>;
6
+ uploadToOss(tagInfo: TagInfo, file: File, ext: string): Promise<void>;
7
+ uploadElectronLog(tagInfo: TagInfo): Promise<void>;
7
8
  }
@@ -1,7 +1,15 @@
1
+ export declare type TagInfo = {
2
+ roomUuid: string;
3
+ roomName: string;
4
+ roomType: number;
5
+ userUuid: string;
6
+ userName: string;
7
+ role: number;
8
+ };
1
9
  export declare class OSSFileUploader {
2
10
  private _appId;
3
- private _roomId;
11
+ private _tagInfo;
4
12
  private _adapter;
5
- constructor(_appId: string, _roomId: string);
13
+ constructor(_appId: string, _tagInfo: TagInfo);
6
14
  upload(file: File, ext: string): Promise<void>;
7
15
  }
@@ -35,6 +35,9 @@ export declare enum AGRteErrorCode {
35
35
  RTE_ERR_SCENE_ALREADY_JOINED = "100012",
36
36
  RTE_ERR_ENGINE_NOT_READY = "100013",
37
37
  RTE_ERR_CONFIG_NOT_READY = "100014",
38
+ RTE_ERR_RESTFUL_NETWORK_ERR = "100015",
39
+ RTE_ERR_RESTFUL_NETWORK_TIMEOUT_ERR = "100016",
40
+ RTE_ERR_LOCAL_USER_NOT_EXIST = "100017",
38
41
  RTM_ERR_LOGGED_IN_ALREADY = "200000",
39
42
  RTM_ERR_JOIN_FAILED = "200001",
40
43
  RTM_ERR_LEAVE_FAILED = "200002",
@@ -0,0 +1,9 @@
1
+ import { AGNetworkQuality } from '../..';
2
+ export declare class QualityCalc {
3
+ private quality;
4
+ private qualities;
5
+ static MAX_QUALITY_NUMBER: number;
6
+ private _updateQualities;
7
+ private _resetQualities;
8
+ toAGQuality(webquality?: number): AGNetworkQuality;
9
+ }
package/lib/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export { AgoraRteEngine } from './core/engine';
2
2
  export { AgoraRteScene } from './scene';
3
3
  export type { AgoraRteSceneJoinRTCOptions } from './scene';
4
4
  export { AgoraRteEngineConfig, AgoraRteLogLevel, AgoraRteRuntimePlatform, RteLanguage, AgoraRegion, } from './configs';
5
+ export type { AgoraRteOptions } from './configs';
5
6
  export type { AgoraComponentRegion } from './configs';
6
7
  export type { AgoraRteServiceConfig } from './configs';
7
8
  export { AgoraRtcVideoCanvas, AgoraRtcLocalVideoCanvas } from './core/rtc/canvas';
@@ -11,7 +12,7 @@ export type { AgoraRteOperator } from './core/processor/channel-msg/struct';
11
12
  export { AGRtcConnectionType } from './core/rtc/channel';
12
13
  export { ApiBase } from './core/services/base';
13
14
  export { Logger } from './core/logger';
14
- export { AbstractErrorCenter, AGError, AGErrorWrapper } from './core/utils/error';
15
+ export { AbstractErrorCenter, AGError, AGErrorWrapper, AGRteErrorCode } from './core/utils/error';
15
16
  export { retryAttempt } from './core/utils/utils';
16
17
  export { Log, Lodash, bound } from './core/decorator';
17
18
  export type { Injectable } from './core/decorator';