Skip to content

Commit

Permalink
[AUTO] Generate codes by terra (#1250)
Browse files Browse the repository at this point in the history
Co-authored-by: xiayangqun <[email protected]>
  • Loading branch information
sda-rob and xiayangqun authored Dec 17, 2024
1 parent 54f9645 commit f1bddc8
Show file tree
Hide file tree
Showing 10 changed files with 221 additions and 109 deletions.
14 changes: 7 additions & 7 deletions ts/Private/AgoraBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ export enum QualityType {
*/
QualityUnsupported = 7,
/**
* 8: Detecting the network quality.
* 8: The last-mile network probe test is in progress.
*/
QualityDetecting = 8,
}
Expand Down Expand Up @@ -775,7 +775,7 @@ export enum OrientationMode {
*/
export enum DegradationPreference {
/**
* 0: (Default) Prefers to reduce the video frame rate while maintaining video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized.
* 0: Prefers to reduce the video frame rate while maintaining video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized. Deprecated: This enumerator is deprecated. Use other enumerations instead.
*/
MaintainQuality = 0,
/**
Expand Down Expand Up @@ -1124,7 +1124,7 @@ export enum CompressionPreference {
*/
PreferLowLatency = 0,
/**
* 1: (Default) High quality preference. The SDK compresses video frames while maintaining video quality. This preference is suitable for scenarios where video quality is prioritized.
* 1: High quality preference. The SDK compresses video frames while maintaining video quality. This preference is suitable for scenarios where video quality is prioritized.
*/
PreferQuality = 1,
}
Expand Down Expand Up @@ -2849,19 +2849,19 @@ export enum VideoDenoiserMode {
}

/**
* The video noise reduction level.
* Video noise reduction level.
*/
export enum VideoDenoiserLevel {
/**
* 0: (Default) Promotes video quality during video noise reduction. balances performance consumption and video noise reduction quality. The performance consumption is moderate, the video noise reduction speed is moderate, and the overall video quality is optimal.
*/
VideoDenoiserLevelHighQuality = 0,
/**
* 1: Promotes reducing performance consumption during video noise reduction. prioritizes reducing performance consumption over video noise reduction quality. The performance consumption is lower, and the video noise reduction speed is faster. To avoid a noticeable shadowing effect (shadows trailing behind moving objects) in the processed video, Agora recommends that you use this settinging when the camera is fixed.
* 1: Promotes reducing performance consumption during video noise reduction. It prioritizes reducing performance consumption over video noise reduction quality. The performance consumption is lower, and the video noise reduction speed is faster. To avoid a noticeable shadowing effect (shadows trailing behind moving objects) in the processed video, Agora recommends that you use this setting when the camera is fixed.
*/
VideoDenoiserLevelFast = 1,
/**
* 2: Enhanced video noise reduction. prioritizes video noise reduction quality over reducing performance consumption. The performance consumption is higher, the video noise reduction speed is slower, and the video noise reduction quality is better. If VideoDenoiserLevelHighQuality is not enough for your video noise reduction needs, you can use this enumerator.
* @ignore
*/
VideoDenoiserLevelStrength = 2,
}
Expand All @@ -2887,7 +2887,7 @@ export class ColorEnhanceOptions {
*/
export enum BackgroundSourceType {
/**
* 0: Process the background as alpha data without replacement, only separating the portrait and the background. After setting this value, you can call startLocalVideoTranscoder to implement the picture-in-picture effect.
* @ignore
*/
BackgroundNone = 0,
/**
Expand Down
6 changes: 3 additions & 3 deletions ts/Private/AgoraMediaBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,11 +440,11 @@ export enum VideoPixelFormat {
*/
export enum RenderModeType {
/**
* 1: Hidden mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). One dimension of the video may have clipped contents.
* 1: Hidden mode. The priority is to fill the window. Any excess video that does not match the window size will be cropped.
*/
RenderModeHidden = 1,
/**
* 2: Fit mode. Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with black.
* 2: Fit mode. The priority is to ensure that all video content is displayed. Any areas of the window that are not filled due to the mismatch between video size and window size will be filled with black.
*/
RenderModeFit = 2,
/**
Expand Down Expand Up @@ -798,7 +798,7 @@ export interface IAudioSpectrumObserver {
*
* After successfully calling registerAudioSpectrumObserver to implement the onRemoteAudioSpectrum callback in the 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.
*
* @param spectrums The audio spectrum information of the remote user, see UserAudioSpectrumInfo. The number of arrays is the number of remote users monitored by the SDK. If the array is null, it means that no audio spectrum of remote users is detected.
* @param spectrums The audio spectrum information of the remote user. See UserAudioSpectrumInfo. The number of arrays is the number of remote users monitored by the SDK. If the array is null, it means that no audio spectrum of remote users is detected.
* @param spectrumNumber The number of remote users.
*/
onRemoteAudioSpectrum?(
Expand Down
17 changes: 2 additions & 15 deletions ts/Private/IAgoraMediaEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,7 @@ export abstract class IMediaEngine {
/**
* Registers a raw video frame observer object.
*
* If you want to obtain the original video data of some remote users (referred to as group A) and the encoded video data of other remote users (referred to as group B), you can refer to the following steps:
* Call registerVideoFrameObserver to register the raw video frame observer before joining the channel.
* Call registerVideoEncodedFrameObserver to register the encoded video frame observer before joining the channel.
* After joining the channel, get the user IDs of group B users through onUserJoined, and then call setRemoteVideoSubscriptionOptions to set the encodedFrameOnly of this group of users to true.
* Call muteAllRemoteVideoStreams (false) to start receiving the video streams of all remote users. Then:
* The raw video data of group A users can be obtained through the callback in IVideoFrameObserver, and the SDK renders the data by default.
* The encoded video data of group B users can be obtained through the callback in IVideoEncodedFrameObserver. If you want to observe raw video frames (such as YUV or RGBA format), Agora recommends that you implement one IVideoFrameObserver class with this method. When calling this method to register a video observer, you can register callbacks in the IVideoFrameObserver class as needed. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.
* If you want to observe raw video frames (such as YUV or RGBA format), Agora recommends that you implement one IVideoFrameObserver class with this method. When calling this method to register a video observer, you can register callbacks in the IVideoFrameObserver class as needed. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.
*
* @param observer The observer instance. See IVideoFrameObserver.
*
Expand All @@ -76,14 +70,7 @@ export abstract class IMediaEngine {
/**
* Registers a receiver object for the encoded video image.
*
* If you only want to observe encoded video frames (such as h.264 format) without decoding and rendering the video, Agora recommends that you implement one IVideoEncodedFrameObserver class through this method. If you want to obtain the original video data of some remote users (referred to as group A) and the encoded video data of other remote users (referred to as group B), you can refer to the following steps:
* Call registerVideoFrameObserver to register the raw video frame observer before joining the channel.
* Call registerVideoEncodedFrameObserver to register the encoded video frame observer before joining the channel.
* After joining the channel, get the user IDs of group B users through onUserJoined, and then call setRemoteVideoSubscriptionOptions to set the encodedFrameOnly of this group of users to true.
* Call muteAllRemoteVideoStreams (false) to start receiving the video streams of all remote users. Then:
* The raw video data of group A users can be obtained through the callback in IVideoFrameObserver, and the SDK renders the data by default.
* The encoded video data of group B users can be obtained through the callback in IVideoEncodedFrameObserver.
* Call this method before joining a channel.
* If you only want to observe encoded video frames (such as H.264 format) without decoding and rendering the video, Agora recommends that you implement one IVideoEncodedFrameObserver class through this method. Call this method before joining a channel.
*
* @param observer The video frame observer object. See IVideoEncodedFrameObserver.
*
Expand Down
15 changes: 8 additions & 7 deletions ts/Private/IAgoraMediaPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ export abstract class IMediaPlayer {
* @param index The index of the media stream. This parameter must be less than the return value of getStreamCount.
*
* @returns
* If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo.
* If the call fails, returns null.
* If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo. null, if the method call fails.
*/
abstract getStreamInfo(index: number): PlayerStreamInfo;

Expand All @@ -179,8 +178,8 @@ export abstract class IMediaPlayer {
*
* Call this method after calling open.
*
* @param speed The playback speed. Agora recommends that you limit this value to a range between 50 and 400, which is defined as follows:
* 50: Half the original speed.
* @param speed The playback speed. Agora recommends that you set this to a value between 30 and 400, defined as follows:
* 30: 0.3 times the original speed.
* 100: The original speed.
* 400: 4 times the original speed.
*
Expand Down Expand Up @@ -523,15 +522,15 @@ export abstract class IMediaPlayer {
*
* You can call this method to switch the media resource to be played according to the current network status. For example:
* When the network is poor, the media resource to be played is switched to a media resource address with a lower bitrate.
* When the network is good, the media resource to be played is switched to a media resource address with a higher bitrate. After calling this method, if you receive the PlayerEventSwitchComplete event in the onPlayerEvent callback, the switch is successful; If you receive the PlayerEventSwitchError event in the onPlayerEvent callback, the switch fails.
* When the network is good, the media resource to be played is switched to a media resource address with a higher bitrate. After calling this method, if you receive the onPlayerEvent callback report the PlayerEventSwitchComplete event, the switching is successful. If the switching fails, the SDK will automatically retry 3 times. If it still fails, you will receive the onPlayerEvent callback reporting the PlayerEventSwitchError event indicating an error occurred during media resource switching.
* Ensure that you call this method after open.
* To ensure normal playback, pay attention to the following when calling this method:
* Do not call this method when playback is paused.
* Do not call the seek method during switching.
* Before switching the media resource, make sure that the playback position does not exceed the total duration of the media resource to be switched.
*
* @param src The URL of the media resource.
* @param syncPts Whether to synchronize the playback position (ms) before and after the switch: true : Synchronize the playback position before and after the switch. false : (Default) Do not synchronize the playback position before and after the switch. Make sure to set this parameter as false if you need to play live streams, or the switch fails. If you need to play on-demand streams, you can set the value of this parameter according to your scenarios.
* @param syncPts Whether to synchronize the playback position (ms) before and after the switch: true : Synchronize the playback position before and after the switch. false : (Default) Do not synchronize the playback position before and after the switch.
*
* @returns
* 0: Success.
Expand All @@ -542,7 +541,9 @@ export abstract class IMediaPlayer {
/**
* Preloads a media resource.
*
* You can call this method to preload a media resource into the playlist. If you need to preload multiple media resources, you can call this method multiple times. After calling this method, if you receive the PlayerPreloadEventComplete event in the onPreloadEvent callback, the preload is successful; If you receive the PlayerPreloadEventError event in the onPreloadEvent callback, the preload fails. If the preload is successful and you want to play the media resource, call playPreloadedSrc; if you want to clear the playlist, call stop. Agora does not support preloading duplicate media resources to the playlist. However, you can preload the media resources that are being played to the playlist again.
* You can call this method to preload a media resource into the playlist. If you need to preload multiple media resources, you can call this method multiple times. After calling this method, if you receive the PlayerPreloadEventComplete event in the onPreloadEvent callback, the preload is successful; If you receive the PlayerPreloadEventError event in the onPreloadEvent callback, the preload fails. If the preload is successful and you want to play the media resource, call playPreloadedSrc; if you want to clear the playlist, call stop.
* Before calling this method, ensure that you have called open or openWithMediaSource to open the media resource successfully.
* Agora does not support preloading duplicate media resources to the playlist. However, you can preload the media resources that are being played to the playlist again.
*
* @param src The URL of the media resource.
* @param startPos The starting position (ms) for playing after the media resource is preloaded to the playlist. When preloading a live stream, set this parameter to 0.
Expand Down
6 changes: 3 additions & 3 deletions ts/Private/IAgoraMediaPlayerSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface IMediaPlayerSourceObserver {
*
* After calling the seek method, the SDK triggers the callback to report the results of the seek operation.
*
* @param eventCode The player events. See MediaPlayerEvent.
* @param eventCode The player event. See MediaPlayerEvent.
* @param elapsedTime The time (ms) when the event occurs.
* @param message Information about the event.
*/
Expand All @@ -64,8 +64,8 @@ export interface IMediaPlayerSourceObserver {
* Reports the playback duration that the buffered data can support.
*
* When playing online media resources, the SDK triggers this callback every two seconds to report the playback duration that the currently buffered data can support.
* When the playback duration supported by the buffered data is less than the threshold (0 by default), the SDK returns PlayerEventBufferLow.
* When the playback duration supported by the buffered data is greater than the threshold (0 by default), the SDK returns PlayerEventBufferRecover.
* When the playback duration supported by the buffered data is less than the threshold (0 by default), the SDK returns PlayerEventBufferLow (6).
* When the playback duration supported by the buffered data is greater than the threshold (0 by default), the SDK returns PlayerEventBufferRecover (7).
*
* @param playCachedBuffer The playback duration (ms) that the buffered data can support.
*/
Expand Down
14 changes: 1 addition & 13 deletions ts/Private/IAgoraMusicContentCenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,19 +223,7 @@ export interface IMusicContentCenterEventHandler {
): void;

/**
* 音乐资源的详细信息回调。
*
* 当你调用 getSongSimpleInfo 获取某一音乐资源的详细信息后,SDK 会触发该回调。
*
* @param reason 音乐内容中心的请求状态码,详见 MusicContentCenterStateReason 。
* @param requestId The request ID. 本次请求的唯一标识。
* @param songCode The code of the music, which is an unique identifier of the music.
* @param simpleInfo 音乐资源的相关信息,包含下列内容:
* 副歌片段的开始和结束的时间(ms)
* 副歌片段的歌词下载地址
* 副歌片段时长(ms)
* 歌曲名称
* 歌手名
* @ignore
*/
onSongSimpleInfoResult?(
requestId: string,
Expand Down
Loading

0 comments on commit f1bddc8

Please sign in to comment.