Skip to content

Commit f660939

Browse files
[AUTO] Generate code by terra (#980)
Co-authored-by: LichKing-2234 <[email protected]>
1 parent bdcb715 commit f660939

19 files changed

+72
-44
lines changed

ts/Private/AgoraBase.ts

+22-20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import './extension/AgoraBaseExtension';
22
import { RenderModeType, VideoSourceType } from './AgoraMediaBase';
3+
34
/**
45
* The channel profile.
56
*/
@@ -1241,11 +1242,11 @@ export class CodecCapInfo {
12411242
/**
12421243
* @ignore
12431244
*/
1244-
codec_type?: VideoCodecType;
1245+
codecType?: VideoCodecType;
12451246
/**
12461247
* @ignore
12471248
*/
1248-
codec_cap_mask?: number;
1249+
codecCapMask?: number;
12491250
}
12501251

12511252
/**
@@ -2241,11 +2242,11 @@ export enum RemoteVideoDownscaleLevel {
22412242
*/
22422243
export class AudioVolumeInfo {
22432244
/**
2244-
* The user ID.In the local user's callback, uid is 0.In the remote users' callback, uid is the user ID of a remote user whose instantaneous volume is the highest.
2245+
* The user ID.In the local user's callback, uid = 0.In the remote users' callback, uid is the user ID of a remote user whose instantaneous volume is one of the three highest.
22452246
*/
22462247
uid?: number;
22472248
/**
2248-
* The volume of the user. The value ranges between 0 (the lowest volume) and 255 (the highest volume). If the local user enables audio capturing and calls muteLocalAudioStream and set it as true to mute, the value of volume indicates the volume of locally captured audio signal.
2249+
* The volume of the user. The value ranges between 0 (lowest volume) and 255 (highest volume).
22492250
*/
22502251
volume?: number;
22512252
/**
@@ -2389,23 +2390,24 @@ export enum RtmpStreamPublishState {
23892390
*/
23902391
RtmpStreamPublishStateIdle = 0,
23912392
/**
2392-
* 1: The streaming server and CDN server are being connected.
2393+
* 1: The SDK is connecting to Agora's streaming server and the CDN server.
23932394
*/
23942395
RtmpStreamPublishStateConnecting = 1,
23952396
/**
23962397
* 2: The RTMP or RTMPS streaming publishes. The SDK successfully publishes the RTMP or RTMPS streaming and returns this state.
23972398
*/
23982399
RtmpStreamPublishStateRunning = 2,
23992400
/**
2400-
* 3: The RTMP or RTMPS streaming is recovering. When exceptions occur to the CDN, or the streaming is interrupted, the SDK tries to resume RTMP or RTMPS streaming and returns this state.If the SDK successfully resumes the streaming, RtmpStreamPublishStateRunning(2) returns.If the streaming does not resume within 60 seconds or server errors occur, RtmpStreamPublishStateFailure(4) returns. If you feel that 60 seconds is too long, you can also actively try to reconnect.
2401+
* 3: The RTMP or RTMPS streaming is recovering. When exceptions occur to the CDN, or the streaming is interrupted, the SDK tries to resume RTMP or RTMPS streaming and returns this state.If the SDK successfully resumes the streaming, RtmpStreamPublishStateRunning(2) returns.
2402+
* If the streaming does not resume within 60 seconds or server errors occur, RtmpStreamPublishStateFailure(4) returns. You can also reconnect to the server by calling the stopRtmpStream method.
24012403
*/
24022404
RtmpStreamPublishStateRecovering = 3,
24032405
/**
2404-
* 4: The RTMP or RTMPS streaming fails. After a failure, you can troubleshoot the cause of the error through the returned error code.
2406+
* 4: The RTMP or RTMPS streaming fails. See the errCode parameter for the detailed error information.
24052407
*/
24062408
RtmpStreamPublishStateFailure = 4,
24072409
/**
2408-
* 5: The SDK is disconnecting from the Agora streaming server and CDN. When you call stopRtmpStream to stop the Media Push normally, the SDK reports the Media Push state as RtmpStreamPublishStateDisconnecting and RtmpStreamPublishStateIdle in sequence.
2410+
* 5: The SDK is disconnecting from the Agora streaming server and CDN. When you call stopRtmpStream to stop the streaming normally, the SDK reports the streaming state as RtmpStreamPublishStateDisconnecting and RtmpStreamPublishStateIdle in sequence.
24092411
*/
24102412
RtmpStreamPublishStateDisconnecting = 5,
24112413
}
@@ -2415,7 +2417,7 @@ export enum RtmpStreamPublishState {
24152417
*/
24162418
export enum RtmpStreamPublishErrorType {
24172419
/**
2418-
* 0: The RTMP or RTMPS streaming has not started or has ended.
2420+
* 0: The RTMP or RTMPS streaming publishes successfully.
24192421
*/
24202422
RtmpStreamPublishErrorOk = 0,
24212423
/**
@@ -2427,19 +2429,19 @@ export enum RtmpStreamPublishErrorType {
24272429
*/
24282430
RtmpStreamPublishErrorEncryptedStreamNotAllowed = 2,
24292431
/**
2430-
* 3: Timeout for the RTMP or RTMPS streaming.
2432+
* 3: Timeout for the RTMP or RTMPS streaming. Try to publish the streaming again.
24312433
*/
24322434
RtmpStreamPublishErrorConnectionTimeout = 3,
24332435
/**
2434-
* 4: An error occurs in Agora's streaming server.
2436+
* 4: An error occurs in Agora's streaming server. Try to publish the streaming again.
24352437
*/
24362438
RtmpStreamPublishErrorInternalServerError = 4,
24372439
/**
24382440
* 5: An error occurs in the CDN server.
24392441
*/
24402442
RtmpStreamPublishErrorRtmpServerError = 5,
24412443
/**
2442-
* 6: The RTMP or RTMPS streaming publishes too frequently.
2444+
* 6: The RTMP or RTMPS streaming publishing requests are too frequent.
24432445
*/
24442446
RtmpStreamPublishErrorTooOften = 6,
24452447
/**
@@ -2459,11 +2461,11 @@ export enum RtmpStreamPublishErrorType {
24592461
*/
24602462
RtmpStreamPublishErrorFormatNotSupported = 10,
24612463
/**
2462-
* 11: The user role is not host, so the user cannot use the CDN live streaming function. Check your application code logic.
2464+
* 11: The user role is not host, so the user cannot use the CDN live streaming function. Check your app code logic.
24632465
*/
24642466
RtmpStreamPublishErrorNotBroadcaster = 11,
24652467
/**
2466-
* 13: The updateRtmpTranscoding method is called to update the transcoding configuration in a scenario where there is streaming without transcoding. Check your application code logic.
2468+
* 13: The updateRtmpTranscoding or setLiveTranscoding method is called to update the transcoding configuration in a scenario where there is streaming without transcoding. Check your application code logic.
24672469
*/
24682470
RtmpStreamPublishErrorTranscodingNoMixStream = 13,
24692471
/**
@@ -2475,25 +2477,25 @@ export enum RtmpStreamPublishErrorType {
24752477
*/
24762478
RtmpStreamPublishErrorInvalidAppid = 15,
24772479
/**
2478-
* 16: Your project does not have permission to use streaming services. Refer to Media Push to enable the Media Push permission.
2480+
* @ignore
24792481
*/
24802482
RtmpStreamPublishErrorInvalidPrivilege = 16,
24812483
/**
2482-
* 100: The streaming has been stopped normally. After you stop the media push, the SDK returns this value.
2484+
* 100: The streaming has been stopped normally. After you call stopRtmpStream to stop streaming, the SDK returns this value.
24832485
*/
24842486
RtmpStreamUnpublishErrorOk = 100,
24852487
}
24862488

24872489
/**
2488-
* Events during the Media Push.
2490+
* Events during the media push.
24892491
*/
24902492
export enum RtmpStreamingEvent {
24912493
/**
2492-
* 1: An error occurs when you add a background image or a watermark image in the Media Push.
2494+
* 1: An error occurs when you add a background image or a watermark image in the media push.
24932495
*/
24942496
RtmpStreamingEventFailedLoadImage = 1,
24952497
/**
2496-
* 2: The streaming URL is already being used for Media Push. If you want to start new streaming, use a new streaming URL.
2498+
* 2: The streaming URL is already being used for CDN live streaming. If you want to start new streaming, use a new streaming URL.
24972499
*/
24982500
RtmpStreamingEventUrlAlreadyInUse = 2,
24992501
/**
@@ -3155,7 +3157,7 @@ export class VideoCanvas {
31553157
*/
31563158
sourceType?: VideoSourceType;
31573159
/**
3158-
* The ID of the media player. You can get the media player ID by calling getMediaPlayerId .
3160+
* The ID of the media player. You can get the Device ID by calling getMediaPlayerId .
31593161
*/
31603162
mediaPlayerId?: number;
31613163
/**

ts/Private/AgoraMediaBase.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import './extension/AgoraMediaBaseExtension';
22
import { EncodedVideoFrameInfo } from './AgoraBase';
3+
34
/**
45
* The capture type of the custom video source.
56
*/
@@ -910,7 +911,7 @@ export class UserAudioSpectrumInfo {
910911
export interface IAudioSpectrumObserver {
911912
/**
912913
* Gets the statistics of a local audio spectrum.
913-
* After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrum callback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK will trigger the callback as the time interval you set to report the received remote audio data spectrum.
914+
* After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrumcallback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK will trigger the callback as the time interval you set to report the received remote audio data spectrum.
914915
*
915916
* @param data The audio spectrum data of the local user. See AudioSpectrumData .
916917
*
@@ -979,7 +980,7 @@ export enum VideoFrameProcessMode {
979980
export interface IVideoFrameObserver {
980981
/**
981982
* Occurs each time the SDK receives a video frame captured by the local camera.
982-
* After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data captured by the local camera. You can then pre-process the data according to your scenarios.Once the pre-processing is complete, you can directly modify videoFrame in this callback, and set the return value to true to send the modified video data to the SDK.The video data that this callback gets has not been pre-processed, and is not watermarked, cropped, rotated or beautified.If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel.
983+
* After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data captured by the local camera. You can then pre-process the data according to your scenarios.After pre-processing, you can send the processed video data back to the SDK through this callback.The video data that this callback gets has not been pre-processed, and is not watermarked, cropped, rotated or beautified.If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel.
983984
*
984985
* @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:macOS: YUV 420Windows: YUV 420
985986
*

ts/Private/IAgoraMediaEngine.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
IVideoEncodedFrameObserver,
1414
IVideoFrameObserver,
1515
} from './AgoraMediaBase';
16+
1617
/**
1718
* The channel mode.
1819
*/
@@ -126,7 +127,7 @@ export abstract class IMediaEngine {
126127
* Call this method before joining a channel.
127128
*
128129
* @param enabled Whether to enable the external audio source:true: Enable the external audio source.false: (Default) Disable the external audio source.
129-
* @param sampleRate The sample rate (Hz) of the external audio source which can be set as 8000, 16000, 32000, 44100, or 48000.
130+
* @param sampleRate The sample rate (Hz) of the external audio which can be set as 8000, 16000, 32000, 44100, or 48000.
130131
* @param channels The number of channels of the external audio source, which can be set as 1 (Mono) or 2 (Stereo).
131132
* @param sourceNumber The number of external audio sources. The value of this parameter should be larger than 0. The SDK creates a corresponding number of custom audio tracks based on this parameter value and names the audio tracks starting from 0. In ChannelMediaOptions , you can set publishCustomAudioSourceId to the audio track ID you want to publish.
132133
* @param localPlayback Whether to play the external audio source:true: Play the external audio source.false: (Default) Do not play the external source.

ts/Private/IAgoraMediaPlayer.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
PlayerStreamInfo,
1515
} from './AgoraMediaPlayerTypes';
1616
import { IMediaPlayerSourceObserver } from './IAgoraMediaPlayerSource';
17+
1718
/**
1819
* This class provides media player functions and supports multiple instances.
1920
*/

ts/Private/IAgoraMediaPlayerSource.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
PlayerUpdatedInfo,
88
SrcInfo,
99
} from './AgoraMediaPlayerTypes';
10+
1011
/**
1112
* Provides callbacks for media players.
1213
*/

ts/Private/IAgoraMediaRecorder.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
IMediaRecorderObserver,
44
MediaRecorderConfiguration,
55
} from './AgoraMediaBase';
6+
67
/**
78
* Used for recording audio and video on the client.
89
* IMediaRecorder can record the following:

ts/Private/IAgoraMusicContentCenter.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import './extension/IAgoraMusicContentCenterExtension';
22
import { IMediaPlayer } from './IAgoraMediaPlayer';
3+
34
/**
45
* @ignore
56
*/

ts/Private/IAgoraRtcEngine.ts

+13-12
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ import {
118118
import { RtcConnection } from './IAgoraRtcEngineEx';
119119
import { ILocalSpatialAudioEngine } from './IAgoraSpatialAudio';
120120
import { IAudioDeviceManager } from './IAudioDeviceManager';
121+
121122
/**
122123
* Media device types.
123124
*/
@@ -1038,15 +1039,15 @@ export class ChannelMediaOptions {
10381039
*/
10391040
publishCameraTrack?: boolean;
10401041
/**
1041-
* Whether to publish the video captured by the second camera:true: Publish the video captured by the second camera.false: (Default) Do not publish the video captured by the second camera.
1042+
* @ignore
10421043
*/
10431044
publishSecondaryCameraTrack?: boolean;
10441045
/**
10451046
* Whether to publish the audio captured by the microphone:true: (Default) Publish the audio captured by the microphone.false: Do not publish the audio captured by the microphone.
10461047
*/
10471048
publishMicrophoneTrack?: boolean;
10481049
/**
1049-
* @ignore
1050+
* Whether to publish the video captured from the screen:true: Publish the video captured from the screen.false: (Default) Do not publish the video captured from the screen.This parameter applies to Android and iOS only.
10501051
*/
10511052
publishScreenCaptureVideo?: boolean;
10521053
/**
@@ -1366,10 +1367,10 @@ export interface IRtcEngineEventHandler {
13661367

13671368
/**
13681369
* Reports the volume information of users.
1369-
* By default, this callback is disabled. You can enable it by calling enableAudioVolumeIndication . Once this callback is enabled and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback according to the time interval set in enableAudioVolumeIndication. The SDK triggers two independent onAudioVolumeIndication callbacks simultaneously, which separately report the volume information of the local user who sends a stream and the remote users (up to three) whose instantaneous volume is the highest.Once this callback is enabled, if the local user calls the muteLocalAudioStream method to mute, the SDK continues to report the volume indication of the local user.If a remote user whose volume is one of the three highest in the channel stops publishing the audio stream for 20 seconds, the callback excludes this user's information; if all remote users stop publishing audio streams for 20 seconds, the SDK stops triggering the callback for remote users.
1370+
* By default, this callback is disabled. You can enable it by calling enableAudioVolumeIndication . Once this callback is enabled and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback according to the time interval set in enableAudioVolumeIndication. The SDK triggers two independent onAudioVolumeIndication callbacks simultaneously, which separately report the volume information of the local user who sends a stream and the remote users (up to three) whose instantaneous volume is the highest.Once this callback is enabled, if the local user calls the muteLocalAudioStream method for muting, the SDK continues to report the volume indication of the local user. In the callbacks triggered, the volume information about the local user is 0 If a remote user whose volume is one of the three highest in the channel stops publishing the audio stream for 20 seconds, the callback excludes this user's information; if all remote users stop publishing audio streams for 20 seconds, the SDK stops triggering the callback for remote users.
13701371
*
13711372
* @param connection The connection information. See RtcConnection .
1372-
* @param speakers The volume information of the users. See AudioVolumeInfo . An empty speakers array in the callback indicates that no remote user is in the channel or is sending a stream.
1373+
* @param speakers The volume information of the users, see AudioVolumeInfo . An empty speakers array in the callback indicates that no remote user is in the channel or is sending a stream.
13731374
* @param speakerNumber The total number of users.In the callback for the local user, if the local user is sending streams, the value of speakerNumber is 1.In the callback for remote users, the value range of speakerNumber is [0,3]. If the number of remote users who send streams is greater than or equal to three, the value of speakerNumber is 3.
13741375
* @param totalVolume The volume of the speaker. The value range is [0,255].In the callback for the local user, totalVolume is the volume of the local user who sends a stream.In the callback for remote users, totalVolume is the sum of the volume of all remote users (up to three) whose instantaneous volume is the highest.
13751376
*/
@@ -2048,12 +2049,12 @@ export interface IRtcEngineEventHandler {
20482049
): void;
20492050

20502051
/**
2051-
* Occurs when the state of Media Push changes.
2052-
* When the state of Media Push changes, the SDK triggers this callback and reports the URL address and the current state of the Media Push. This callback indicates the state of the Media Push. When exceptions occur, you can troubleshoot issues by referring to the detailed error descriptions in the error code parameter.
2052+
* Occurs when the media push state changes.
2053+
* When the media push state changes, the SDK triggers this callback and reports the URL address and the current state of the media push. This callback indicates the state of the media push. When exceptions occur, you can troubleshoot issues by referring to the detailed error descriptions in the error code parameter.
20532054
*
2054-
* @param url The URL address where the state of the Media Push changes.
2055-
* @param state The current state of the Media Push. See RtmpStreamPublishState .
2056-
* @param errCode The detailed error information for the Media Push. See RtmpStreamPublishErrorType .
2055+
* @param url The URL address where the state of the media push changes.
2056+
* @param state The current state of the media push. See RtmpStreamPublishState .
2057+
* @param errCode The detailed error information for the media push. See RtmpStreamPublishErrorType .
20572058
*/
20582059
onRtmpStreamingStateChanged?(
20592060
url: string,
@@ -2062,10 +2063,10 @@ export interface IRtcEngineEventHandler {
20622063
): void;
20632064

20642065
/**
2065-
* Reports events during the Media Push.
2066+
* Reports events during the media push.
20662067
*
2067-
* @param url The URL for Media Push.
2068-
* @param eventCode The event code of Media Push. RtmpStreamingEvent
2068+
* @param url The URL of media push.
2069+
* @param eventCode The event code of media push. See RtmpStreamingEvent .
20692070
*/
20702071
onRtmpStreamingEvent?(url: string, eventCode: RtmpStreamingEvent): void;
20712072

ts/Private/IAgoraRtcEngineEx.ts

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
LeaveChannelOptions,
2424
StreamFallbackOptions,
2525
} from './IAgoraRtcEngine';
26+
2627
/**
2728
* Contains connection information.
2829
*/

ts/Private/IAgoraSpatialAudio.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import './extension/IAgoraSpatialAudioExtension';
22
import { RtcConnection } from './IAgoraRtcEngineEx';
3+
34
/**
45
* The spatial position of the remote user or the media player.
56
*/

ts/Private/IAudioDeviceManager.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import './extension/IAudioDeviceManagerExtension';
22
import { AudioDeviceInfo } from './IAgoraRtcEngine';
3+
34
/**
45
* The maximum length of the device ID.
56
*/
@@ -77,7 +78,7 @@ export abstract class IAudioDeviceManager {
7778
* Sets the audio capture device.
7879
* You can call this method to change the audio route currently being used, but this does not change the default audio route. For example, if the default audio route is microphone, you call this method to set the audio route as bluetooth earphones before joinging a channel and then start a device test, the SDK conducts device test on the bluetooth earphones. After the device test is completed and you join a channel, the SDK still uses the microphone for audio capturing.
7980
*
80-
* @param deviceId The ID of the audio capture device. You can get the media player ID by calling enumerateRecordingDevices . Connecting or disconnecting the audio device does not change the value of deviceId.The maximum length is MaxDeviceIdLengthType .
81+
* @param deviceId The ID of the audio capture device. You can get the Device ID by calling enumerateRecordingDevices . Connecting or disconnecting the audio device does not change the value of deviceId.The maximum length is MaxDeviceIdLengthType .
8182
*
8283
* @returns
8384
* 0: Success.< 0: Failure.

0 commit comments

Comments
 (0)