agora-rte-sdk 3.4.102 → 3.5.0

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 (85) hide show
  1. package/lib/core/engine/ap-detector.d.ts +19 -17
  2. package/lib/core/engine/ap-detector.js +298 -180
  3. package/lib/core/engine/index.js +18 -8
  4. package/lib/core/engine/plugin.js +0 -1
  5. package/lib/core/media/index.d.ts +11 -10
  6. package/lib/core/media/index.js +14 -15
  7. package/lib/core/media/screen.js +1 -2
  8. package/lib/core/media/type.js +12 -0
  9. package/lib/core/monitor/type.d.ts +2 -0
  10. package/lib/core/processor/message-handler.js +12 -37
  11. package/lib/core/processor/sequence-msg/data.js +0 -1
  12. package/lib/core/processor/sequence-msg/synchronizer.js +8 -8
  13. package/lib/core/processor/struct.js +2 -2
  14. package/lib/core/processor/type.d.ts +1 -1
  15. package/lib/core/rtc/canvas.d.ts +16 -3
  16. package/lib/core/rtc/canvas.js +10 -1
  17. package/lib/core/rtc/client.d.ts +10 -0
  18. package/lib/core/rtc/source-manager.d.ts +1 -2
  19. package/lib/core/rtc/type.d.ts +10 -2
  20. package/lib/core/rtc/type.js +24 -1
  21. package/lib/core/rtm/client.d.ts +5 -0
  22. package/lib/core/rtm/type.d.ts +5 -5
  23. package/lib/core/rtm/type.js +5 -5
  24. package/lib/core/scene/helper.d.ts +1 -2
  25. package/lib/core/scene/helper.js +1 -16
  26. package/lib/core/scene/index.d.ts +18 -12
  27. package/lib/core/scene/index.js +494 -367
  28. package/lib/core/scene/local-user.js +1 -4
  29. package/lib/core/scene/state-sync.d.ts +7 -14
  30. package/lib/core/scene/state-sync.js +30 -52
  31. package/lib/core/scene/type.d.ts +8 -1
  32. package/lib/core/scene/type.js +13 -3
  33. package/lib/core/services/api.d.ts +1 -0
  34. package/lib/core/services/api.js +3 -4
  35. package/lib/core/services/auth-headers.js +0 -2
  36. package/lib/core/services/type.d.ts +1 -0
  37. package/lib/core/utilities/color.d.ts +1 -0
  38. package/lib/core/utilities/color.js +23 -0
  39. package/lib/core/utilities/error.js +6 -6
  40. package/lib/core/utilities/parameters.d.ts +1 -0
  41. package/lib/core/utilities/parameters.js +7 -1
  42. package/lib/imports.d.ts +7 -4
  43. package/lib/imports.js +22 -6
  44. package/lib/plugin/monitor/index.js +87 -50
  45. package/lib/plugin/monitor/log-upload/handler.js +0 -2
  46. package/lib/plugin/monitor/type.d.ts +2 -0
  47. package/lib/plugin/restful-client/index.d.ts +3 -2
  48. package/lib/plugin/restful-client/index.js +95 -102
  49. package/lib/plugin/rtc/electron/canvas-helper.d.ts +11 -4
  50. package/lib/plugin/rtc/electron/canvas-helper.js +111 -5
  51. package/lib/plugin/rtc/electron/capture-enhancement.js +0 -1
  52. package/lib/plugin/rtc/electron/channel.d.ts +9 -3
  53. package/lib/plugin/rtc/electron/channel.js +86 -62
  54. package/lib/plugin/rtc/electron/client.d.ts +2 -3
  55. package/lib/plugin/rtc/electron/client.js +31 -123
  56. package/lib/plugin/rtc/electron/dowloadALD.js +0 -2
  57. package/lib/plugin/rtc/electron/parameters.js +30 -3
  58. package/lib/plugin/rtc/electron/publish-pool.js +0 -2
  59. package/lib/plugin/rtc/electron/publisher.d.ts +1 -0
  60. package/lib/plugin/rtc/electron/publisher.js +9 -1
  61. package/lib/plugin/rtc/electron/source-manager.js +1 -5
  62. package/lib/plugin/rtc/electron/utils.d.ts +7 -2
  63. package/lib/plugin/rtc/electron/utils.js +100 -2
  64. package/lib/plugin/rtc/web/assembler.js +0 -2
  65. package/lib/plugin/rtc/web/canvas-helper.d.ts +7 -2
  66. package/lib/plugin/rtc/web/canvas-helper.js +22 -1
  67. package/lib/plugin/rtc/web/channel.js +38 -14
  68. package/lib/plugin/rtc/web/client.d.ts +2 -0
  69. package/lib/plugin/rtc/web/client.js +20 -17
  70. package/lib/plugin/rtc/web/device.d.ts +1 -2
  71. package/lib/plugin/rtc/web/device.js +2 -7
  72. package/lib/plugin/rtc/web/effect-enabler.js +0 -1
  73. package/lib/plugin/rtc/web/publish.js +0 -3
  74. package/lib/plugin/rtc/web/publisher.d.ts +4 -2
  75. package/lib/plugin/rtc/web/publisher.js +83 -8
  76. package/lib/plugin/rtc/web/subscribe.d.ts +3 -2
  77. package/lib/plugin/rtc/web/subscribe.js +67 -94
  78. package/lib/plugin/rtc/web/track-control/camera.js +10 -12
  79. package/lib/plugin/rtc/web/track-control/screen.js +13 -19
  80. package/lib/plugin/rtm/channel.js +1 -1
  81. package/lib/plugin/rtm/client.d.ts +3 -0
  82. package/lib/plugin/rtm/client.js +51 -6
  83. package/lib/type.d.ts +15 -2
  84. package/lib/type.js +23 -3
  85. package/package.json +6 -6
@@ -1,7 +1,6 @@
1
1
  import { AgoraRteError } from '../utilities/error';
2
2
  export interface AgoraRtcAccessPointConfig {
3
3
  serverList: string[];
4
- verifyDomainName?: string;
5
4
  }
6
5
  export interface AgoraWebRtcAccessPointConfig extends AgoraRtcAccessPointConfig {
7
6
  serverDomain?: string;
@@ -20,17 +19,13 @@ export interface AgoraWebRtcAccessPointConfig extends AgoraRtcAccessPointConfig
20
19
  };
21
20
  }
22
21
  export interface AgoraElectronRtcAccessPointConfig extends AgoraRtcAccessPointConfig {
23
- verifyDomainName: string;
22
+ verifyDomainName?: string;
24
23
  }
25
24
  export interface AgoraRteApDetectorObserver {
26
25
  onDetectionSuccess?(): void;
27
26
  onDetectionFailure?(): void;
28
27
  }
29
28
  export interface AgoraRteApDetector {
30
- readonly finished: boolean;
31
- _internalRtcConfig: AgoraRtcAccessPointConfig | undefined;
32
- _externalRtcConfig: AgoraRtcAccessPointConfig | undefined;
33
- init(internalRtcConfig: AgoraRtcAccessPointConfig | undefined, externalRtcConfig: AgoraRtcAccessPointConfig | undefined): void;
34
29
  /**
35
30
  * 是否需要探测
36
31
  */
@@ -60,26 +55,33 @@ export interface AgoraRteApDetector {
60
55
  */
61
56
  removeObserver(observer: AgoraRteApDetectorObserver): AgoraRteError | void;
62
57
  }
58
+ export declare const isIP: (ip: string) => boolean;
59
+ export declare const isDomainName: (str: string) => boolean;
60
+ export declare const transformUrlToRequestUrl: (url: string, isElectron: boolean) => string;
63
61
  export declare class AgoraRteApDetectorImpl implements AgoraRteApDetector {
64
- finished: boolean;
65
- _internalRtcConfig: AgoraRtcAccessPointConfig | undefined;
66
- _externalRtcConfig: AgoraRtcAccessPointConfig | undefined;
67
- private detectWorkMap;
62
+ protected logger: import("agora-foundation/lib/logger/type").Logger;
63
+ private _apDetectTimeout;
64
+ private _minCount;
65
+ private _internalRtcConfig?;
66
+ private _externalRtcConfig?;
68
67
  private _apDetectorObserver;
69
68
  private _rawObjGroups;
70
- constructor(internalRtcConfig: AgoraRtcAccessPointConfig | undefined, externalRtcConfig: AgoraRtcAccessPointConfig | undefined);
71
- init(internalRtcConfig: AgoraRtcAccessPointConfig | undefined, externalRtcConfig: AgoraRtcAccessPointConfig | undefined): void;
69
+ private _detectWorkMap;
70
+ private _availableRtcAccessPointConfig;
72
71
  get hasDetectingTask(): boolean;
73
- private _getDetectWorkMapRawVal;
74
- private _transformUrlToRequestUrl;
75
- private _fetchWithTimeoutAndCheck;
76
- private _runTasksWithConcurrency;
72
+ finished: boolean;
73
+ constructor(internalRtcConfig: AgoraRtcAccessPointConfig, externalRtcConfig: AgoraRtcAccessPointConfig, detectTimeout?: number);
77
74
  start(): void;
78
- private _checkResultAndNotifyResult;
79
75
  isDetectRequired(): boolean;
80
76
  stop(): void;
81
77
  isFinished(): boolean;
82
78
  getAvailableRtcAccessPointConfig(): AgoraRtcAccessPointConfig | null;
83
79
  addObserver(observer: AgoraRteApDetectorObserver): AgoraRteError | void;
84
80
  removeObserver(observer: AgoraRteApDetectorObserver): AgoraRteError | void;
81
+ private _getDetectWorkMapRawVal;
82
+ private _fetchWithTimeoutAndCheck;
83
+ private _runTasksWithConcurrency;
84
+ private _checkResultAndNotifyResult;
85
+ private _init;
86
+ private _runDetectTask;
85
87
  }