Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: ts-generator #897

Merged
merged 1 commit into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 129 additions & 3 deletions ts/Private/AgoraBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,36 @@ export enum ErrorCodeType {
ErrVdmCameraNotAuthorized = 1501,
}

/**
* @ignore
*/
export enum LicenseErrorType {
/**
* @ignore
*/
LicenseErrInvalid = 1,
/**
* @ignore
*/
LicenseErrExpire = 2,
/**
* @ignore
*/
LicenseErrMinutesExceed = 3,
/**
* @ignore
*/
LicenseErrLimitedPeriod = 4,
/**
* @ignore
*/
LicenseErrDiffDevices = 5,
/**
* @ignore
*/
LicenseErrInternal = 99,
}

/**
* The operation permissions of the SDK on the audio session.
*/
Expand Down Expand Up @@ -523,7 +553,15 @@ export enum InterfaceIdType {
/**
* @ignore
*/
AgoraIidMusicContentCenter = 13,
AgoraIidStateSync = 13,
/**
* @ignore
*/
AgoraIidMetachatService = 14,
/**
* @ignore
*/
AgoraIidMusicContentCenter = 15,
}

/**
Expand Down Expand Up @@ -1074,6 +1112,10 @@ export class EncodedVideoFrameInfo {
* The Unix timestamp (ms) for capturing the external encoded video frames.
*/
captureTimeMs?: number;
/**
* @ignore
*/
decodeTimeMs?: number;
/**
* The user ID to push the externally encoded video frame.
*/
Expand All @@ -1084,6 +1126,48 @@ export class EncodedVideoFrameInfo {
streamType?: VideoStreamType;
}

/**
* @ignore
*/
export enum CompressionPreference {
/**
* @ignore
*/
PreferLowLatency = 0,
/**
* @ignore
*/
PreferQuality = 1,
}

/**
* @ignore
*/
export enum EncodingPreference {
/**
* @ignore
*/
PreferAuto = -1,
/**
* @ignore
*/
PreferSoftware = 0,
/**
* @ignore
*/
PreferHardware = 1,
}

/**
* @ignore
*/
export class AdvanceOptions {
/**
* @ignore
*/
encodingPreference?: EncodingPreference;
}

/**
* Video mirror mode.
*/
Expand Down Expand Up @@ -1138,6 +1222,14 @@ export class VideoEncoderConfiguration {
* Sets the mirror mode of the published local video stream. It only affects the video that the remote user sees. See VideoMirrorModeType .By default, the video is not mirrored.
*/
mirrorMode?: VideoMirrorModeType;
/**
* @ignore
*/
compressionPreference?: CompressionPreference;
/**
* @ignore
*/
advanceOptions?: AdvanceOptions;
}

/**
Expand Down Expand Up @@ -1182,9 +1274,9 @@ export class SimulcastStreamConfig {
*/
dimensions?: VideoDimensions;
/**
* Video receive bitrate (Kbps). The default value is 65.
* @ignore
*/
bitrate?: number;
kBitrate?: number;
/**
* The capture frame rate (fps) of the local video. The default value is 5.
*/
Expand Down Expand Up @@ -1930,6 +2022,14 @@ export enum LocalVideoStreamError {
* @ignore
*/
LocalVideoStreamErrorScreenCaptureWindowNotSupported = 20,
/**
* @ignore
*/
LocalVideoStreamErrorScreenCaptureFailure = 21,
/**
* @ignore
*/
LocalVideoStreamErrorScreenCaptureNoPermission = 22,
}

/**
Expand Down Expand Up @@ -2887,6 +2987,10 @@ export enum ConnectionChangedReasonType {
* @ignore
*/
ConnectionChangedTooManyBroadcasters = 20,
/**
* @ignore
*/
ConnectionChangedLicenseVerifyFailed = 21,
}

/**
Expand Down Expand Up @@ -3470,6 +3574,24 @@ export enum VoiceConversionPreset {
VoiceChangerBass = 0x03010400,
}

/**
* @ignore
*/
export enum HeadphoneEqualizerPreset {
/**
* @ignore
*/
HeadphoneEqualizerOff = 0x00000000,
/**
* @ignore
*/
HeadphoneEqualizerOverear = 0x04000001,
/**
* @ignore
*/
HeadphoneEqualizerInear = 0x04000002,
}

/**
* Screen sharing configurations.
*/
Expand Down Expand Up @@ -4353,4 +4475,8 @@ export class SpatialAudioParams {
* @ignore
*/
speaker_attenuation?: number;
/**
* @ignore
*/
enable_doppler?: boolean;
}
9 changes: 9 additions & 0 deletions ts/Private/AgoraMediaBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,10 @@ export enum AudioFramePosition {
* @ignore
*/
AudioFramePositionBeforeMixing = 0x0008,
/**
* @ignore
*/
AudioFramePositionEarMonitoring = 0x0010,
}

/**
Expand Down Expand Up @@ -729,6 +733,11 @@ export interface IAudioFrameObserverBase {
* Reserved for future use.
*/
onMixedAudioFrame?(channelId: string, audioFrame: AudioFrame): boolean;

/**
* @ignore
*/
onEarMonitoringAudioFrame?(audioFrame: AudioFrame): boolean;
}

/**
Expand Down
36 changes: 18 additions & 18 deletions ts/Private/IAgoraMediaPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,24 @@ export abstract class IMediaPlayer {
*/
abstract selectAudioTrack(index: number): number;

/**
* Sets the private options for the media player.
* The media player supports setting private options by key and value. Under normal circumstances, you do not need to know the private option settings, and just use the default option settings.Ensure that you call this method before open .If you need to push streams with SEI into the CDN, callsetPlayerOptionInInt ("sei_data_with_uuid", 1); otherwise, the loss of SEI might occurs.
*
* @param key The key of the option.
*
* @param value The value of the key.
*
* @returns
* 0: Success.< 0: Failure.
*/
abstract setPlayerOptionInInt(key: string, value: number): number;

/**
* @ignore
*/
abstract setPlayerOptionInString(key: string, value: string): number;

/**
* @ignore
*/
Expand Down Expand Up @@ -517,24 +535,6 @@ export abstract class IMediaPlayer {
abstract unregisterVideoFrameObserver(
observer: IMediaPlayerVideoFrameObserver
): number;

/**
* Sets the private options for the media player.
* The media player supports setting private options by key and value. Under normal circumstances, you do not need to know the private option settings, and just use the default option settings.Ensure that you call this method before open .If you need to push streams with SEI into the CDN, callsetPlayerOptionInInt ("sei_data_with_uuid", 1); otherwise, the loss of SEI might occurs.
*
* @param key The key of the option.
*
* @param value The value of the key.
*
* @returns
* 0: Success.< 0: Failure.
*/
abstract setPlayerOptionInInt(key: string, value: number): number;

/**
* @ignore
*/
abstract setPlayerOptionInString(key: string, value: string): number;
}

/**
Expand Down
Loading