"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.WatermarkOptions = exports.VirtualBackgroundSource = exports.VideoEncoderConfiguration = exports.VideoDimensions = exports.VideoDenoiserOptions = exports.TranscodingUser = exports.SpatialAudioParams = exports.ScreenVideoParameters = exports.ScreenCaptureParameters = exports.ScreenAudioParameters = exports.RtcEngineContext = exports.RtcEngineConfig = exports.RhythmPlayerConfig = exports.Rectangle = exports.MediaRecorderConfiguration = exports.LowLightEnhanceOptions = exports.LogConfig = exports.LocalAccessPointConfiguration = exports.LiveTranscoding = exports.LiveInjectStreamConfig = exports.LastmileProbeConfig = exports.EncryptionConfig = exports.EchoTestConfiguration = exports.DataStreamConfig = exports.ContentInspectModule = exports.ContentInspectConfig = exports.ColorEnhanceOptions = exports.Color = exports.ClientRoleOptions = exports.ChannelMediaRelayConfiguration = exports.ChannelMediaOptions = exports.ChannelMediaInfo = exports.CameraCapturerConfiguration = exports.BeautyOptions = exports.AudioRecordingConfiguration = exports.AgoraImage = void 0;
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
/**
* The user information, including the user ID and user account.
*/
/**
* The video resolution.
*/
class VideoDimensions {
constructor(params) {
/**
* The width (px) of the video encoding resolution.
*/
_defineProperty(this, "width", void 0);
/**
* The height (px) of the video encoding resolution.
*/
_defineProperty(this, "height", void 0);
if (params) {
this.width = params.width;
this.height = params.height;
}
}
}
/**
* Definition of VideoEncoderConfiguration.
*/
exports.VideoDimensions = VideoDimensions;
class VideoEncoderConfiguration {
constructor(params) {
/**
* The video frame dimensions (px), which is used to specify the video quality and measured by the total number of pixels along a
* frame's width and height. The default value is 640 × 360.
* You can customize the dimension, or select from the following list:
*
* - 120x120
* - 160x120
* - 180x180
* - 240x180
* - 320x180
* - 240x240
* - 320x240
* - 424x240
* - 360x360
* - 480x360
* - 640x360
* - 480x480
* - 640x480
* - 840x480
* - 960x720
* - 1280x720
*
*
* **Note**
*
* - The value of the dimension does not indicate the orientation mode of the output ratio. For how to set the video orientation, see [
VideoOutputOrientationMode
]{@link VideoOutputOrientationMode}.
* - Whether 720p+ can be supported depends on the device. If the device cannot support 720p, the frame rate will be lower than the one listed in the table.
*
*
*/
_defineProperty(this, "dimensions", void 0);
/**
* The video frame rate (fps). The default value is 15. Users can either set the frame rate manually or choose from the following options.
* We do not recommend setting this to a value greater than 30.
*/
_defineProperty(this, "frameRate", void 0);
/**
* The minimum video encoder frame rate (fps). The default value is Min(-1) (the SDK uses the lowest encoder frame rate).
*/
_defineProperty(this, "minFrameRate", void 0);
/**
* Bitrate of the video (Kbps). Refer to the table below and set your bitrate. If you set a bitrate beyond the proper range, the SDK automatically adjusts it to a value within the range.
* You can also choose from the following options:
* - [`Standard`]{@link BitRate.Standard}: (Recommended) The standard bitrate mode. In this mode, the bitrates differ between the `LiveBroadcasting` and `Communication` profiles:
* - In the `Communication` profile, the video bitrate is the same as the base bitrate.
* - In the `LiveBroadcasting` profile, the video bitrate is twice the base bitrate.
* - [`Compatible`]{@link BitRate.Compatible}: The compatible bitrate mode. In this mode, the bitrate stays the same regardless of the profile. If you choose this mode for the `LiveBroadcasting` profile, the video frame rate may be lower than the set value.
*
* Agora uses different video codecs for different profiles to optimize the user experience. For example, the Communication profile prioritizes the smoothness while the `LiveBroadcasting` profile prioritizes the video quality (a higher bitrate). Therefore, We recommend setting this parameter as [`Standard`]{@link BitRate.Standard}.
*
* **Video Bitrate Table**
*
*
* Resolution |
* Frame rate (fps) |
* Base Bitrate (Kbps, for Communication) |
* Live Bitrate (Kbps, for Live Broadcasting) |
*
*
* 160*120 |
* 15 |
* 65 |
* 130 |
*
*
* 120*120 |
* 15 |
* 50 |
* 100 |
*
*
* 320*180 |
* 15 |
* 140 |
* 280 |
*
*
* 180*180 |
* 15 |
* 100 |
* 200 |
*
*
* 240*180 |
* 15 |
* 120 |
* 240 |
*
*
* 320*240 |
* 15 |
* 200 |
* 400 |
*
*
* 240*240 |
* 15 |
* 140 |
* 280 |
*
*
* 424*240 |
* 15 |
* 220 |
* 440 |
*
*
* 640*360 |
* 15 |
* 400 |
* 800 |
*
*
* 360*360 |
* 15 |
* 260 |
* 520 |
*
*
* 640*360 |
* 30 |
* 600 |
* 1200 |
*
*
* 360*360 |
* 30 |
* 400 |
* 800 |
*
*
* 480*360 |
* 15 |
* 320 |
* 640 |
*
*
* 480*360 |
* 30 |
* 490 |
* 980 |
*
*
* 640*480 |
* 15 |
* 500 |
* 1000 |
*
*
* 480*480 |
* 15 |
* 400 |
* 800 |
*
*
* 640*480 |
* 30 |
* 750 |
* 1500 |
*
*
* 480*480 |
* 30 |
* 600 |
* 1200 |
*
*
* 848*480 |
* 15 |
* 610 |
* 1220 |
*
*
* 848*480 |
* 30 |
* 930 |
* 1860 |
*
*
* 640*480 |
* 10 |
* 400 |
* 800 |
*
*
* 1280*720 |
* 15 |
* 1130 |
* 2260 |
*
*
* 1280*720 |
* 30 |
* 1710 |
* 3420 |
*
*
* 960*720 |
* 15 |
* 910 |
* 1820 |
*
*
* 960*720 |
* 30 |
* 1380 |
* 2760 |
*
*
*
* **Note**
*
* The base bitrate in this table applies to the Communication profile.
* The `LiveBroadcasting` profile generally requires a higher bitrate for better video quality.
* We recommend setting the bitrate mode as [`Standard`]{@link BitRate.Standard}. You can also set the bitrate as the base bitrate value × 2.
*/
_defineProperty(this, "bitrate", void 0);
/**
* The minimum encoding bitrate (Kbps). The Agora SDK automatically adjusts the encoding bitrate to adapt to the network conditions. Using a value greater than the default value forces the video encoder to output high-quality images but may cause more packet loss and hence sacrifice the smoothness of the video transmission. That said, unless you have special requirements for image quality,
* Agora does not recommend changing this value.
*/
_defineProperty(this, "minBitrate", void 0);
/**
* The orientation mode.
*/
_defineProperty(this, "orientationMode", void 0);
/**
* The video encoding degradation preference under limited bandwidth.
*/
_defineProperty(this, "degradationPrefer", void 0);
/**
* Sets the mirror mode of the published local video stream.
*/
_defineProperty(this, "mirrorMode", void 0);
if (params) {
this.dimensions = params.dimensions;
this.frameRate = params.frameRate;
this.minFrameRate = params.minFrameRate;
this.bitrate = params.bitrate;
this.minBitrate = params.minBitrate;
this.orientationMode = params.orientationMode;
this.degradationPrefer = params.degradationPrefer;
this.mirrorMode = params.mirrorMode;
}
}
}
/**
* Sets the image enhancement options.
*/
exports.VideoEncoderConfiguration = VideoEncoderConfiguration;
class BeautyOptions {
constructor(params) {
/**
* The contrast level, often used in conjunction with `lighteningLevel`.
* The higher the value, the greater the contrast level. See [`LighteningContrastLevel`]{@link LighteningContrastLevel}.
*/
_defineProperty(this, "lighteningContrastLevel", void 0);
/**
* The brightening level, in the range [0.0,1.0], where 0.0 means the original brightening. The default value is 0.6. The higher the value, the greater the brightening level.
*/
_defineProperty(this, "lighteningLevel", void 0);
/**
* The smoothness level, in the range [0.0,1.0], where 0.0 means the original smoothness.
* The default value is 0.5. The higher the value, the greater the smoothness level.
*/
_defineProperty(this, "smoothnessLevel", void 0);
/**
* The redness level, in the range [0.0,1.0], where 0.0 means the original redness.
* The default value is 0.1. The higher the value, the greater the redness level.
*/
_defineProperty(this, "rednessLevel", void 0);
/**
* The sharpness level, in the range [0.0,1.0], where 0.0 means the original sharpness.
* The default value is 0.3. The higher the value, the greater the sharpness level.
*
* @since v3.6.2
*/
_defineProperty(this, "sharpnessLevel", void 0);
if (params) {
this.lighteningContrastLevel = params.lighteningContrastLevel;
this.lighteningLevel = params.lighteningLevel;
this.smoothnessLevel = params.smoothnessLevel;
this.rednessLevel = params.rednessLevel;
this.sharpnessLevel = params.sharpnessLevel;
}
}
}
/**
* Agora image properties. A class for setting the properties of the watermark and background images.
*/
exports.BeautyOptions = BeautyOptions;
class AgoraImage {
constructor(url, params) {
/**
* HTTP/HTTPS URL address of the image on the broadcasting video. The maximum length of this parameter is 1024 bytes.
*/
_defineProperty(this, "url", void 0);
/**
* Position of the image on the upper left of the broadcasting video on the horizontal axis.
*/
_defineProperty(this, "x", void 0);
/**
* Position of the image on the upper left of the broadcasting video on the vertical axis.
*/
_defineProperty(this, "y", void 0);
/**
* Width of the image on the broadcasting video.
*/
_defineProperty(this, "width", void 0);
/**
* Height of the image on the broadcasting video.
*/
_defineProperty(this, "height", void 0);
/**
* The layer number of the watermark or background image.
*
* When you use the watermark array to add a watermark or multiple watermarks, you must pass a value to `zOrder` in the range [1,255];
* otherwise, the SDK reports an error. In other cases, `zOrder` can optionally be passed in the range [0,255],
* with 0 being the default value. `0` means the bottom layer and `255` means the top layer.
*
* @since v3.6.2
*/
_defineProperty(this, "zOrder", void 0);
/**
* The transparency of the watermark or background image. The value range is [0.0,1.0]:
* - `0.0`: Completely transparent.
* - `1.0`: (Default) Opaque.
*
* @since v3.6.2
*/
_defineProperty(this, "alpha", void 0);
this.url = url;
if (params) {
this.x = params.x;
this.y = params.y;
this.width = params.width;
this.height = params.height;
this.zOrder = params.zOrder;
this.alpha = params.alpha;
}
}
}
/**
* The transcodingUser class, which defines the audio and video properties in the CDN live. Agora supports a maximum of 17 transcoding users in a CDN live streaming channel.
*/
exports.AgoraImage = AgoraImage;
class TranscodingUser {
constructor(uid, params) {
/**
* ID of the user in the CDN live streaming.
*/
_defineProperty(this, "uid", void 0);
/**
* Horizontal position of the video frame of the user from the top left corner of the CDN live streaming.
*/
_defineProperty(this, "x", void 0);
/**
* Vertical position of the video frame of the user from the top left corner of the CDN live streaming.
*/
_defineProperty(this, "y", void 0);
/**
* Width of the video frame of the user on the CDN live streaming. The default value is 360.
*/
_defineProperty(this, "width", void 0);
/**
* Height of the video frame of the user on the CDN live streaming. The default value is 640.
*/
_defineProperty(this, "height", void 0);
/**
* Layer position of video frame of the user on the CDN live streaming. The value ranges between 0 and 100. From v2.3.0, Agora SDK supports setting zOrder as 0. The smallest value is 0 (default value), which means that the video frame is at the bottom layer. The biggest value is 100, which means that the video frame is at the top layer.
*/
_defineProperty(this, "zOrder", void 0);
/**
* The transparency of the video frame of the user in the CDN live streaming that ranges between 0.0 and 1.0. 0.0 means that the video frame is completely transparent and 1.0 means opaque. The default value is 1.0.
*/
_defineProperty(this, "alpha", void 0);
/**
* The audio channel ranging between 0 and 5. The default value is 0.
*
* - 0: (default) Supports dual channels. Depends on the upstream of the broadcaster.
* - 1: The audio stream of the broadcaster uses the FL audio channel. If the broadcaster’s upstream uses multiple audio channels, these channels are mixed into mono first.
* - 2: The audio stream of the broadcaster uses the FC audio channel. If the broadcaster’s upstream uses multiple audio channels, these channels are mixed into mono first.
* - 3: The audio stream of the broadcaster uses the FR audio channel. If the broadcaster’s upstream uses multiple audio channels, these channels are mixed into mono first.
* - 4: The audio stream of the broadcaster uses the BL audio channel. If the broadcaster’s upstream uses multiple audio channels, these channels are mixed into mono first.
* - 5: The audio stream of the broadcaster uses the BR audio channel. If the broadcaster’s upstream uses multiple audio channels, these channels are mixed into mono first.
*
* **Note**
*
* Special players are needed if `audioChannel` is not set as 0.
*/
_defineProperty(this, "audioChannel", void 0);
this.uid = uid;
if (params) {
this.x = params.x;
this.y = params.y;
this.width = params.width;
this.height = params.height;
this.zOrder = params.zOrder;
this.alpha = params.alpha;
this.audioChannel = params.audioChannel;
}
}
}
/**
* Color for [`VirtualBackgroundSource`]{@link VirtualBackgroundSource}
*/
exports.TranscodingUser = TranscodingUser;
class Color {
/**
* Create a color for [`VirtualBackgroundSource`]{@link VirtualBackgroundSource}
* @param red Red value (0 - 255)
* @param green Green value (0 - 255)
* @param blue Blue value (0 - 255)
*/
constructor(red, green, blue) {
/**
* Red value (0 - 255)
*/
_defineProperty(this, "red", void 0);
/**
* Green value (0 - 255)
*/
_defineProperty(this, "green", void 0);
/**
* Blue value (0 - 255)
*/
_defineProperty(this, "blue", void 0);
this.red = red;
this.green = green;
this.blue = blue;
}
}
/**
* A class for managing user-specific CDN live audio/video transcoding settings.
*/
exports.Color = Color;
class LiveTranscoding {
constructor(transcodingUsers, params) {
/**
* Width (pixel) of the video. The default value is 360.
* - When pushing video streams to the CDN, the value range of `width` is [64,1920]. If the value is less than 64, Agora server automatically adjusts it to 64; if the value is greater than 1920, Agora server automatically adjusts it to 1920.
* - If you push audio streams to the CDN, set the value of width × height to 0 × 0.
*/
_defineProperty(this, "width", void 0);
/**
* Height (pixel) of the video. The default value is 640.
* - When pushing video streams to the CDN, the value range of `height` is [64,1080]. If the value is less than 64, Agora server automatically adjusts it to 64; if the value is greater than 1080, Agora server automatically adjusts it to 1080.
* - If you push audio streams to the CDN, set the value of width × height to 0 × 0.
*/
_defineProperty(this, "height", void 0);
/**
* Bitrate (Kbps) of the CDN live output video stream. The default value is 400. Set this parameter according to the Video Bitrate Table. If you set a bitrate beyond the proper range,
* the SDK automatically adapts it to a value within the range.
*/
_defineProperty(this, "videoBitrate", void 0);
/**
* Frame rate (fps) of the CDN live output video stream.
* The value range is [0,30]. The default value is 15. Agora adjusts all values over 30 to 30.
*/
_defineProperty(this, "videoFramerate", void 0);
/**
* @deprecated
* - `true`: Low latency with unassured quality.
* - `false`: (Default) High latency with assured quality.
*/
_defineProperty(this, "lowLatency", void 0);
/**
* Gop of the video frames in the CDN live stream. The default value is 30 fps.
*/
_defineProperty(this, "videoGop", void 0);
/**
* The watermark on the live video. The image format must be PNG.
*/
_defineProperty(this, "watermark", void 0);
/**
* The array of watermarks on the live video. You can use `watermarkList` to add one or more watermarks.
* The image format must be PNG.
*
* The total number of watermarks and background images on the live video must be greater than or equal to 0 and less than or equal to 10.
*
* @since v3.6.2
*/
_defineProperty(this, "watermarkList", void 0);
/**
* The background image on the live video. The format must be in the PNG format.
*/
_defineProperty(this, "backgroundImage", void 0);
/**
* The array of background images on the live video. You can use `backgroundImageList` to add one or more background images. The image format must be PNG.
* The total number of watermarks and background images on the live video must be greater than or equal to 0 and less than or equal to 10.
*
* @since v3.6.2
*/
_defineProperty(this, "backgroundImageList", void 0);
/**
* Self-defined audio-sample rate: AudioSampleRateType.
*/
_defineProperty(this, "audioSampleRate", void 0);
/**
* Bitrate (Kbps) of the CDN live audio output stream. The default value is 48 and the highest value is 128.
*/
_defineProperty(this, "audioBitrate", void 0);
/**
* The number of audio channels for the CDN live stream.
*
* Agora recommends choosing 1 (mono), or 2 (stereo) audio channels. Special players are required if you choose 3, 4, or 5.
* - 1: (Default) Mono
* - 2: Stereo
* - 3: Three audio channels
* - 4: Four audio channels
* - 5: Five audio channels
*/
_defineProperty(this, "audioChannels", void 0);
/**
* Audio codec profile type: AudioCodecProfileType. Set it as LC-AAC or HE-AAC. The default value is LC-AAC.
*/
_defineProperty(this, "audioCodecProfile", void 0);
/**
* Video codec profile type: VideoCodecProfileType. Set it as BASELINE, MAIN, or HIGH (default). If you set this parameter to other values, Agora adjusts it to the default value HIGH.
*/
_defineProperty(this, "videoCodecProfile", void 0);
/**
* The video codec type of the output video stream.
*
* @since v3.2.0
*/
_defineProperty(this, "videoCodecType", void 0);
/**
* Sets the background color.
*/
_defineProperty(this, "backgroundColor", void 0);
/**
* Reserved property. Extra user-defined information to send the Supplemental Enhancement Information (SEI) for the H.264/H.265 video stream to the CDN live client. Maximum length: 4096 Bytes.
*/
_defineProperty(this, "userConfigExtraInfo", void 0);
/**
* The metadata sent to the CDN live client.
*
* @deprecated This property is deprecated.
*/
_defineProperty(this, "metadata", void 0);
/**
* An TranscodingUser object managing the user layout configuration in the CDN live stream. Agora supports a maximum of 17 transcoding users in a CDN live stream channel.
*/
_defineProperty(this, "transcodingUsers", void 0);
/**
* @ignore
*/
_defineProperty(this, "advancedFeatures", void 0);
if (params) {
this.width = params.width;
this.height = params.height;
this.videoBitrate = params.videoBitrate;
this.videoFramerate = params.videoFramerate;
this.lowLatency = params.lowLatency;
this.videoGop = params.videoGop;
this.watermark = params.watermark;
this.watermarkList = params.watermarkList;
this.backgroundImage = params.backgroundImage;
this.backgroundImageList = params.backgroundImageList;
this.audioSampleRate = params.audioSampleRate;
this.audioBitrate = params.audioBitrate;
this.audioChannels = params.audioChannels;
this.audioCodecProfile = params.audioCodecProfile;
this.videoCodecProfile = params.videoCodecProfile;
this.videoCodecType = params.videoCodecType;
this.backgroundColor = params.backgroundColor;
this.userConfigExtraInfo = params.userConfigExtraInfo;
this.metadata = params.metadata;
this.advancedFeatures = params.advancedFeatures;
}
this.transcodingUsers = transcodingUsers;
}
}
/**
* The ChannelMediaInfo class.
*/
exports.LiveTranscoding = LiveTranscoding;
class ChannelMediaInfo {
constructor(channelName, uid, params) {
/**
* The channel name.
*/
_defineProperty(this, "channelName", void 0);
/**
* The token that enables the user to join the channel.
*/
_defineProperty(this, "token", void 0);
/**
* The user ID.
*/
_defineProperty(this, "uid", void 0);
this.channelName = channelName;
if (params) {
this.token = params.token;
}
this.uid = uid;
}
}
/**
* The ChannelMediaRelayConfiguration class.
*/
exports.ChannelMediaInfo = ChannelMediaInfo;
class ChannelMediaRelayConfiguration {
constructor(srcInfo, destInfos) {
/**
* The information of the source channel: [`ChannelMediaInfo`]{@link ChannelMediaInfo}. It contains the following members:
* - `channelName`: The name of the source channel. The default value is null, which means the SDK applies the name of the current channel.
* - `uid`: ID of the host whose media stream you want to relay. The default value is 0, which means the SDK generates a random UID. You must set it as 0.
* - `token`: The token for joining the source channel. It is generated with the `channelName` and `uid` you set in `srcInfo`.
* - If you have not enabled the App Certificate, set this parameter as the default value null, which means the SDK applies the App ID.
* - If you have enabled the App Certificate, you must use the token generated with the `channelName` and `uid`, and the `uid` must be set as 0.
*/
_defineProperty(this, "srcInfo", void 0);
/**
* The information of the destination channel: [`ChannelMediaInfo`]{@link ChannelMediaInfo}. It contains the following members:
* - `channelName`: The name of the destination channel.
* - `uid`: ID of the host in the destination channel. The value ranges from 0 to (232-1). To avoid UID conflicts, this uid must be different from any other UIDs in the destination channel. The default value is 0, which means the SDK generates a random UID.
* - `token`: The token for joining the source channel. It is generated with the `channelName` and `uid` you set in `destInfo`.
* - If you have not enabled the App Certificate, set this parameter as the default value null, which means the SDK applies the App ID.
* - If you have enabled the App Certificate, you must use the token generated with the `channelName` and `uid`, and the `uid` must be set as 0.
*/
_defineProperty(this, "destInfos", void 0);
this.srcInfo = srcInfo;
this.destInfos = destInfos;
}
}
/**
* Lastmile probe configuration.
*/
exports.ChannelMediaRelayConfiguration = ChannelMediaRelayConfiguration;
class LastmileProbeConfig {
constructor(probeUplink, probeDownlink, expectedUplinkBitrate, expectedDownlinkBitrate) {
/**
* Whether to probe uplink of lastmile. i.e., audience don't need probe uplink bandwidth.
*/
_defineProperty(this, "probeUplink", void 0);
/**
* Whether to probe downlink of lastmile.
*/
_defineProperty(this, "probeDownlink", void 0);
/**
* The expected maximum sending bitrate in bps in range of [100000,5000000]. It is recommended to set this value according to the required bitrate of selected video profile.
*/
_defineProperty(this, "expectedUplinkBitrate", void 0);
/**
* The expected maximum receive bitrate in bps in range of [100000,5000000].
*/
_defineProperty(this, "expectedDownlinkBitrate", void 0);
this.probeUplink = probeUplink;
this.probeDownlink = probeDownlink;
this.expectedUplinkBitrate = expectedUplinkBitrate;
this.expectedDownlinkBitrate = expectedDownlinkBitrate;
}
}
/**
* The position and size of the watermark image.
*/
exports.LastmileProbeConfig = LastmileProbeConfig;
class Rectangle {
constructor(params) {
/**
* The horizontal offset from the top-left corner.
*/
_defineProperty(this, "x", void 0);
/**
* The vertical offset from the top-left corner.
*/
_defineProperty(this, "y", void 0);
/**
* The width (pixels) of the watermark image.
*/
_defineProperty(this, "width", void 0);
/**
* The height (pixels) of the watermark image.
*/
_defineProperty(this, "height", void 0);
if (params) {
this.x = params.x;
this.y = params.y;
this.width = params.width;
this.height = params.height;
}
}
}
/**
* Agora watermark options. A class for setting the properties of watermark.
*/
exports.Rectangle = Rectangle;
class WatermarkOptions {
constructor(params) {
/**
* Sets whether or not the watermark image is visible in the local video preview:
* - `true`: (Default) The watermark image is visible in preview.
* - `false`: The watermark image is not visible in preview.
*/
_defineProperty(this, "visibleInPreview", void 0);
/**
* The watermark position in the landscape mode.
*/
_defineProperty(this, "positionInLandscapeMode", void 0);
/**
* The watermark position in the portrait mode.
*/
_defineProperty(this, "positionInPortraitMode", void 0);
if (params) {
this.visibleInPreview = params.visibleInPreview;
this.positionInLandscapeMode = params.positionInLandscapeMode;
this.positionInPortraitMode = params.positionInPortraitMode;
}
}
}
/**
* Configuration of the imported live interactive voice or video stream.
*/
exports.WatermarkOptions = WatermarkOptions;
class LiveInjectStreamConfig {
constructor(params) {
/**
* Width (pixels) of the added stream to the live interactive streaming. The default value is 0, which is the same width as the original stream.
*/
_defineProperty(this, "width", void 0);
/**
* Height (pixels) of the added stream to the live interactive streaming. The default value is 0, which is the same height as the original stream.
*/
_defineProperty(this, "height", void 0);
/**
* Video GOP of the added stream to the live interactive streaming. The default value is 30 frames.
*/
_defineProperty(this, "videoGop", void 0);
/**
* Video frame rate of the added stream to the live interactive streaming. The default value is 15 fps.
*/
_defineProperty(this, "videoFramerate", void 0);
/**
* Video bitrate of the added stream to the live interactive streaming. The default value is 400 Kbps.
*
* **Note**
*
* The setting of the video bitrate is closely linked to the resolution. If you set the video bitrate beyond a reasonable range, the SDK sets it within a reasonable range instead.
*/
_defineProperty(this, "videoBitrate", void 0);
/**
* Audio sample rate of the added stream to the live interactive streaming. The default value is 44100 Hz.
*
* **Note**
*
* We recommend you use the default value and not reset it.
*/
_defineProperty(this, "audioSampleRate", void 0);
/**
* Audio bitrate of the added stream to the live interactive streaming. The default value is 48 Kbps.
*
* **Note**
*
* We recommend you use the default value and not reset it.
*/
_defineProperty(this, "audioBitrate", void 0);
/**
* Audio channels to add into the live streaming. The value ranges between 1 and 2. The default value is 1.
*
* **Note**
*
* We recommend you use the default value and not reset it.
*/
_defineProperty(this, "audioChannels", void 0);
if (params) {
this.width = params.width;
this.height = params.height;
this.videoGop = params.videoGop;
this.videoFramerate = params.videoFramerate;
this.videoBitrate = params.videoBitrate;
this.audioSampleRate = params.audioSampleRate;
this.audioBitrate = params.audioBitrate;
this.audioChannels = params.audioChannels;
}
}
}
/**
* The metronome configuration, which is set in [`startRhythmPlayer`]{@link startRhythmPlayer} or [`configRhythmPlayer`]{@link configRhythmPlayer}.
*
* @since v3.4.2
*/
exports.LiveInjectStreamConfig = LiveInjectStreamConfig;
class RhythmPlayerConfig {
constructor(params) {
/**
* The number of beats per measure. The range is 1 to 9. The default value is 4, which means that each measure contains one downbeat and three upbeats.
*/
_defineProperty(this, "beatsPerMeasure", void 0);
/**
* Tempo (beats per minute). The range is 60 to 360. The default value is 60, which means that the metronome plays 60 beats in one minute.
*/
_defineProperty(this, "beatsPerMinute", void 0);
/**
* Whether to publish the sound of the metronome to remote users:
* - `true`: (Default) Publish. Both the local user and remote users can hear the metronome.
* - `false`: Do not publish. Only the local user can hear the metronome.
*/
_defineProperty(this, "publish", void 0);
if (params) {
this.beatsPerMeasure = params.beatsPerMeasure;
this.beatsPerMinute = params.beatsPerMinute;
this.publish = params.publish;
}
}
}
/**
* The definition of CameraCapturerConfiguration.
*/
exports.RhythmPlayerConfig = RhythmPlayerConfig;
class CameraCapturerConfiguration {
constructor(params) {
/**
* The camera capture preference.
*/
_defineProperty(this, "preference", void 0);
/**
* The width (px) of the video image captured by the local camera. To customize the width of the video image, set `preference` as [`Manual`]{@link CameraCaptureOutputPreference.Manual} first, and then use `captureWidth`.
*
* @since v3.3.1.
*/
_defineProperty(this, "captureWidth", void 0);
/**
* The height (px) of the video image captured by the local camera. To customize the height of the video image, set `preference` as [`Manual`]{@link CameraCaptureOutputPreference.Manual} first, and then use `captureHeight`.
*
* @since v3.3.1.
*/
_defineProperty(this, "captureHeight", void 0);
/**
* The camera direction.
*/
_defineProperty(this, "cameraDirection", void 0);
if (params) {
this.preference = params.preference;
this.captureWidth = params.captureWidth;
this.captureHeight = params.captureHeight;
this.cameraDirection = params.cameraDirection;
}
}
}
/**
* The channel media options.
*/
exports.CameraCapturerConfiguration = CameraCapturerConfiguration;
class ChannelMediaOptions {
constructor(params) {
/**
* Determines whether to subscribe to audio streams when the user joins the channel.
* - `true`: (Default) Subscribe.
* - `false`: Do not subscribe.
*
* This member serves a similar function to the [`muteAllRemoteAudioStreams`]{@link RtcEngine.muteAllRemoteAudioStreams} method. After joining the channel, you can call the `muteAllRemoteAudioStreams` method to set whether to subscribe to audio streams in the channel.
*/
_defineProperty(this, "autoSubscribeAudio", void 0);
/**
* Determines whether to subscribe to video streams when the user joins the channel.
* - `true`: (Default) Subscribe.
* - `false`: Do not subscribe.
*
* This member serves a similar function to the [`muteAllRemoteVideoStreams`]{@link RtcEngine.muteAllRemoteVideoStreams} method. After joining the channel, you can call the `muteAllRemoteVideoStreams` method to set whether to subscribe to audio streams in the channel.
*/
_defineProperty(this, "autoSubscribeVideo", void 0);
/**
* Determines whether to publish the local audio stream when the user joins a channel:
* - `true`: (Default) Publish.
* - `false`: Do not publish.
*
* This member serves a similar function to the [`muteLocalAudioStream`]{@link RtcEngine.muteLocalAudioStream} method.
* After the user joins the channel, you can call the `muteLocalAudioStream` method to set whether to publish the local audio stream in the channel.
*
* @since v3.4.5
*/
_defineProperty(this, "publishLocalAudio", void 0);
/**
* Determines whether to publish the local video stream when the user joins a channel:
* - `true`: (Default) Publish.
* - `false`: Do not publish.
*
* This member serves a similar function to the [`muteLocalVideoStream`]{@link RtcEngine.muteLocalVideoStream} method.
* After the user joins the channel, you can call the `muteLocalVideoStream` method to set whether to publish the local video stream in the channel.
*
* @since v3.4.5
*/
_defineProperty(this, "publishLocalVideo", void 0);
if (params) {
this.autoSubscribeAudio = params.autoSubscribeAudio;
this.autoSubscribeVideo = params.autoSubscribeVideo;
this.publishLocalAudio = params.publishLocalAudio;
this.publishLocalVideo = params.publishLocalVideo;
}
}
}
/**
* Definition of `EncryptionConfig`.
*
* @since v3.1.2.
*/
exports.ChannelMediaOptions = ChannelMediaOptions;
class EncryptionConfig {
constructor(params) {
/**
* Encryption mode. The default encryption mode is `AES128GCM2`.
* See [`EncryptionMode`]{@link EncryptionMode}.
*/
_defineProperty(this, "encryptionMode", void 0);
/**
* Encryption key in string type with unlimited length. Agora recommends using a 32-byte key.
*
* **Note**
*
* If you do not set an encryption key or set it as null, you cannot use the built-in encryption, and the SDK returns [`InvalidArgument(2)`]{@link ErrorCode.InvalidArgument}.
*/
_defineProperty(this, "encryptionKey", void 0);
/**
* The salt with the length of 32 bytes. Agora recommends using OpenSSL to generate the salt on your server.
* For details, see *Media Stream Encryption*.
*
* @since v3.4.5
*
* Note: This parameter is only valid when you set the encryption mode as `AES128GCM2` or `AES256GCM2`.
* Ensure that this parameter meets the following requirements:
* - Android: This parameter is not 0.
* - iOS: This parameter is not nil or 0, and the data length is 32 bytes.
*/
_defineProperty(this, "encryptionKdfSalt", void 0);
if (params) {
this.encryptionMode = params.encryptionMode;
this.encryptionKey = params.encryptionKey;
this.encryptionKdfSalt = params.encryptionKdfSalt;
}
}
}
/**
* Statistics of the call.
*/
/**
* Properties of the audio volume information. An array containing the user ID and volume information for each speaker.
*/
/**
* The rectangular area.
*/
/**
* The one-way last-mile probe result.
*/
/**
* Statistics of the lastmile probe.
*/
/**
* Statistics of the local audio stream.
*/
/**
* Statistics of the local video.
*/
/**
* Statistics of the remote audio.
*/
/**
* Statistics of the remote video.
*/
/**
* The information of the detected human face.
*/
exports.EncryptionConfig = EncryptionConfig;
/**
* The detailed options of a user.
*
* @since v3.2.0.
*/
class ClientRoleOptions {
constructor(params) {
/**
* The latency level of an audience member in a live interactive streaming. See {@link AudienceLatencyLevelType}.
*/
_defineProperty(this, "audienceLatencyLevel", void 0);
if (params) {
this.audienceLatencyLevel = params.audienceLatencyLevel;
}
}
}
/**
* Log file configurations.
*
* @since v3.3.1.
*/
exports.ClientRoleOptions = ClientRoleOptions;
class LogConfig {
constructor(params) {
/**
* The absolute path of log files. The default file path is as follows:
* - Android: `/storage/emulated/0/Android/data//files/agorasdk.log`
* - iOS: `App Sandbox/Library/caches/agorasdk.log`
* Ensure that the directory for the log files exists and is writable. You can use this parameter to rename the log files.
*/
_defineProperty(this, "filePath", void 0);
/**
* The size (KB) of a log file. The default value is 1024 KB. If you set `fileSize` to 1024 KB, the SDK outputs at most 5 MB log files; if you set it to less than 1024 KB, the setting is invalid, and the maximum size of a log file is still 1024 KB.
*/
_defineProperty(this, "fileSize", void 0);
/**
* The output log level of the SDK.
*
* For example, if you set the log level to `WARN`, the SDK outputs the logs within levels `FATAL`, `ERROR`, and `WARN`.
*
* See [`LogLevel`]{@link enum LogLevel}.
*/
_defineProperty(this, "level", void 0);
if (params) {
this.filePath = params.filePath;
this.fileSize = params.fileSize;
this.level = params.level;
}
}
}
/**
* The configurations for the data stream.
*
* @since v3.3.1
*
* | `syncWithAudio` | `ordered` | SDK behaviors |
* | :-------------- | :-------- | :----------------------------------------------------------- |
* | `false` | `false` | The SDK triggers the `StreamMessage` callback immediately after the receiver receives a data packet. |
* | `true` | `false` | - If the data packet delay is within the audio delay, the SDK triggers the
StreamMessage
callback when the synchronized audio packet is played out - If the data packet delay exceeds the audio delay, the SDK triggers the
StreamMessage
callback as soon as the data packet is received. In this case, the data packet is not synchronized with the audio packet.
. |
* | `false` | `true` | - If the delay of a data packet is within five seconds, the SDK corrects the order of the data packet.
- If the delay of a data packet exceeds five seconds, the SDK discards the data packet.
|
* | `true` | `true` | - If the delay of a data packet is within the audio delay, the SDK corrects the order of the data packet.
- If the delay of a data packet exceeds the audio delay, the SDK discards this data packet.
|
*/
exports.LogConfig = LogConfig;
class DataStreamConfig {
constructor(syncWithAudio, ordered) {
/**
* Whether to synchronize the data packet with the published audio packet.
* - `true`: Synchronize the data packet with the audio packet.
* - `false`: Do not synchronize the data packet with the audio packet.
*
* When you set the data packet to synchronize with the audio, then if the data packet delay is within the audio delay range, the SDK triggers the [`StreamMessage`]{@link RtcEngineEvents.StreamMessage} callback when the synchronized audio packet is played out. Do not set this parameter as `true` if you need the receiver to receive the data packet immediately. Agora recommends that you set this parameter to `true` only when you need to implement specific functions, for example lyric synchronization.
*/
_defineProperty(this, "syncWithAudio", void 0);
/**
* Whether the SDK guarantees that the receiver receives the data in the sent order.
* - `true`: Guarantee that the receiver receives the data in the sent order.
* - `false`: Do not guarantee that the receiver receives the data in the sent order.
*
* Do not set this parameter to `true` if you need the receiver to receive the data immediately.
*/
_defineProperty(this, "ordered", void 0);
this.syncWithAudio = syncWithAudio;
this.ordered = ordered;
}
}
/**
* Configurations for the [`RtcEngine`]{@link RtcEngine}.
*
* @since v3.4.5
*/
exports.DataStreamConfig = DataStreamConfig;
class RtcEngineContext {
constructor(appId, params) {
/**
* The App ID issued to you by Agora. See [How to get the App ID](https://docs.agora.io/en/Agora%20Platform/token#get-an-app-id).
* Only users in apps with the same App ID can join the same channel and communicate with each other. Use an App ID to create only
* one `IRtcEngine` instance. To change your App ID, call `release` to destroy the current `IRtcEngine` instance and then call `createAgoraRtcEngine`
* and `initialize` to create an `IRtcEngine` instance with the new App ID.
*/
_defineProperty(this, "appId", void 0);
/**
* The region for connection. This advanced feature applies to scenarios that have regional restrictions.
*
* For the regions that Agora supports, see [`AreaCode`]{@link AreaCode}. The area codes support bitwise operation.
*
* After specifying the region, the SDK connects to the Agora servers within that region.
*
*/
_defineProperty(this, "areaCode", void 0);
/**
* The configuration of the log files that the SDK outputs. See [`LogConfig`]{@link LogConfig}.
*
* By default, the SDK outputs five log files, `agorasdk.log`, `agorasdk_1.log`, `agorasdk_2.log`, `agorasdk_3.log`, `agorasdk_4.log`, each with a default size of 1024 KB. These log files are encoded in UTF-8. The SDK writes the latest logs in `agorasdk.log`. When `agorasdk.log` is full, the SDK deletes the log file with the earliest modification time among the other four, renames `agorasdk.log` to the name of the deleted log file, and creates a new `agorasdk.log` to record latest logs.
*
* The log file records all log data for the SDK’s operation. Ensure that the directory for the log file exists and is writable.
*/
_defineProperty(this, "logConfig", void 0);
this.appId = appId;
if (params) {
this.areaCode = params.areaCode;
this.logConfig = params.logConfig;
}
}
}
/**
*
* Configurations for the [`RtcEngine`]{@link RtcEngine}.
*
* @deprecated As of v3.4.5, this class is deprecated. Use [`RtcEngineContext`]{@link RtcEngineContext} instead.
*
* @since v3.3.1
*/
exports.RtcEngineContext = RtcEngineContext;
class RtcEngineConfig extends RtcEngineContext {}
/**
* Recording configuration, which is set in [`startAudioRecordingWithConfig`]{@link startAudioRecordingWithConfig}.
*/
exports.RtcEngineConfig = RtcEngineConfig;
class AudioRecordingConfiguration {
constructor(filePath, params) {
/**
*
* The absolute path (including the filename extensions) of the recording file. For example:
* - On Android: `/sdcard/emulated/0/audio.aac`.
* - On iOS: `/var/mobile/Containers/Data/audio.aac`.
*
* **Note**
* Ensure that the path you specify exists and is writable.
*/
_defineProperty(this, "filePath", void 0);
/**
* Audio recording quality. See [`AudioRecordingQuality`]{@link AudioRecordingQuality}.
*
* **Note** This parameter applies to AAC files only.
*/
_defineProperty(this, "recordingQuality", void 0);
/**
* Recording content. See [`AudioRecordingPosition`]{@link AudioRecordingPosition}.
*/
_defineProperty(this, "recordingPosition", void 0);
/**
* Recording sample rate (Hz). The following values are supported:
* - 16000
* - (Default) 32000
* - 44100
* - 48000
*
* **Note**
* If this parameter is set to `44100` or `48000`, for better recording effects, Agora recommends recording WAV files or AAC files whose `recordingQuality` is `Medium` or `High`.
*
*/
_defineProperty(this, "recordingSampleRate", void 0);
/**
* The recorded audio channel. The following values are supported:
* - `1`: (Default) Mono channel.
* - `2`: Dual channel.
*
* @since v3.6.2
*/
_defineProperty(this, "recordingChannel", void 0);
this.filePath = filePath;
if (params) {
this.recordingQuality = params.recordingQuality;
this.recordingPosition = params.recordingPosition;
this.recordingSampleRate = params.recordingSampleRate;
this.recordingChannel = params.recordingChannel;
}
}
}
/**
* The custom background image.
*
* @since v3.5.0.3
*/
exports.AudioRecordingConfiguration = AudioRecordingConfiguration;
class VirtualBackgroundSource {
constructor(params) {
/**
* The type of the custom background image. See [`VirtualBackgroundSourceType`]{@link VirtualBackgroundSourceType}.
*/
_defineProperty(this, "backgroundSourceType", void 0);
/**
* The color of the custom background image.
* The format is a hexadecimal integer defined by RGB, without the # sign, such as 0xFFB6C1 for light pink.
* The default value is 0xFFFFFF, which signifies white. The value range is [0x000000,0xffffff]. If the value is invalid, the SDK replaces the original background image with a white background image.
*
* **Note**
* This parameter takes effect only when the type of the custom background image is `Color`.
*/
_defineProperty(this, "color", void 0);
/**
* The local absolute path of the custom background image. PNG and JPG formats are supported.
* If the path is invalid, the SDK replaces the original background image with a white background image.
*
* **Note**
* This parameter takes effect only when the type of the custom background image is `Img`.
*/
_defineProperty(this, "source", void 0);
/**
* The degree of blurring applied to the custom background image. See [`VirtualBackgroundBlurDegree`]{@link VirtualBackgroundBlurDegree}.
*
* **Since** v3.5.2
*/
_defineProperty(this, "blur_degree", void 0);
if (params) {
this.backgroundSourceType = params.backgroundSourceType;
this.color = params.color;
this.source = params.source;
this.blur_degree = params.blur_degree;
}
}
}
/**
* The information of an audio file, which is reported in [`RequestAudioFileInfo`]{@link RequestAudioFileInfo}.
*
* @since v3.5.2
*/
exports.VirtualBackgroundSource = VirtualBackgroundSource;
/**
* The configuration of the audio call loop test.
*
* @since v3.5.2
*/
class EchoTestConfiguration {
constructor(params) {
/**
* Whether to enable the audio device for the call loop test:
* - true: (Default) Enables the audio device. To test the audio device, set this parameter as `true`.
* - false: Disables the audio device.
*/
_defineProperty(this, "enableAudio", void 0);
/**
* Reversed for future use.
*/
_defineProperty(this, "enableVideo", void 0);
/**
* The token used to secure the audio call loop test. If you do not enable App Certificate in Agora
* Console, you do not need to pass a value in this parameter; if you have enabled App Certificate in Agora Console,
* you must pass a token in this parameter, the `uid` used when you generate the token must be 0xFFFFFFFF, and the
* channel name used must be the channel name that identifies each audio loop tested. For server-side
* token generation, see [Authenticate Your Users with Tokens](https://docs.agora.io/en/Interactive%20Broadcast/token_server?platform=All%20Platforms).
*/
_defineProperty(this, "token", void 0);
/**
* The channel name that identifies each audio call loop. To ensure proper loop test functionality, the
* channel name passed in to identify each loop test cannot be the same when users of the same project (App ID)
* perform audio call loop tests on different devices.
*/
_defineProperty(this, "channelId", void 0);
if (params) {
this.enableAudio = params.enableAudio;
this.enableVideo = params.enableVideo;
this.token = params.token;
this.channelId = params.channelId;
}
}
}
/**
* Configurations for the local audio and video recording.
*
* @since v3.6.2
*/
exports.EchoTestConfiguration = EchoTestConfiguration;
class MediaRecorderConfiguration {
constructor(storagePath, containerFormat, streamType, maxDurationMs, recorderInfoUpdateInterval) {
/**
* The absolute path (including the filename extensions) for the recording file.
* For example:
* - Android: `/storage/emulated/0/Android/data//files/example.mp4`
* - iOS: `/App Sandbox/Library/Caches/example.mp4`
*
* **Note**
* Ensure that the specified path exists and is writable.
*/
_defineProperty(this, "storagePath", void 0);
/**
* The format of the recording file. The SDK currently supports only `1`, which is MP4 format.
*/
_defineProperty(this, "containerFormat", void 0);
/**
* The recording content:
* - `0x1`: Only audio.
* - `0x2`: Only video.
* - `0x3`: (Default) Audio and video.
*/
_defineProperty(this, "streamType", void 0);
/**
* The maximum recording duration, in milliseconds. The default value is `120000`.
*/
_defineProperty(this, "maxDurationMs", void 0);
/**
* The interval (ms) of updating the recording information.
* The value range is [1000,10000]. Based on the set value of `recorderInfoUpdateInterval`,
* the SDK triggers the [`RecorderInfoUpdated`]{@link RtcEngineEvents.RecorderInfoUpdated} callback to report the updated recording information.
*/
_defineProperty(this, "recorderInfoUpdateInterval", void 0);
this.storagePath = storagePath;
this.containerFormat = containerFormat;
this.streamType = streamType;
this.maxDurationMs = maxDurationMs;
this.recorderInfoUpdateInterval = recorderInfoUpdateInterval;
}
}
/**
* @ignore For future use
*/
exports.MediaRecorderConfiguration = MediaRecorderConfiguration;
class ContentInspectModule {
constructor() {
_defineProperty(this, "type", void 0);
_defineProperty(this, "interval", void 0);
}
}
/**
* @ignore For future use
*/
exports.ContentInspectModule = ContentInspectModule;
class ContentInspectConfig {
constructor() {
_defineProperty(this, "extraInfo", void 0);
_defineProperty(this, "modules", void 0);
_defineProperty(this, "moduleCount", void 0);
}
}
/**
* @ignore For future use
*/
exports.ContentInspectConfig = ContentInspectConfig;
class LocalAccessPointConfiguration {
constructor() {
_defineProperty(this, "ipList", void 0);
_defineProperty(this, "domainList", void 0);
_defineProperty(this, "verifyDomainName", void 0);
_defineProperty(this, "mode", void 0);
}
}
/**
* The video noise reduction options.
*
* @since v3.6.2
*/
exports.LocalAccessPointConfiguration = LocalAccessPointConfiguration;
class VideoDenoiserOptions {
constructor() {
/**
* The video noise reduction mode:
* - `0`: (Default) Automatic mode. The SDK automatically enables or disables the video noise reduction feature according to the ambient light.
* - `1`: Manual mode. Users need to enable or disable the video noise reduction feature manually.
*/
_defineProperty(this, "denoiserMode", void 0);
/**
* The video noise reduction level:
*
* - `0`: (Default) Promotes video quality during video noise reduction.
* `0` 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.
* - `1`: Promotes reducing performance consumption during video noise reduction.
* `1` 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 `1` when the camera is fixed.
* - `2`: Enhanced video noise reduction. `2` 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 `0` is not enough for your video noise reduction needs, you can use `2`.
*/
_defineProperty(this, "denoiserLevel", void 0);
}
}
/**
* The low-light enhancement options.
*
* @since v3.6.2
*/
exports.VideoDenoiserOptions = VideoDenoiserOptions;
class LowLightEnhanceOptions {
constructor() {
/**
* The low-light enhancement mode:
*
* - `0`: (Default) Automatic mode. The SDK automatically enables or disables the low-light enhancement feature according
* to the ambient light to compensate for the lighting level or prevent overexposure, as necessary.
* - `1`: Manual mode. Users need to enable or disable the low-light enhancement feature manually.
*/
_defineProperty(this, "lowlightEnhanceMode", void 0);
/**
* The low-light enhancement level:
*
* - `0`: (Default) Promotes video quality during low-light enhancement. It processes the brightness, details,
* and noise of the video image. The performance consumption is moderate, the processing speed is moderate, and
* the overall video quality is optimal.
* - `1`: Promotes performance during low-light enhancement. It processes the brightness and details of the video image.
* The processing speed is faster.
*/
_defineProperty(this, "lowlightEnhanceLevel", void 0);
}
}
/**
* The color enhancement options.
*
* @since v3.6.2
*/
exports.LowLightEnhanceOptions = LowLightEnhanceOptions;
class ColorEnhanceOptions {
constructor() {
/**
* The level of color enhancement.
* The value range is [0.0,1.0]. `0.0` means no color enhancement is applied to the video.
* The higher the value, the higher the level of color enhancement.
* The default value is `0.5` on Android and `0.0` on iOS.
*/
_defineProperty(this, "strengthLevel", void 0);
/**
* The level of skin tone protection.
* The value range is [0.0,1.0].
* `0.0` means no skin tone protection.
* The higher the value, the higher the level of skin tone protection.
* The default value is `1.0`. When the level of color enhancement is higher,
* the portrait skin tone can be significantly distorted, so you need to set the level of skin
* tone protection; when the level of skin tone protection is higher, the color enhancement effect
* can be slightly reduced. Therefore, to get the best color enhancement effect, Agora recommends
* that you adjust strengthLevel and skinProtectLevel to get the most appropriate values.
*/
_defineProperty(this, "skinProtectLevel", void 0);
}
}
/**
* Information for the recording file.
*
* @since v3.6.2
*/
/**
* @ignore For future user
*/
exports.ColorEnhanceOptions = ColorEnhanceOptions;
/**
* The configuration of the screen sharing.
*
* @since v3.7.0
*/
class ScreenCaptureParameters {
constructor() {
/**
* Determines whether to capture system audio during screen sharing:
* - `true`: Capture.
* - `false`: (Default) Do not capture.
*
* **Note**
* On Android, due to system limitations, capturing system audio is only available for Android API level 29
* and later (that is, Android 10 and later).
*/
_defineProperty(this, "captureAudio", void 0);
/**
* The audio configuration for the shared screen stream. See [`ScreenAudioParameters`]{@link ScreenAudioParameters}.
*
* **Note**
* This parameter is only available for scenarios where `captureAudio` is `true`.
*/
_defineProperty(this, "audioParams", void 0);
/**
* Determines whether to capture the screen during screen sharing:
* - `true`: Capture.
* - `false`: (Default) Do not capture.
*
* **Note**
* On Android, due to system limitations, screen capture is only available for Android API level 21
* and later (that is, Android 5 and later).
*/
_defineProperty(this, "captureVideo", void 0);
/**
* The video configuration for the shared screen stream. See [`ScreenVideoParameters`]{@link ScreenVideoParameters}.
*
* **Note**
* This parameter is only available for scenarios where `captureVideo` is `false`.
*/
_defineProperty(this, "videoParams", void 0);
}
}
/**
* The video configuration for the shared screen stream.
*
* Only available for scenarios where `captureVideo` is `true`.
*
* @since v3.7.0
*/
exports.ScreenCaptureParameters = ScreenCaptureParameters;
class ScreenVideoParameters {
constructor() {
/**
* The video encoding bitrate (Kbps). For recommended values,
* see [Recommended video profiles](https://docs.agora.io/en/Interactive%20Broadcast/game_streaming_video_profile?platform=Android#recommended-video-profiles).
*/
_defineProperty(this, "bitrate", void 0);
/**
* The video encoding frame rate (fps). The default value is 15. For recommended values,
* see [Recommended video profiles](https://docs.agora.io/en/Interactive%20Broadcast/game_streaming_video_profile?platform=Android#recommended-video-profiles).
*/
_defineProperty(this, "frameRate", void 0);
/**
* The video encoding resolution. The default value is 1280 × 720. For recommended values,
* see [Recommended video profiles](https://docs.agora.io/en/Interactive%20Broadcast/game_streaming_video_profile?platform=Android#recommended-video-profiles).
*
* If the aspect ratio is different between `dimensions` and the screen, the SDK adjusts the video encoding resolution according to the
* following rules (using an example value for `dimensions` of 1280 × 720):
* - When the width and height of the screen are both lower than those of `dimensions`, the SDK uses the resolution of the screen for video encoding.
* For example, if the screen is 640 × 360, the SDK uses 640 × 360 for video encoding.
* - When either the width or height of the screen is higher than that of `dimension`, the SDK uses the maximum values that do not exceed those of `dimensions`
* while maintaining the aspect ratio of the screen for video encoding. For example, if the screen is 2000 × 1500, the SDK uses 960 × 720 for video encoding.
*
* **Note**
* - The billing of the screen sharing stream is based on the value of `dimensions`.
* When you do not pass in a value, Agora bills you at 1280 × 720; when you pass a value in,
* Agora bills you at that value. For details, see [Pricing for Real-time Communication](https://docs.agora.io/en/Interactive%20Broadcast/billing_rtc?platform=React%20Native).
* - This value does not indicate the orientation mode of the output ratio. For how to set the video orientation, see [`VideoOutputOrientationMode`]{@link VideoOutputOrientationMode}.
* - Whether the SDK can support a resolution at 720P depends on the performance of the device. If you set 720P but the device cannot support it, the video frame rate can be lower.
*/
_defineProperty(this, "dimensions", void 0);
/**
* The content hint of the screen sharing. See [`VideoContentHint`]{@link VideoContentHint}.
*/
_defineProperty(this, "contentHint", void 0);
}
}
/**
* The audio configuration for the shared screen stream.
*
* Only available for scenarios where `captureAudio` is `true`.
*
* @since v3.7.0
*/
exports.ScreenVideoParameters = ScreenVideoParameters;
class ScreenAudioParameters {
constructor() {
/**
* The audio sample rate (Hz). The default value is 16000.
*/
_defineProperty(this, "sampleRate", void 0);
/**
* The number of audio channels. The default value is 2, indicating dual channels.
*/
_defineProperty(this, "channels", void 0);
/**
* The volume of the captured system audio. The value range is [0,100]. The default value is 100.
*/
_defineProperty(this, "captureSignalVolume", void 0);
/**
* Determines whether to capture the audio played by the current application:
* - `true`: Capture.
* - `false`: (Default) Do not capture.
*/
_defineProperty(this, "allowCaptureCurrentApp", void 0);
}
}
/**
* @ignore Contact support@agora.io.
*
* @since v3.7.0
*/
exports.ScreenAudioParameters = ScreenAudioParameters;
class SpatialAudioParams {
constructor() {
_defineProperty(this, "speaker_azimuth", void 0);
_defineProperty(this, "speaker_elevation", void 0);
_defineProperty(this, "speaker_distance", void 0);
_defineProperty(this, "speaker_orientation", void 0);
_defineProperty(this, "enable_blur", void 0);
_defineProperty(this, "enable_air_absorb", void 0);
}
}
exports.SpatialAudioParams = SpatialAudioParams;
//# sourceMappingURL=Classes.js.map