agora-electron-sdk 4.2.6 → 4.3.0-dev.1

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 (172) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/js/Private/AgoraBase.js +139 -174
  3. package/js/Private/AgoraMediaBase.js +49 -20
  4. package/js/Private/AgoraMediaPlayerTypes.js +32 -23
  5. package/js/Private/IAgoraH265Transcoder.js +39 -0
  6. package/js/Private/IAgoraMediaStreamingSource.js +32 -32
  7. package/js/Private/IAgoraMusicContentCenter.js +19 -19
  8. package/js/Private/IAgoraRhythmPlayer.js +9 -9
  9. package/js/Private/IAgoraRtcEngine.js +12 -12
  10. package/js/Private/IAgoraSpatialAudio.js +3 -31
  11. package/js/Private/extension/IAgoraH265TranscoderExtension.js +2 -0
  12. package/js/Private/impl/AgoraMediaBaseImpl.js +26 -2
  13. package/js/Private/impl/IAgoraH265TranscoderImpl.js +119 -0
  14. package/js/Private/impl/IAgoraMediaEngineImpl.js +13 -13
  15. package/js/Private/impl/IAgoraMediaPlayerImpl.js +92 -74
  16. package/js/Private/impl/IAgoraMediaPlayerSourceImpl.js +12 -2
  17. package/js/Private/impl/IAgoraMediaRecorderImpl.js +2 -2
  18. package/js/Private/impl/IAgoraMusicContentCenterImpl.js +20 -20
  19. package/js/Private/impl/IAgoraRtcEngineExImpl.js +66 -84
  20. package/js/Private/impl/IAgoraRtcEngineImpl.js +456 -440
  21. package/js/Private/impl/IAgoraSpatialAudioImpl.js +157 -181
  22. package/js/Private/impl/IAudioDeviceManagerImpl.js +22 -22
  23. package/js/Private/internal/AgoraH265TranscoderInternal.js +86 -0
  24. package/js/Private/internal/AgoraMediaBaseInternal.js +34 -0
  25. package/js/Private/internal/IrisApiEngine.js +35 -20
  26. package/js/Private/internal/LocalSpatialAudioEngineInternal.js +0 -39
  27. package/js/Private/internal/MediaPlayerInternal.js +22 -21
  28. package/js/Private/internal/MusicContentCenterInternal.js +1 -4
  29. package/js/Private/internal/RtcEngineExInternal.js +101 -134
  30. package/js/Private/ti/AgoraMediaBase-ti.js +1 -1
  31. package/js/Private/ti/IAgoraH265Transcoder-ti.js +40 -0
  32. package/js/Private/ti/IAgoraMediaPlayerSource-ti.js +4 -2
  33. package/js/Private/ti/IAgoraMusicContentCenter-ti.js +5 -5
  34. package/js/Private/ti/IAgoraRtcEngine-ti.js +12 -11
  35. package/js/Renderer/AgoraView.js +28 -14
  36. package/js/Renderer/IRenderer.js +65 -17
  37. package/js/Renderer/IRendererManager.js +230 -0
  38. package/js/Renderer/RendererCache.js +170 -0
  39. package/js/Renderer/RendererManager.js +49 -460
  40. package/js/Renderer/WebGLRenderer/index.js +82 -234
  41. package/js/Renderer/YUVCanvasRenderer/index.js +27 -147
  42. package/js/Types.js +6 -6
  43. package/js/Utils.js +37 -88
  44. package/package.json +4 -3
  45. package/scripts/clean.js +12 -0
  46. package/scripts/synclib.js +8 -2
  47. package/ts/Private/AgoraBase.ts +225 -201
  48. package/ts/Private/AgoraMediaBase.ts +63 -25
  49. package/ts/Private/AgoraMediaPlayerTypes.ts +67 -24
  50. package/ts/Private/IAgoraH265Transcoder.ts +73 -0
  51. package/ts/Private/IAgoraLog.ts +1 -0
  52. package/ts/Private/IAgoraMediaEngine.ts +12 -7
  53. package/ts/Private/IAgoraMediaPlayer.ts +47 -21
  54. package/ts/Private/IAgoraMediaPlayerSource.ts +27 -6
  55. package/ts/Private/IAgoraMediaStreamingSource.ts +38 -37
  56. package/ts/Private/IAgoraMusicContentCenter.ts +20 -20
  57. package/ts/Private/IAgoraRhythmPlayer.ts +7 -6
  58. package/ts/Private/IAgoraRtcEngine.ts +407 -364
  59. package/ts/Private/IAgoraRtcEngineEx.ts +25 -61
  60. package/ts/Private/IAgoraSpatialAudio.ts +80 -191
  61. package/ts/Private/IAudioDeviceManager.ts +27 -14
  62. package/ts/Private/extension/IAgoraH265TranscoderExtension.ts +39 -0
  63. package/ts/Private/impl/AgoraMediaBaseImpl.ts +25 -1
  64. package/ts/Private/impl/IAgoraH265TranscoderImpl.ts +152 -0
  65. package/ts/Private/impl/IAgoraMediaEngineImpl.ts +13 -13
  66. package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +110 -81
  67. package/ts/Private/impl/IAgoraMediaPlayerSourceImpl.ts +17 -2
  68. package/ts/Private/impl/IAgoraMediaRecorderImpl.ts +2 -2
  69. package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +21 -21
  70. package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +71 -106
  71. package/ts/Private/impl/IAgoraRtcEngineImpl.ts +589 -572
  72. package/ts/Private/impl/IAgoraSpatialAudioImpl.ts +211 -218
  73. package/ts/Private/impl/IAudioDeviceManagerImpl.ts +22 -22
  74. package/ts/Private/internal/AgoraH265TranscoderInternal.ts +97 -0
  75. package/ts/Private/internal/AgoraMediaBaseInternal.ts +15 -0
  76. package/ts/Private/internal/IrisApiEngine.ts +42 -27
  77. package/ts/Private/internal/LocalSpatialAudioEngineInternal.ts +1 -86
  78. package/ts/Private/internal/MediaPlayerInternal.ts +20 -29
  79. package/ts/Private/internal/MusicContentCenterInternal.ts +1 -5
  80. package/ts/Private/internal/RtcEngineExInternal.ts +91 -204
  81. package/ts/Private/ti/AgoraMediaBase-ti.ts +1 -1
  82. package/ts/Private/ti/IAgoraH265Transcoder-ti.ts +16 -0
  83. package/ts/Private/ti/IAgoraMediaPlayerSource-ti.ts +4 -2
  84. package/ts/Private/ti/IAgoraMusicContentCenter-ti.ts +5 -5
  85. package/ts/Private/ti/IAgoraRtcEngine-ti.ts +12 -11
  86. package/ts/Renderer/AgoraView.ts +29 -19
  87. package/ts/Renderer/IRenderer.ts +71 -22
  88. package/ts/Renderer/IRendererManager.ts +273 -19
  89. package/ts/Renderer/RendererCache.ts +167 -0
  90. package/ts/Renderer/RendererManager.ts +62 -607
  91. package/ts/Renderer/WebGLRenderer/index.ts +117 -295
  92. package/ts/Renderer/YUVCanvasRenderer/index.ts +45 -198
  93. package/ts/Types.ts +17 -194
  94. package/ts/Utils.ts +36 -100
  95. package/types/Private/AgoraBase.d.ts +219 -200
  96. package/types/Private/AgoraBase.d.ts.map +1 -1
  97. package/types/Private/AgoraMediaBase.d.ts +63 -27
  98. package/types/Private/AgoraMediaBase.d.ts.map +1 -1
  99. package/types/Private/AgoraMediaPlayerTypes.d.ts +65 -24
  100. package/types/Private/AgoraMediaPlayerTypes.d.ts.map +1 -1
  101. package/types/Private/IAgoraH265Transcoder.d.ts +28 -0
  102. package/types/Private/IAgoraH265Transcoder.d.ts.map +1 -0
  103. package/types/Private/IAgoraLog.d.ts.map +1 -1
  104. package/types/Private/IAgoraMediaEngine.d.ts +11 -6
  105. package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
  106. package/types/Private/IAgoraMediaPlayer.d.ts +42 -20
  107. package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
  108. package/types/Private/IAgoraMediaPlayerSource.d.ts +23 -6
  109. package/types/Private/IAgoraMediaPlayerSource.d.ts.map +1 -1
  110. package/types/Private/IAgoraMediaStreamingSource.d.ts.map +1 -1
  111. package/types/Private/IAgoraMusicContentCenter.d.ts +19 -19
  112. package/types/Private/IAgoraMusicContentCenter.d.ts.map +1 -1
  113. package/types/Private/IAgoraRhythmPlayer.d.ts +6 -6
  114. package/types/Private/IAgoraRhythmPlayer.d.ts.map +1 -1
  115. package/types/Private/IAgoraRtcEngine.d.ts +329 -293
  116. package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
  117. package/types/Private/IAgoraRtcEngineEx.d.ts +21 -53
  118. package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
  119. package/types/Private/IAgoraSpatialAudio.d.ts +56 -167
  120. package/types/Private/IAgoraSpatialAudio.d.ts.map +1 -1
  121. package/types/Private/IAudioDeviceManager.d.ts +27 -14
  122. package/types/Private/IAudioDeviceManager.d.ts.map +1 -1
  123. package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts +24 -0
  124. package/types/Private/extension/IAgoraH265TranscoderExtension.d.ts.map +1 -0
  125. package/types/Private/impl/AgoraMediaBaseImpl.d.ts +5 -1
  126. package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -1
  127. package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts +15 -0
  128. package/types/Private/impl/IAgoraH265TranscoderImpl.d.ts.map +1 -0
  129. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts +6 -4
  130. package/types/Private/impl/IAgoraMediaPlayerImpl.d.ts.map +1 -1
  131. package/types/Private/impl/IAgoraMediaPlayerSourceImpl.d.ts.map +1 -1
  132. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +2 -4
  133. package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -1
  134. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +30 -25
  135. package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
  136. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts +20 -22
  137. package/types/Private/impl/IAgoraSpatialAudioImpl.d.ts.map +1 -1
  138. package/types/Private/internal/AgoraH265TranscoderInternal.d.ts +14 -0
  139. package/types/Private/internal/AgoraH265TranscoderInternal.d.ts.map +1 -0
  140. package/types/Private/internal/AgoraMediaBaseInternal.d.ts +8 -0
  141. package/types/Private/internal/AgoraMediaBaseInternal.d.ts.map +1 -0
  142. package/types/Private/internal/IrisApiEngine.d.ts +5 -2
  143. package/types/Private/internal/IrisApiEngine.d.ts.map +1 -1
  144. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts +0 -15
  145. package/types/Private/internal/LocalSpatialAudioEngineInternal.d.ts.map +1 -1
  146. package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -1
  147. package/types/Private/internal/MusicContentCenterInternal.d.ts +0 -1
  148. package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -1
  149. package/types/Private/internal/RtcEngineExInternal.d.ts +7 -13
  150. package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
  151. package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts +8 -0
  152. package/types/Private/ti/IAgoraH265Transcoder-ti.d.ts.map +1 -0
  153. package/types/Private/ti/IAgoraMediaPlayerSource-ti.d.ts.map +1 -1
  154. package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -1
  155. package/types/Renderer/AgoraView.d.ts +4 -4
  156. package/types/Renderer/AgoraView.d.ts.map +1 -1
  157. package/types/Renderer/IRenderer.d.ts +11 -9
  158. package/types/Renderer/IRenderer.d.ts.map +1 -1
  159. package/types/Renderer/IRendererManager.d.ts +50 -12
  160. package/types/Renderer/IRendererManager.d.ts.map +1 -1
  161. package/types/Renderer/RendererCache.d.ts +36 -0
  162. package/types/Renderer/RendererCache.d.ts.map +1 -0
  163. package/types/Renderer/RendererManager.d.ts +13 -139
  164. package/types/Renderer/RendererManager.d.ts.map +1 -1
  165. package/types/Renderer/WebGLRenderer/index.d.ts +3 -18
  166. package/types/Renderer/WebGLRenderer/index.d.ts.map +1 -1
  167. package/types/Renderer/YUVCanvasRenderer/index.d.ts +4 -10
  168. package/types/Renderer/YUVCanvasRenderer/index.d.ts.map +1 -1
  169. package/types/Types.d.ts +11 -187
  170. package/types/Types.d.ts.map +1 -1
  171. package/types/Utils.d.ts +3 -20
  172. package/types/Utils.d.ts.map +1 -1
@@ -134,7 +134,7 @@ export abstract class IMediaPlayer {
134
134
  *
135
135
  * @returns
136
136
  * Returns the current playback progress (ms) if the call succeeds.
137
- * < 0: Failure. See MediaPlayerError.
137
+ * < 0: Failure. See MediaPlayerReason.
138
138
  */
139
139
  abstract getPlayPosition(): number;
140
140
 
@@ -145,7 +145,7 @@ export abstract class IMediaPlayer {
145
145
  *
146
146
  * @returns
147
147
  * The number of the media streams in the media resource if the method call succeeds.
148
- * < 0: Failure. See MediaPlayerError.
148
+ * < 0: Failure. See MediaPlayerReason.
149
149
  */
150
150
  abstract getStreamCount(): number;
151
151
 
@@ -154,11 +154,11 @@ export abstract class IMediaPlayer {
154
154
  *
155
155
  * Call this method after calling getStreamCount.
156
156
  *
157
- * @param index The index of the media stream.
157
+ * @param index The index of the media stream. This parameter must be less than the return value of getStreamCount.
158
158
  *
159
159
  * @returns
160
160
  * If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo.
161
- * If the call fails, returns NULL.
161
+ * If the call fails, returns null.
162
162
  */
163
163
  abstract getStreamInfo(index: number): PlayerStreamInfo;
164
164
 
@@ -207,12 +207,10 @@ export abstract class IMediaPlayer {
207
207
  /**
208
208
  * @ignore
209
209
  */
210
- abstract setPlayerOptionInInt(key: string, value: number): number;
211
-
212
- /**
213
- * @ignore
214
- */
215
- abstract setPlayerOptionInString(key: string, value: string): number;
210
+ abstract selectMultiAudioTrack(
211
+ playoutTrackIndex: number,
212
+ publishTrackIndex: number
213
+ ): number;
216
214
 
217
215
  /**
218
216
  * @ignore
@@ -558,6 +556,34 @@ export abstract class IMediaPlayer {
558
556
  * @ignore
559
557
  */
560
558
  abstract setSoundPositionParams(pan: number, gain: number): number;
559
+
560
+ /**
561
+ * Set media player options for providing technical previews or special customization features.
562
+ *
563
+ * The media player supports setting options through key and value. In general, you don't need to know about the option settings. You can use the default option settings of the media player. The difference between this method and setPlayerOptionInString is that the value parameter of this method is of type Int, while the value of setPlayerOptionInString is of type String. These two methods cannot be used together. Ensure that you call this method before open or openWithMediaSource.
564
+ *
565
+ * @param key The key of the option.
566
+ * @param value The value of the key.
567
+ *
568
+ * @returns
569
+ * 0: Success.
570
+ * < 0: Failure.
571
+ */
572
+ abstract setPlayerOptionInInt(key: string, value: number): number;
573
+
574
+ /**
575
+ * Set media player options for providing technical previews or special customization features.
576
+ *
577
+ * Ensure that you call this method before open or openWithMediaSource. The media player supports setting options through key and value. In general, you don't need to know about the option settings. You can use the default option settings of the media player. The difference between this method and setPlayerOptionInInt is that the value parameter of this method is of type String, while the value of setPlayerOptionInInt is of type String. These two methods cannot be used together.
578
+ *
579
+ * @param key The key of the option.
580
+ * @param value The value of the key.
581
+ *
582
+ * @returns
583
+ * 0: Success.
584
+ * < 0: Failure.
585
+ */
586
+ abstract setPlayerOptionInString(key: string, value: string): number;
561
587
  }
562
588
 
563
589
  /**
@@ -571,7 +597,7 @@ export abstract class IMediaPlayerCacheManager {
571
597
  *
572
598
  * @returns
573
599
  * 0: Success.
574
- * < 0: Failure. See MediaPlayerError.
600
+ * < 0: Failure. See MediaPlayerReason.
575
601
  */
576
602
  abstract removeAllCaches(): number;
577
603
 
@@ -582,7 +608,7 @@ export abstract class IMediaPlayerCacheManager {
582
608
  *
583
609
  * @returns
584
610
  * 0: Success.
585
- * < 0: Failure. See MediaPlayerError.
611
+ * < 0: Failure. See MediaPlayerReason.
586
612
  */
587
613
  abstract removeOldCache(): number;
588
614
 
@@ -595,7 +621,7 @@ export abstract class IMediaPlayerCacheManager {
595
621
  *
596
622
  * @returns
597
623
  * 0: Success.
598
- * < 0: Failure. See MediaPlayerError.
624
+ * < 0: Failure. See MediaPlayerReason.
599
625
  */
600
626
  abstract removeCacheByUri(uri: string): number;
601
627
 
@@ -608,7 +634,7 @@ export abstract class IMediaPlayerCacheManager {
608
634
  *
609
635
  * @returns
610
636
  * 0: Success.
611
- * < 0: Failure. See MediaPlayerError.
637
+ * < 0: Failure. See MediaPlayerReason.
612
638
  */
613
639
  abstract setCacheDir(path: string): number;
614
640
 
@@ -619,7 +645,7 @@ export abstract class IMediaPlayerCacheManager {
619
645
  *
620
646
  * @returns
621
647
  * 0: Success.
622
- * < 0: Failure. See MediaPlayerError.
648
+ * < 0: Failure. See MediaPlayerReason.
623
649
  */
624
650
  abstract setMaxCacheFileCount(count: number): number;
625
651
 
@@ -630,7 +656,7 @@ export abstract class IMediaPlayerCacheManager {
630
656
  *
631
657
  * @returns
632
658
  * 0: Success.
633
- * < 0: Failure. See MediaPlayerError.
659
+ * < 0: Failure. See MediaPlayerReason.
634
660
  */
635
661
  abstract setMaxCacheFileSize(cacheSize: number): number;
636
662
 
@@ -643,7 +669,7 @@ export abstract class IMediaPlayerCacheManager {
643
669
  *
644
670
  * @returns
645
671
  * 0: Success.
646
- * < 0: Failure. See MediaPlayerError.
672
+ * < 0: Failure. See MediaPlayerReason.
647
673
  */
648
674
  abstract enableAutoRemoveCache(enable: boolean): number;
649
675
 
@@ -656,7 +682,7 @@ export abstract class IMediaPlayerCacheManager {
656
682
  *
657
683
  * @returns
658
684
  * The call succeeds, and the SDK returns the storage path of the cached media files.
659
- * < 0: Failure. See MediaPlayerError.
685
+ * < 0: Failure. See MediaPlayerReason.
660
686
  */
661
687
  abstract getCacheDir(length: number): string;
662
688
 
@@ -667,7 +693,7 @@ export abstract class IMediaPlayerCacheManager {
667
693
  *
668
694
  * @returns
669
695
  * > 0: The call succeeds and returns the maximum number of media files that can be cached.
670
- * < 0: Failure. See MediaPlayerError.
696
+ * < 0: Failure. See MediaPlayerReason.
671
697
  */
672
698
  abstract getMaxCacheFileCount(): number;
673
699
 
@@ -678,7 +704,7 @@ export abstract class IMediaPlayerCacheManager {
678
704
  *
679
705
  * @returns
680
706
  * > 0: The call succeeds and returns the maximum size (in bytes) of the aggregate storage space for cached media files.
681
- * < 0: Failure. See MediaPlayerError.
707
+ * < 0: Failure. See MediaPlayerReason.
682
708
  */
683
709
  abstract getMaxCacheFileSize(): number;
684
710
 
@@ -687,7 +713,7 @@ export abstract class IMediaPlayerCacheManager {
687
713
  *
688
714
  * @returns
689
715
  * ≥ 0: The call succeeds and returns the number of media files that are cached.
690
- * < 0: Failure. See MediaPlayerError.
716
+ * < 0: Failure. See MediaPlayerReason.
691
717
  */
692
718
  abstract getCacheFileCount(): number;
693
719
  }
@@ -1,8 +1,10 @@
1
1
  import './extension/IAgoraMediaPlayerSourceExtension';
2
2
  import {
3
- MediaPlayerError,
3
+ CacheStatistics,
4
4
  MediaPlayerEvent,
5
+ MediaPlayerReason,
5
6
  MediaPlayerState,
7
+ PlayerPlaybackStats,
6
8
  PlayerPreloadEvent,
7
9
  PlayerUpdatedInfo,
8
10
  SrcInfo,
@@ -18,21 +20,22 @@ export interface IMediaPlayerSourceObserver {
18
20
  * When the state of the media player changes, the SDK triggers this callback to report the current playback state.
19
21
  *
20
22
  * @param state The playback state. See MediaPlayerState.
21
- * @param ec The error code. See MediaPlayerError.
23
+ * @param reason The reason for the changes in the media player status. See MediaPlayerReason.
22
24
  */
23
25
  onPlayerSourceStateChanged?(
24
26
  state: MediaPlayerState,
25
- ec: MediaPlayerError
27
+ reason: MediaPlayerReason
26
28
  ): void;
27
29
 
28
30
  /**
29
- * Reports current playback progress.
31
+ * Reports the playback progress of the media file.
30
32
  *
31
33
  * When playing media files, the SDK triggers this callback every two second to report current playback progress.
32
34
  *
33
- * @param position The playback position (ms) of media files.
35
+ * @param positionMs The playback position (ms) of media files.
36
+ * @param timeStampMs The NTP timestamp (ms) of the current playback progress.
34
37
  */
35
- onPositionChanged?(positionMs: number): void;
38
+ onPositionChanged?(positionMs: number, timestampMs: number): void;
36
39
 
37
40
  /**
38
41
  * Reports the player events.
@@ -105,6 +108,24 @@ export interface IMediaPlayerSourceObserver {
105
108
  */
106
109
  onPlayerInfoUpdated?(info: PlayerUpdatedInfo): void;
107
110
 
111
+ /**
112
+ * Reports the statistics of the media file being cached.
113
+ *
114
+ * After you call the openWithMediaSource method and set enableCache as true, the SDK triggers this callback once per second to report the statistics of the media file being cached.
115
+ *
116
+ * @param stats The statistics of the media file being cached. See CacheStatistics.
117
+ */
118
+ onPlayerCacheStats?(stats: CacheStatistics): void;
119
+
120
+ /**
121
+ * The statistics of the media file being played.
122
+ *
123
+ * The SDK triggers this callback once per second to report the statistics of the media file being played.
124
+ *
125
+ * @param stats The statistics of the media file. See PlayerPlaybackStats.
126
+ */
127
+ onPlayerPlaybackStats?(stats: PlayerPlaybackStats): void;
128
+
108
129
  /**
109
130
  * Reports the volume of the media player.
110
131
  *
@@ -1,80 +1,81 @@
1
1
  import './extension/IAgoraMediaStreamingSourceExtension';
2
- /* enum_streamingsrcerr */
2
+
3
+ /* enum_StreamingSrcErr */
3
4
  export enum StreamingSrcErr {
4
- /* enum_streamingsrcerr_StreamingSrcErrNone */
5
+ /* enum_StreamingSrcErr_StreamingSrcErrNone */
5
6
  StreamingSrcErrNone = 0,
6
- /* enum_streamingsrcerr_StreamingSrcErrUnknown */
7
+ /* enum_StreamingSrcErr_StreamingSrcErrUnknown */
7
8
  StreamingSrcErrUnknown = 1,
8
- /* enum_streamingsrcerr_StreamingSrcErrInvalidParam */
9
+ /* enum_StreamingSrcErr_StreamingSrcErrInvalidParam */
9
10
  StreamingSrcErrInvalidParam = 2,
10
- /* enum_streamingsrcerr_StreamingSrcErrBadState */
11
+ /* enum_StreamingSrcErr_StreamingSrcErrBadState */
11
12
  StreamingSrcErrBadState = 3,
12
- /* enum_streamingsrcerr_StreamingSrcErrNoMem */
13
+ /* enum_StreamingSrcErr_StreamingSrcErrNoMem */
13
14
  StreamingSrcErrNoMem = 4,
14
- /* enum_streamingsrcerr_StreamingSrcErrBufferOverflow */
15
+ /* enum_StreamingSrcErr_StreamingSrcErrBufferOverflow */
15
16
  StreamingSrcErrBufferOverflow = 5,
16
- /* enum_streamingsrcerr_StreamingSrcErrBufferUnderflow */
17
+ /* enum_StreamingSrcErr_StreamingSrcErrBufferUnderflow */
17
18
  StreamingSrcErrBufferUnderflow = 6,
18
- /* enum_streamingsrcerr_StreamingSrcErrNotFound */
19
+ /* enum_StreamingSrcErr_StreamingSrcErrNotFound */
19
20
  StreamingSrcErrNotFound = 7,
20
- /* enum_streamingsrcerr_StreamingSrcErrTimeout */
21
+ /* enum_StreamingSrcErr_StreamingSrcErrTimeout */
21
22
  StreamingSrcErrTimeout = 8,
22
- /* enum_streamingsrcerr_StreamingSrcErrExpired */
23
+ /* enum_StreamingSrcErr_StreamingSrcErrExpired */
23
24
  StreamingSrcErrExpired = 9,
24
- /* enum_streamingsrcerr_StreamingSrcErrUnsupported */
25
+ /* enum_StreamingSrcErr_StreamingSrcErrUnsupported */
25
26
  StreamingSrcErrUnsupported = 10,
26
- /* enum_streamingsrcerr_StreamingSrcErrNotExist */
27
+ /* enum_StreamingSrcErr_StreamingSrcErrNotExist */
27
28
  StreamingSrcErrNotExist = 11,
28
- /* enum_streamingsrcerr_StreamingSrcErrExist */
29
+ /* enum_StreamingSrcErr_StreamingSrcErrExist */
29
30
  StreamingSrcErrExist = 12,
30
- /* enum_streamingsrcerr_StreamingSrcErrOpen */
31
+ /* enum_StreamingSrcErr_StreamingSrcErrOpen */
31
32
  StreamingSrcErrOpen = 13,
32
- /* enum_streamingsrcerr_StreamingSrcErrClose */
33
+ /* enum_StreamingSrcErr_StreamingSrcErrClose */
33
34
  StreamingSrcErrClose = 14,
34
- /* enum_streamingsrcerr_StreamingSrcErrRead */
35
+ /* enum_StreamingSrcErr_StreamingSrcErrRead */
35
36
  StreamingSrcErrRead = 15,
36
- /* enum_streamingsrcerr_StreamingSrcErrWrite */
37
+ /* enum_StreamingSrcErr_StreamingSrcErrWrite */
37
38
  StreamingSrcErrWrite = 16,
38
- /* enum_streamingsrcerr_StreamingSrcErrSeek */
39
+ /* enum_StreamingSrcErr_StreamingSrcErrSeek */
39
40
  StreamingSrcErrSeek = 17,
40
- /* enum_streamingsrcerr_StreamingSrcErrEof */
41
+ /* enum_StreamingSrcErr_StreamingSrcErrEof */
41
42
  StreamingSrcErrEof = 18,
42
- /* enum_streamingsrcerr_StreamingSrcErrCodecopen */
43
+ /* enum_StreamingSrcErr_StreamingSrcErrCodecopen */
43
44
  StreamingSrcErrCodecopen = 19,
44
- /* enum_streamingsrcerr_StreamingSrcErrCodecclose */
45
+ /* enum_StreamingSrcErr_StreamingSrcErrCodecclose */
45
46
  StreamingSrcErrCodecclose = 20,
46
- /* enum_streamingsrcerr_StreamingSrcErrCodecproc */
47
+ /* enum_StreamingSrcErr_StreamingSrcErrCodecproc */
47
48
  StreamingSrcErrCodecproc = 21,
48
49
  }
49
50
 
50
- /* enum_streamingsrcstate */
51
+ /* enum_StreamingSrcState */
51
52
  export enum StreamingSrcState {
52
- /* enum_streamingsrcstate_StreamingSrcStateClosed */
53
+ /* enum_StreamingSrcState_StreamingSrcStateClosed */
53
54
  StreamingSrcStateClosed = 0,
54
- /* enum_streamingsrcstate_StreamingSrcStateOpening */
55
+ /* enum_StreamingSrcState_StreamingSrcStateOpening */
55
56
  StreamingSrcStateOpening = 1,
56
- /* enum_streamingsrcstate_StreamingSrcStateIdle */
57
+ /* enum_StreamingSrcState_StreamingSrcStateIdle */
57
58
  StreamingSrcStateIdle = 2,
58
- /* enum_streamingsrcstate_StreamingSrcStatePlaying */
59
+ /* enum_StreamingSrcState_StreamingSrcStatePlaying */
59
60
  StreamingSrcStatePlaying = 3,
60
- /* enum_streamingsrcstate_StreamingSrcStateSeeking */
61
+ /* enum_StreamingSrcState_StreamingSrcStateSeeking */
61
62
  StreamingSrcStateSeeking = 4,
62
- /* enum_streamingsrcstate_StreamingSrcStateEof */
63
+ /* enum_StreamingSrcState_StreamingSrcStateEof */
63
64
  StreamingSrcStateEof = 5,
64
- /* enum_streamingsrcstate_StreamingSrcStateError */
65
+ /* enum_StreamingSrcState_StreamingSrcStateError */
65
66
  StreamingSrcStateError = 6,
66
67
  }
67
68
 
68
- /* class_inputseidata */
69
+ /* class_InputSeiData */
69
70
  export class InputSeiData {
70
- /* class_inputseidata_type */
71
+ /* class_InputSeiData_type */
71
72
  type?: number;
72
- /* class_inputseidata_timestamp */
73
+ /* class_InputSeiData_timestamp */
73
74
  timestamp?: number;
74
- /* class_inputseidata_frame_index */
75
+ /* class_InputSeiData_frame_index */
75
76
  frame_index?: number;
76
- /* class_inputseidata_private_data */
77
+ /* class_InputSeiData_private_data */
77
78
  private_data?: Uint8Array;
78
- /* class_inputseidata_data_size */
79
+ /* class_InputSeiData_data_size */
79
80
  data_size?: number;
80
81
  }
@@ -4,61 +4,61 @@ import { IMediaPlayer } from './IAgoraMediaPlayer';
4
4
  /**
5
5
  * @ignore
6
6
  */
7
- export enum PreloadStatusCode {
7
+ export enum PreloadState {
8
8
  /**
9
9
  * @ignore
10
10
  */
11
- KPreloadStatusCompleted = 0,
11
+ KPreloadStateCompleted = 0,
12
12
  /**
13
13
  * @ignore
14
14
  */
15
- KPreloadStatusFailed = 1,
15
+ KPreloadStateFailed = 1,
16
16
  /**
17
17
  * @ignore
18
18
  */
19
- KPreloadStatusPreloading = 2,
19
+ KPreloadStatePreloading = 2,
20
20
  /**
21
21
  * @ignore
22
22
  */
23
- KPreloadStatusRemoved = 3,
23
+ KPreloadStateRemoved = 3,
24
24
  }
25
25
 
26
26
  /**
27
27
  * @ignore
28
28
  */
29
- export enum MusicContentCenterStatusCode {
29
+ export enum MusicContentCenterStateReason {
30
30
  /**
31
31
  * @ignore
32
32
  */
33
- KMusicContentCenterStatusOk = 0,
33
+ KMusicContentCenterReasonOk = 0,
34
34
  /**
35
35
  * @ignore
36
36
  */
37
- KMusicContentCenterStatusErr = 1,
37
+ KMusicContentCenterReasonError = 1,
38
38
  /**
39
39
  * @ignore
40
40
  */
41
- KMusicContentCenterStatusErrGateway = 2,
41
+ KMusicContentCenterReasonGateway = 2,
42
42
  /**
43
43
  * @ignore
44
44
  */
45
- KMusicContentCenterStatusErrPermissionAndResource = 3,
45
+ KMusicContentCenterReasonPermissionAndResource = 3,
46
46
  /**
47
47
  * @ignore
48
48
  */
49
- KMusicContentCenterStatusErrInternalDataParse = 4,
49
+ KMusicContentCenterReasonInternalDataParse = 4,
50
50
  /**
51
51
  * @ignore
52
52
  */
53
- KMusicContentCenterStatusErrMusicLoading = 5,
53
+ KMusicContentCenterReasonMusicLoading = 5,
54
54
  /**
55
55
  * @ignore
56
56
  */
57
- KMusicContentCenterStatusErrMusicDecryption = 6,
57
+ KMusicContentCenterReasonMusicDecryption = 6,
58
58
  /**
59
59
  * @ignore
60
60
  */
61
- KMusicContentCenterStatusErrHttpInternalError = 7,
61
+ KMusicContentCenterReasonHttpInternalError = 7,
62
62
  }
63
63
 
64
64
  /**
@@ -248,7 +248,7 @@ export interface IMusicContentCenterEventHandler {
248
248
  onMusicChartsResult?(
249
249
  requestId: string,
250
250
  result: MusicChartInfo[],
251
- errorCode: MusicContentCenterStatusCode
251
+ reason: MusicContentCenterStateReason
252
252
  ): void;
253
253
 
254
254
  /**
@@ -257,7 +257,7 @@ export interface IMusicContentCenterEventHandler {
257
257
  onMusicCollectionResult?(
258
258
  requestId: string,
259
259
  result: MusicCollection,
260
- errorCode: MusicContentCenterStatusCode
260
+ reason: MusicContentCenterStateReason
261
261
  ): void;
262
262
 
263
263
  /**
@@ -267,7 +267,7 @@ export interface IMusicContentCenterEventHandler {
267
267
  requestId: string,
268
268
  songCode: number,
269
269
  lyricUrl: string,
270
- errorCode: MusicContentCenterStatusCode
270
+ reason: MusicContentCenterStateReason
271
271
  ): void;
272
272
 
273
273
  /**
@@ -277,7 +277,7 @@ export interface IMusicContentCenterEventHandler {
277
277
  requestId: string,
278
278
  songCode: number,
279
279
  simpleInfo: string,
280
- errorCode: MusicContentCenterStatusCode
280
+ reason: MusicContentCenterStateReason
281
281
  ): void;
282
282
 
283
283
  /**
@@ -288,8 +288,8 @@ export interface IMusicContentCenterEventHandler {
288
288
  songCode: number,
289
289
  percent: number,
290
290
  lyricUrl: string,
291
- status: PreloadStatusCode,
292
- errorCode: MusicContentCenterStatusCode
291
+ state: PreloadState,
292
+ reason: MusicContentCenterStateReason
293
293
  ): void;
294
294
  }
295
295
 
@@ -1,4 +1,5 @@
1
1
  import './extension/IAgoraRhythmPlayerExtension';
2
+
2
3
  /**
3
4
  * @ignore
4
5
  */
@@ -28,27 +29,27 @@ export enum RhythmPlayerStateType {
28
29
  /**
29
30
  * @ignore
30
31
  */
31
- export enum RhythmPlayerErrorType {
32
+ export enum RhythmPlayerReason {
32
33
  /**
33
34
  * @ignore
34
35
  */
35
- RhythmPlayerErrorOk = 0,
36
+ RhythmPlayerReasonOk = 0,
36
37
  /**
37
38
  * @ignore
38
39
  */
39
- RhythmPlayerErrorFailed = 1,
40
+ RhythmPlayerReasonFailed = 1,
40
41
  /**
41
42
  * @ignore
42
43
  */
43
- RhythmPlayerErrorCanNotOpen = 801,
44
+ RhythmPlayerReasonCanNotOpen = 801,
44
45
  /**
45
46
  * @ignore
46
47
  */
47
- RhythmPlayerErrorCanNotPlay = 802,
48
+ RhythmPlayerReasonCanNotPlay = 802,
48
49
  /**
49
50
  * @ignore
50
51
  */
51
- RhythmPlayerErrorFileOverDurationLimit = 803,
52
+ RhythmPlayerReasonFileOverDurationLimit = 803,
52
53
  }
53
54
 
54
55
  /**