agora-electron-sdk 4.3.0-dev.1 → 4.3.1-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -4
- package/gulpfile.js +11 -4
- package/js/Private/AgoraBase.js +121 -24
- package/js/Private/AgoraMediaBase.js +15 -3
- package/js/Private/IAgoraRtcEngine.js +3 -3
- package/js/Private/impl/AgoraMediaBaseImpl.js +11 -1
- package/js/Private/impl/IAgoraMediaEngineImpl.js +28 -0
- package/js/Private/impl/IAgoraMediaPlayerImpl.js +2 -2
- package/js/Private/impl/IAgoraMusicContentCenterImpl.js +1 -1
- package/js/Private/impl/IAgoraRtcEngineExImpl.js +37 -0
- package/js/Private/impl/IAgoraRtcEngineImpl.js +123 -11
- package/js/Private/impl/IAudioDeviceManagerImpl.js +2 -2
- package/js/Private/internal/IrisApiEngine.js +6 -0
- package/js/Private/internal/MediaEngineInternal.js +25 -5
- package/js/Private/internal/MediaPlayerInternal.js +0 -6
- package/js/Private/internal/MusicContentCenterInternal.js +0 -4
- package/js/Private/internal/RtcEngineExInternal.js +10 -14
- package/js/Private/ti/AgoraMediaBase-ti.js +5 -1
- package/js/Private/ti/IAgoraRtcEngine-ti.js +1 -0
- package/package.json +5 -3
- package/scripts/buildJS.js +3 -3
- package/scripts/clean.js +6 -35
- package/scripts/downloadPrebuild.js +50 -3
- package/scripts/synclib.js +32 -12
- package/scripts/util.js +29 -0
- package/ts/Private/AgoraBase.ts +146 -33
- package/ts/Private/AgoraMediaBase.ts +77 -47
- package/ts/Private/IAgoraLog.ts +1 -1
- package/ts/Private/IAgoraMediaEngine.ts +35 -5
- package/ts/Private/IAgoraMediaPlayer.ts +10 -1
- package/ts/Private/IAgoraRtcEngine.ts +147 -102
- package/ts/Private/IAgoraRtcEngineEx.ts +39 -4
- package/ts/Private/IAudioDeviceManager.ts +2 -2
- package/ts/Private/extension/IAgoraMediaEngineExtension.ts +3 -1
- package/ts/Private/impl/AgoraMediaBaseImpl.ts +15 -0
- package/ts/Private/impl/IAgoraMediaEngineImpl.ts +37 -0
- package/ts/Private/impl/IAgoraMediaPlayerImpl.ts +2 -2
- package/ts/Private/impl/IAgoraMusicContentCenterImpl.ts +1 -1
- package/ts/Private/impl/IAgoraRtcEngineExImpl.ts +53 -0
- package/ts/Private/impl/IAgoraRtcEngineImpl.ts +153 -11
- package/ts/Private/impl/IAudioDeviceManagerImpl.ts +2 -2
- package/ts/Private/internal/IrisApiEngine.ts +11 -1
- package/ts/Private/internal/MediaEngineInternal.ts +31 -0
- package/ts/Private/internal/MediaPlayerInternal.ts +0 -14
- package/ts/Private/internal/MusicContentCenterInternal.ts +0 -7
- package/ts/Private/internal/RtcEngineExInternal.ts +9 -28
- package/ts/Private/ti/AgoraMediaBase-ti.ts +5 -0
- package/ts/Private/ti/IAgoraRtcEngine-ti.ts +1 -0
- package/types/Private/AgoraBase.d.ts +146 -36
- package/types/Private/AgoraBase.d.ts.map +1 -1
- package/types/Private/AgoraMediaBase.d.ts +77 -48
- package/types/Private/AgoraMediaBase.d.ts.map +1 -1
- package/types/Private/IAgoraLog.d.ts +1 -1
- package/types/Private/IAgoraMediaEngine.d.ts +33 -6
- package/types/Private/IAgoraMediaEngine.d.ts.map +1 -1
- package/types/Private/IAgoraMediaPlayer.d.ts +10 -1
- package/types/Private/IAgoraMediaPlayer.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngine.d.ts +132 -103
- package/types/Private/IAgoraRtcEngine.d.ts.map +1 -1
- package/types/Private/IAgoraRtcEngineEx.d.ts +33 -4
- package/types/Private/IAgoraRtcEngineEx.d.ts.map +1 -1
- package/types/Private/IAudioDeviceManager.d.ts +2 -2
- package/types/Private/extension/IAgoraMediaEngineExtension.d.ts +2 -2
- package/types/Private/extension/IAgoraMediaEngineExtension.d.ts.map +1 -1
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts +2 -1
- package/types/Private/impl/AgoraMediaBaseImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts +5 -1
- package/types/Private/impl/IAgoraMediaEngineImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts +4 -0
- package/types/Private/impl/IAgoraRtcEngineExImpl.d.ts.map +1 -1
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts +18 -1
- package/types/Private/impl/IAgoraRtcEngineImpl.d.ts.map +1 -1
- package/types/Private/internal/IrisApiEngine.d.ts +3 -2
- package/types/Private/internal/IrisApiEngine.d.ts.map +1 -1
- package/types/Private/internal/MediaEngineInternal.d.ts +4 -1
- package/types/Private/internal/MediaEngineInternal.d.ts.map +1 -1
- package/types/Private/internal/MediaPlayerInternal.d.ts +0 -2
- package/types/Private/internal/MediaPlayerInternal.d.ts.map +1 -1
- package/types/Private/internal/MusicContentCenterInternal.d.ts.map +1 -1
- package/types/Private/internal/RtcEngineExInternal.d.ts +1 -5
- package/types/Private/internal/RtcEngineExInternal.d.ts.map +1 -1
- package/types/Private/ti/AgoraMediaBase-ti.d.ts +1 -0
- package/types/Private/ti/AgoraMediaBase-ti.d.ts.map +1 -1
- package/types/Private/ti/IAgoraRtcEngine-ti.d.ts.map +1 -1
package/scripts/synclib.js
CHANGED
|
@@ -2,24 +2,26 @@ const path = require('path');
|
|
|
2
2
|
|
|
3
3
|
const download = require('download');
|
|
4
4
|
|
|
5
|
-
const {
|
|
6
|
-
destIrisSDKDir,
|
|
7
|
-
cleanIrisDir,
|
|
8
|
-
cleanIrisUselessFile,
|
|
9
|
-
} = require('./clean');
|
|
5
|
+
const { destIrisSDKDir, cleanDir, destNativeSDKDir } = require('./clean');
|
|
10
6
|
const getConfig = require('./getConfig');
|
|
11
7
|
const logger = require('./logger');
|
|
12
|
-
const { getOS } = require('./util');
|
|
8
|
+
const { getOS, moveFile, getIrisStandAlone } = require('./util');
|
|
13
9
|
|
|
14
10
|
const config = getConfig();
|
|
15
11
|
|
|
16
|
-
const { iris_sdk_mac, iris_sdk_win } = config;
|
|
12
|
+
const { iris_sdk_mac, iris_sdk_win, native_sdk_mac, native_sdk_win } = config;
|
|
17
13
|
|
|
18
|
-
const downloadSDK = async ({
|
|
14
|
+
const downloadSDK = async ({
|
|
15
|
+
preHook,
|
|
16
|
+
postHook,
|
|
17
|
+
sdkURL,
|
|
18
|
+
destDir,
|
|
19
|
+
strip = 1,
|
|
20
|
+
}) => {
|
|
19
21
|
logger.info(`Downloading:${sdkURL}`);
|
|
20
22
|
await preHook();
|
|
21
23
|
await download(sdkURL, destDir, {
|
|
22
|
-
strip:
|
|
24
|
+
strip: strip,
|
|
23
25
|
extract: true,
|
|
24
26
|
filter: (file) => {
|
|
25
27
|
return (
|
|
@@ -30,19 +32,37 @@ const downloadSDK = async ({ preHook, postHook, sdkURL, destDir }) => {
|
|
|
30
32
|
},
|
|
31
33
|
});
|
|
32
34
|
logger.info(`Finish download:${sdkURL}`);
|
|
33
|
-
await postHook();
|
|
35
|
+
typeof postHook === 'function' && (await postHook());
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
const syncLib = async (cb) => {
|
|
37
39
|
const os = getOS();
|
|
40
|
+
let irisStandAlone = getIrisStandAlone();
|
|
38
41
|
await downloadSDK({
|
|
39
|
-
preHook:
|
|
42
|
+
preHook: () => {
|
|
43
|
+
cleanDir(destIrisSDKDir);
|
|
44
|
+
},
|
|
40
45
|
postHook: () => {
|
|
41
|
-
|
|
46
|
+
if (irisStandAlone) {
|
|
47
|
+
cleanDir(destNativeSDKDir);
|
|
48
|
+
}
|
|
42
49
|
},
|
|
43
50
|
sdkURL: os === 'mac' ? iris_sdk_mac : iris_sdk_win,
|
|
44
51
|
destDir: destIrisSDKDir,
|
|
45
52
|
});
|
|
53
|
+
if (irisStandAlone) {
|
|
54
|
+
await downloadSDK({
|
|
55
|
+
preHook: () => {
|
|
56
|
+
cleanDir(destNativeSDKDir);
|
|
57
|
+
},
|
|
58
|
+
strip: 0,
|
|
59
|
+
sdkURL: os === 'mac' ? native_sdk_mac : native_sdk_win,
|
|
60
|
+
destDir: destNativeSDKDir,
|
|
61
|
+
});
|
|
62
|
+
} else {
|
|
63
|
+
moveFile(path.join(destIrisSDKDir, `../iris/DCG`), destNativeSDKDir);
|
|
64
|
+
}
|
|
65
|
+
|
|
46
66
|
cb();
|
|
47
67
|
};
|
|
48
68
|
|
package/scripts/util.js
CHANGED
|
@@ -3,6 +3,7 @@ const os = require('os');
|
|
|
3
3
|
const fs = require('fs-extra');
|
|
4
4
|
|
|
5
5
|
const getConfig = require('./getConfig');
|
|
6
|
+
const logger = require('./logger');
|
|
6
7
|
|
|
7
8
|
exports.getOS = () => {
|
|
8
9
|
const { platform } = getConfig();
|
|
@@ -16,3 +17,31 @@ exports.getOS = () => {
|
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
exports.createTmpDir = async () => await fs.mkdtemp(`${os.tmpdir()}_AgoraTmp`);
|
|
20
|
+
|
|
21
|
+
exports.moveFile = (sp, tp) => {
|
|
22
|
+
logger.info(`move file from ${sp} to ${tp}`);
|
|
23
|
+
fs.rename(sp, tp, function (err) {
|
|
24
|
+
if (err) {
|
|
25
|
+
throw err;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.getIrisStandAlone = () => {
|
|
31
|
+
const { iris_sdk_mac, iris_sdk_win } = getConfig();
|
|
32
|
+
const os = this.getOS();
|
|
33
|
+
if (
|
|
34
|
+
(os === 'mac' &&
|
|
35
|
+
iris_sdk_mac &&
|
|
36
|
+
iris_sdk_mac.toLowerCase().indexOf('standalone') !== -1) ||
|
|
37
|
+
(os === 'win32' &&
|
|
38
|
+
iris_sdk_win &&
|
|
39
|
+
iris_sdk_win.toLowerCase().indexOf('standalone') !== -1)
|
|
40
|
+
) {
|
|
41
|
+
logger.info('iris use standalone package');
|
|
42
|
+
return true;
|
|
43
|
+
} else {
|
|
44
|
+
logger.info('iris use non-standalone package');
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
};
|
package/ts/Private/AgoraBase.ts
CHANGED
|
@@ -319,13 +319,17 @@ export enum ErrorCodeType {
|
|
|
319
319
|
*/
|
|
320
320
|
ErrSetClientRoleNotAuthorized = 119,
|
|
321
321
|
/**
|
|
322
|
-
* 120:
|
|
322
|
+
* 120: Media streams decryption fails. The user might use an incorrect password to join the channel. Check the entered password, or tell the user to try rejoining the channel.
|
|
323
323
|
*/
|
|
324
324
|
ErrDecryptionFailed = 120,
|
|
325
325
|
/**
|
|
326
326
|
* 121: The user ID is invalid.
|
|
327
327
|
*/
|
|
328
328
|
ErrInvalidUserId = 121,
|
|
329
|
+
/**
|
|
330
|
+
* 122: Data streams decryption fails. The user might use an incorrect password to join the channel. Check the entered password, or tell the user to try rejoining the channel.
|
|
331
|
+
*/
|
|
332
|
+
ErrDatastreamDecryptionFailed = 122,
|
|
329
333
|
/**
|
|
330
334
|
* 123: The user is banned from the server.
|
|
331
335
|
*/
|
|
@@ -888,6 +892,28 @@ export enum VideoCodecType {
|
|
|
888
892
|
VideoCodecGenericJpeg = 20,
|
|
889
893
|
}
|
|
890
894
|
|
|
895
|
+
/**
|
|
896
|
+
* @ignore
|
|
897
|
+
*/
|
|
898
|
+
export enum CameraFocalLengthType {
|
|
899
|
+
/**
|
|
900
|
+
* @ignore
|
|
901
|
+
*/
|
|
902
|
+
CameraFocalLengthDefault = 0,
|
|
903
|
+
/**
|
|
904
|
+
* @ignore
|
|
905
|
+
*/
|
|
906
|
+
CameraFocalLengthWideAngle = 1,
|
|
907
|
+
/**
|
|
908
|
+
* @ignore
|
|
909
|
+
*/
|
|
910
|
+
CameraFocalLengthUltraWide = 2,
|
|
911
|
+
/**
|
|
912
|
+
* @ignore
|
|
913
|
+
*/
|
|
914
|
+
CameraFocalLengthTelephoto = 3,
|
|
915
|
+
}
|
|
916
|
+
|
|
891
917
|
/**
|
|
892
918
|
* @ignore
|
|
893
919
|
*/
|
|
@@ -1196,6 +1222,10 @@ export class EncodedVideoFrameInfo {
|
|
|
1196
1222
|
* The type of video streams. See VideoStreamType.
|
|
1197
1223
|
*/
|
|
1198
1224
|
streamType?: VideoStreamType;
|
|
1225
|
+
/**
|
|
1226
|
+
* @ignore
|
|
1227
|
+
*/
|
|
1228
|
+
presentationMs?: number;
|
|
1199
1229
|
}
|
|
1200
1230
|
|
|
1201
1231
|
/**
|
|
@@ -1322,6 +1352,20 @@ export class CodecCapInfo {
|
|
|
1322
1352
|
codecLevels?: CodecCapLevels;
|
|
1323
1353
|
}
|
|
1324
1354
|
|
|
1355
|
+
/**
|
|
1356
|
+
* @ignore
|
|
1357
|
+
*/
|
|
1358
|
+
export class FocalLengthInfo {
|
|
1359
|
+
/**
|
|
1360
|
+
* @ignore
|
|
1361
|
+
*/
|
|
1362
|
+
cameraDirection?: number;
|
|
1363
|
+
/**
|
|
1364
|
+
* @ignore
|
|
1365
|
+
*/
|
|
1366
|
+
focalLengthType?: CameraFocalLengthType;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1325
1369
|
/**
|
|
1326
1370
|
* Video encoder configurations.
|
|
1327
1371
|
*/
|
|
@@ -1403,11 +1447,11 @@ export enum SimulcastStreamMode {
|
|
|
1403
1447
|
*/
|
|
1404
1448
|
export class SimulcastStreamConfig {
|
|
1405
1449
|
/**
|
|
1406
|
-
* The video dimension. See VideoDimensions. The default value is
|
|
1450
|
+
* The video dimension. See VideoDimensions. The default value is 50% of the high-quality video stream.
|
|
1407
1451
|
*/
|
|
1408
1452
|
dimensions?: VideoDimensions;
|
|
1409
1453
|
/**
|
|
1410
|
-
* Video receive bitrate (Kbps), represented by an instantaneous value. The
|
|
1454
|
+
* Video receive bitrate (Kbps), represented by an instantaneous value. This parameter does not need to be set. The SDK automatically matches the most suitable bitrate based on the video resolution and frame rate you set.
|
|
1411
1455
|
*/
|
|
1412
1456
|
kBitrate?: number;
|
|
1413
1457
|
/**
|
|
@@ -1465,7 +1509,7 @@ export class WatermarkRatio {
|
|
|
1465
1509
|
*/
|
|
1466
1510
|
export class WatermarkOptions {
|
|
1467
1511
|
/**
|
|
1468
|
-
*
|
|
1512
|
+
* Whether the watermark is visible in the local preview view: true : (Default) The watermark is visible in the local preview view. false : The watermark is not visible in the local preview view.
|
|
1469
1513
|
*/
|
|
1470
1514
|
visibleInPreview?: boolean;
|
|
1471
1515
|
/**
|
|
@@ -1816,15 +1860,15 @@ export enum AudioScenarioType {
|
|
|
1816
1860
|
*/
|
|
1817
1861
|
export class VideoFormat {
|
|
1818
1862
|
/**
|
|
1819
|
-
* The width (px) of the video frame.
|
|
1863
|
+
* The width (px) of the video frame. The default value is 960.
|
|
1820
1864
|
*/
|
|
1821
1865
|
width?: number;
|
|
1822
1866
|
/**
|
|
1823
|
-
* The height (px) of the video frame.
|
|
1867
|
+
* The height (px) of the video frame. The default value is 540.
|
|
1824
1868
|
*/
|
|
1825
1869
|
height?: number;
|
|
1826
1870
|
/**
|
|
1827
|
-
* The video frame rate (fps).
|
|
1871
|
+
* The video frame rate (fps). The default value is 15.
|
|
1828
1872
|
*/
|
|
1829
1873
|
fps?: number;
|
|
1830
1874
|
}
|
|
@@ -1940,6 +1984,36 @@ export enum CaptureBrightnessLevelType {
|
|
|
1940
1984
|
CaptureBrightnessLevelDark = 2,
|
|
1941
1985
|
}
|
|
1942
1986
|
|
|
1987
|
+
/**
|
|
1988
|
+
* @ignore
|
|
1989
|
+
*/
|
|
1990
|
+
export enum CameraStabilizationMode {
|
|
1991
|
+
/**
|
|
1992
|
+
* @ignore
|
|
1993
|
+
*/
|
|
1994
|
+
CameraStabilizationModeOff = -1,
|
|
1995
|
+
/**
|
|
1996
|
+
* @ignore
|
|
1997
|
+
*/
|
|
1998
|
+
CameraStabilizationModeAuto = 0,
|
|
1999
|
+
/**
|
|
2000
|
+
* @ignore
|
|
2001
|
+
*/
|
|
2002
|
+
CameraStabilizationModeLevel1 = 1,
|
|
2003
|
+
/**
|
|
2004
|
+
* @ignore
|
|
2005
|
+
*/
|
|
2006
|
+
CameraStabilizationModeLevel2 = 2,
|
|
2007
|
+
/**
|
|
2008
|
+
* @ignore
|
|
2009
|
+
*/
|
|
2010
|
+
CameraStabilizationModeLevel3 = 3,
|
|
2011
|
+
/**
|
|
2012
|
+
* @ignore
|
|
2013
|
+
*/
|
|
2014
|
+
CameraStabilizationModeMaxLevel = 3,
|
|
2015
|
+
}
|
|
2016
|
+
|
|
1943
2017
|
/**
|
|
1944
2018
|
* The state of the local audio.
|
|
1945
2019
|
*/
|
|
@@ -1991,11 +2065,11 @@ export enum LocalAudioStreamReason {
|
|
|
1991
2065
|
*/
|
|
1992
2066
|
LocalAudioStreamReasonEncodeFailure = 5,
|
|
1993
2067
|
/**
|
|
1994
|
-
* 6: No local audio capture device. Remind your users to check whether the microphone is connected to the device properly in the control
|
|
2068
|
+
* 6: No local audio capture device. Remind your users to check whether the microphone is connected to the device properly in the control panel of the device or if the microphone is working properly.
|
|
1995
2069
|
*/
|
|
1996
2070
|
LocalAudioStreamReasonNoRecordingDevice = 6,
|
|
1997
2071
|
/**
|
|
1998
|
-
* 7: No local audio capture device. Remind your users to check whether the speaker is connected to the device properly in the control
|
|
2072
|
+
* 7: No local audio capture device. Remind your users to check whether the speaker is connected to the device properly in the control panel of the device or if the speaker is working properly.
|
|
1999
2073
|
*/
|
|
2000
2074
|
LocalAudioStreamReasonNoPlayoutDevice = 7,
|
|
2001
2075
|
/**
|
|
@@ -2003,11 +2077,11 @@ export enum LocalAudioStreamReason {
|
|
|
2003
2077
|
*/
|
|
2004
2078
|
LocalAudioStreamReasonInterrupted = 8,
|
|
2005
2079
|
/**
|
|
2006
|
-
* 9: (Windows only) The ID of the local audio-capture device is invalid.
|
|
2080
|
+
* 9: (Windows only) The ID of the local audio-capture device is invalid. Prompt the user to check the audio capture device ID.
|
|
2007
2081
|
*/
|
|
2008
2082
|
LocalAudioStreamReasonRecordInvalidId = 9,
|
|
2009
2083
|
/**
|
|
2010
|
-
* 10: (Windows only) The ID of the local audio-playback device is invalid.
|
|
2084
|
+
* 10: (Windows only) The ID of the local audio-playback device is invalid. Prompt the user to check the audio playback device ID.
|
|
2011
2085
|
*/
|
|
2012
2086
|
LocalAudioStreamReasonPlayoutInvalidId = 10,
|
|
2013
2087
|
}
|
|
@@ -2047,15 +2121,15 @@ export enum LocalVideoStreamReason {
|
|
|
2047
2121
|
*/
|
|
2048
2122
|
LocalVideoStreamReasonFailure = 1,
|
|
2049
2123
|
/**
|
|
2050
|
-
* 2: No permission to use the local video capturing device.
|
|
2124
|
+
* 2: No permission to use the local video capturing device. Prompt the user to grant permissions and rejoin the channel. Deprecated: This enumerator is deprecated. Please use CAMERA in the onPermissionError callback instead.
|
|
2051
2125
|
*/
|
|
2052
2126
|
LocalVideoStreamReasonDeviceNoPermission = 2,
|
|
2053
2127
|
/**
|
|
2054
|
-
* 3: The local video capturing device is in use.
|
|
2128
|
+
* 3: The local video capturing device is in use. Prompt the user to check if the camera is being used by another app, or try to rejoin the channel.
|
|
2055
2129
|
*/
|
|
2056
2130
|
LocalVideoStreamReasonDeviceBusy = 3,
|
|
2057
2131
|
/**
|
|
2058
|
-
* 4: The local video capture fails.
|
|
2132
|
+
* 4: The local video capture fails. Prompt the user to check whether the video capture device is working properly, whether the camera is used by another app, or try to rejoin the channel.
|
|
2059
2133
|
*/
|
|
2060
2134
|
LocalVideoStreamReasonCaptureFailure = 4,
|
|
2061
2135
|
/**
|
|
@@ -2082,17 +2156,25 @@ export enum LocalVideoStreamReason {
|
|
|
2082
2156
|
* 10: (macOS and Windows only) The SDK cannot find the video device in the video device list. Check whether the ID of the video device is valid.
|
|
2083
2157
|
*/
|
|
2084
2158
|
LocalVideoStreamReasonDeviceInvalidId = 10,
|
|
2159
|
+
/**
|
|
2160
|
+
* @ignore
|
|
2161
|
+
*/
|
|
2162
|
+
LocalVideoStreamReasonDeviceInterrupt = 14,
|
|
2163
|
+
/**
|
|
2164
|
+
* @ignore
|
|
2165
|
+
*/
|
|
2166
|
+
LocalVideoStreamReasonDeviceFatalError = 15,
|
|
2085
2167
|
/**
|
|
2086
2168
|
* 101: The current video capture device is unavailable due to excessive system pressure.
|
|
2087
2169
|
*/
|
|
2088
2170
|
LocalVideoStreamReasonDeviceSystemPressure = 101,
|
|
2089
2171
|
/**
|
|
2090
|
-
* 11: (macOS and Windows only) The shared
|
|
2172
|
+
* 11: (macOS and Windows only) The shared window is minimized when you call the startScreenCaptureByWindowId method to share a window. The SDK cannot share a minimized window. Please prompt the user to unminimize the shared window.
|
|
2091
2173
|
*/
|
|
2092
2174
|
LocalVideoStreamReasonScreenCaptureWindowMinimized = 11,
|
|
2093
2175
|
/**
|
|
2094
2176
|
* 12: (macOS and Windows only) The error code indicates that a window shared by the window ID has been closed or a full-screen window shared by the window ID has exited full-screen mode. After exiting full-screen mode, remote users cannot see the shared window. To prevent remote users from seeing a black screen, Agora recommends that you immediately stop screen sharing. Common scenarios reporting this error code:
|
|
2095
|
-
*
|
|
2177
|
+
* The local user closes the shared window.
|
|
2096
2178
|
* The local user shows some slides in full-screen mode first, and then shares the windows of the slides. After the user exits full-screen mode, the SDK reports this error code.
|
|
2097
2179
|
* The local user watches a web video or reads a web document in full-screen mode first, and then shares the window of the web video or document. After the user exits full-screen mode, the SDK reports this error code.
|
|
2098
2180
|
*/
|
|
@@ -2126,7 +2208,7 @@ export enum LocalVideoStreamReason {
|
|
|
2126
2208
|
*/
|
|
2127
2209
|
LocalVideoStreamReasonScreenCaptureWindowRecoverFromHidden = 26,
|
|
2128
2210
|
/**
|
|
2129
|
-
*
|
|
2211
|
+
* 27: The window for screen capture has been restored from the minimized state.
|
|
2130
2212
|
*/
|
|
2131
2213
|
LocalVideoStreamReasonScreenCaptureWindowRecoverFromMinimized = 27,
|
|
2132
2214
|
/**
|
|
@@ -2201,6 +2283,14 @@ export enum RemoteAudioStateReason {
|
|
|
2201
2283
|
* 7: The remote user leaves the channel.
|
|
2202
2284
|
*/
|
|
2203
2285
|
RemoteAudioReasonRemoteOffline = 7,
|
|
2286
|
+
/**
|
|
2287
|
+
* @ignore
|
|
2288
|
+
*/
|
|
2289
|
+
RemoteAudioReasonNoPacketReceive = 8,
|
|
2290
|
+
/**
|
|
2291
|
+
* @ignore
|
|
2292
|
+
*/
|
|
2293
|
+
RemoteAudioReasonLocalPlayFailed = 9,
|
|
2204
2294
|
}
|
|
2205
2295
|
|
|
2206
2296
|
/**
|
|
@@ -2640,7 +2730,7 @@ export enum RtmpStreamPublishReason {
|
|
|
2640
2730
|
*/
|
|
2641
2731
|
RtmpStreamPublishReasonInvalidAppid = 15,
|
|
2642
2732
|
/**
|
|
2643
|
-
* 16: Your project does not have permission to use streaming services.
|
|
2733
|
+
* 16: Your project does not have permission to use streaming services.
|
|
2644
2734
|
*/
|
|
2645
2735
|
RtmpStreamPublishReasonInvalidPrivilege = 16,
|
|
2646
2736
|
/**
|
|
@@ -3349,7 +3439,7 @@ export class VideoCanvas {
|
|
|
3349
3439
|
*/
|
|
3350
3440
|
subviewUid?: number;
|
|
3351
3441
|
/**
|
|
3352
|
-
* The video display window.
|
|
3442
|
+
* The video display window. In one VideoCanvas, you can only choose to set either view or surfaceTexture. If both are set, only the settings in view take effect.
|
|
3353
3443
|
*/
|
|
3354
3444
|
view?: any;
|
|
3355
3445
|
/**
|
|
@@ -3383,8 +3473,7 @@ export class VideoCanvas {
|
|
|
3383
3473
|
*/
|
|
3384
3474
|
cropArea?: Rectangle;
|
|
3385
3475
|
/**
|
|
3386
|
-
* (Optional) Whether the receiver enables alpha mask rendering: true : The receiver enables alpha mask rendering. false : (
|
|
3387
|
-
* This property applies to macOS only.
|
|
3476
|
+
* (Optional) Whether the receiver enables alpha mask rendering: true : The receiver enables alpha mask rendering. false : (Default) The receiver disables alpha mask rendering. Alpha mask rendering can create images with transparent effects and extract portraits from videos. When used in combination with other methods, you can implement effects such as portrait-in-picture and watermarking.
|
|
3388
3477
|
* The receiver can render alpha channel information only when the sender enables alpha transmission.
|
|
3389
3478
|
* To enable alpha transmission,.
|
|
3390
3479
|
*/
|
|
@@ -3400,7 +3489,7 @@ export class VideoCanvas {
|
|
|
3400
3489
|
*/
|
|
3401
3490
|
export enum LighteningContrastLevel {
|
|
3402
3491
|
/**
|
|
3403
|
-
*
|
|
3492
|
+
* 0: Low contrast level.
|
|
3404
3493
|
*/
|
|
3405
3494
|
LighteningContrastLow = 0,
|
|
3406
3495
|
/**
|
|
@@ -3632,7 +3721,7 @@ export class SegmentationProperty {
|
|
|
3632
3721
|
*/
|
|
3633
3722
|
modelType?: SegModelType;
|
|
3634
3723
|
/**
|
|
3635
|
-
* The range
|
|
3724
|
+
* The accuracy range for recognizing background colors in the image. The value range is [0,1], and the default value is 0.5. The larger the value, the wider the range of identifiable shades of pure color. When the value of this parameter is too large, the edge of the portrait and the pure color in the portrait range are also detected. Agora recommends that you dynamically adjust the value of this parameter according to the actual effect. This parameter only takes effect when modelType is set to SegModelGreen.
|
|
3636
3725
|
*/
|
|
3637
3726
|
greenCapacity?: number;
|
|
3638
3727
|
}
|
|
@@ -3777,6 +3866,10 @@ export enum AudioEffectPreset {
|
|
|
3777
3866
|
* Virtual surround sound, that is, the SDK generates a simulated surround sound field on the basis of stereo channels, thereby creating a surround sound effect. If the virtual surround sound is enabled, users need to use stereo audio playback devices to hear the anticipated audio effect.
|
|
3778
3867
|
*/
|
|
3779
3868
|
RoomAcousticsVirtualSurroundSound = 0x02010900,
|
|
3869
|
+
/**
|
|
3870
|
+
* The audio effect of chorus. Agora recommends using this effect in chorus scenarios to enhance the sense of depth and dimension in the vocals.
|
|
3871
|
+
*/
|
|
3872
|
+
RoomAcousticsChorus = 0x02010d00,
|
|
3780
3873
|
/**
|
|
3781
3874
|
* A middle-aged man's voice. Agora recommends using this preset to process a male-sounding voice; otherwise, you may not hear the anticipated voice effect.
|
|
3782
3875
|
*/
|
|
@@ -3912,9 +4005,13 @@ export enum HeadphoneEqualizerPreset {
|
|
|
3912
4005
|
*/
|
|
3913
4006
|
export class ScreenCaptureParameters {
|
|
3914
4007
|
/**
|
|
3915
|
-
* The video encoding resolution of the
|
|
4008
|
+
* The video encoding resolution of the screen sharing stream. See VideoDimensions. The default value is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. If the screen dimensions are different from the value of this parameter, Agora applies the following strategies for encoding. Suppose dimensions is set to 1920 × 1080:
|
|
3916
4009
|
* If the value of the screen dimensions is lower than that of dimensions, for example, 1000 × 1000 pixels, the SDK uses the screen dimensions, that is, 1000 × 1000 pixels, for encoding.
|
|
3917
|
-
* If the value of the screen dimensions is higher than that of dimensions, for example, 2000 × 1500, the SDK uses the maximum value under with the aspect ratio of the screen dimension (4:3) for encoding, that is, 1440 × 1080.
|
|
4010
|
+
* If the value of the screen dimensions is higher than that of dimensions, for example, 2000 × 1500, the SDK uses the maximum value under dimensions with the aspect ratio of the screen dimension (4:3) for encoding, that is, 1440 × 1080. When setting the encoding resolution in the scenario of sharing documents (ScreenScenarioDocument), choose one of the following two methods:
|
|
4011
|
+
* If you require the best image quality, it is recommended to set the encoding resolution to be the same as the capture resolution.
|
|
4012
|
+
* If you wish to achieve a relative balance between image quality, bandwidth, and system performance, then:
|
|
4013
|
+
* When the capture resolution is greater than 1920 × 1080, it is recommended that the encoding resolution is not less than 1920 × 1080.
|
|
4014
|
+
* When the capture resolution is less than 1920 × 1080, it is recommended that the encoding resolution is not less than 1280 × 720.
|
|
3918
4015
|
*/
|
|
3919
4016
|
dimensions?: VideoDimensions;
|
|
3920
4017
|
/**
|
|
@@ -4210,7 +4307,7 @@ export enum ChannelMediaRelayError {
|
|
|
4210
4307
|
*/
|
|
4211
4308
|
RelayErrorServerErrorResponse = 1,
|
|
4212
4309
|
/**
|
|
4213
|
-
* 2: No server response.
|
|
4310
|
+
* 2: No server response. This error may be caused by poor network connections. If this error occurs when initiating a channel media relay, you can try again later; if this error occurs during channel media relay, you can call leaveChannel to leave the channel. This error can also occur if the channel media relay service is not enabled in the project. You can contact to enable the service.
|
|
4214
4311
|
*/
|
|
4215
4312
|
RelayErrorServerNoResponse = 2,
|
|
4216
4313
|
/**
|
|
@@ -4431,6 +4528,10 @@ export class EncryptionConfig {
|
|
|
4431
4528
|
* Salt, 32 bytes in length. Agora recommends that you use OpenSSL to generate salt on the server side. See Media Stream Encryption for details. This parameter takes effect only in Aes128Gcm2 or Aes256Gcm2 encrypted mode. In this case, ensure that this parameter is not 0.
|
|
4432
4529
|
*/
|
|
4433
4530
|
encryptionKdfSalt?: number[];
|
|
4531
|
+
/**
|
|
4532
|
+
* Whether to enable data stream encryption: true : Enable data stream encryption. false : (Default) Disable data stream encryption.
|
|
4533
|
+
*/
|
|
4534
|
+
datastreamEncryptionEnabled?: boolean;
|
|
4434
4535
|
}
|
|
4435
4536
|
|
|
4436
4537
|
/**
|
|
@@ -4442,13 +4543,21 @@ export enum EncryptionErrorType {
|
|
|
4442
4543
|
*/
|
|
4443
4544
|
EncryptionErrorInternalFailure = 0,
|
|
4444
4545
|
/**
|
|
4445
|
-
* 1:
|
|
4546
|
+
* 1: Media stream decryption error. Ensure that the receiver and the sender use the same encryption mode and key.
|
|
4446
4547
|
*/
|
|
4447
4548
|
EncryptionErrorDecryptionFailure = 1,
|
|
4448
4549
|
/**
|
|
4449
|
-
* 2:
|
|
4550
|
+
* 2: Media stream encryption error.
|
|
4450
4551
|
*/
|
|
4451
4552
|
EncryptionErrorEncryptionFailure = 2,
|
|
4553
|
+
/**
|
|
4554
|
+
* 3: Data stream decryption error. Ensure that the receiver and the sender use the same encryption mode and key.
|
|
4555
|
+
*/
|
|
4556
|
+
EncryptionErrorDatastreamDecryptionFailure = 3,
|
|
4557
|
+
/**
|
|
4558
|
+
* 4: Data stream encryption error.
|
|
4559
|
+
*/
|
|
4560
|
+
EncryptionErrorDatastreamEncryptionFailure = 4,
|
|
4452
4561
|
}
|
|
4453
4562
|
|
|
4454
4563
|
/**
|
|
@@ -4590,21 +4699,25 @@ export class UserInfo {
|
|
|
4590
4699
|
}
|
|
4591
4700
|
|
|
4592
4701
|
/**
|
|
4593
|
-
* The audio filter of in-ear monitoring.
|
|
4702
|
+
* The audio filter types of in-ear monitoring.
|
|
4594
4703
|
*/
|
|
4595
4704
|
export enum EarMonitoringFilterType {
|
|
4596
4705
|
/**
|
|
4597
|
-
* 1<<0:
|
|
4706
|
+
* 1<<0: No audio filter added to in-ear monitoring.
|
|
4598
4707
|
*/
|
|
4599
4708
|
EarMonitoringFilterNone = 1 << 0,
|
|
4600
4709
|
/**
|
|
4601
|
-
* 1<<1: Add
|
|
4710
|
+
* 1<<1: Add vocal effects audio filter to in-ear monitoring. If you implement functions such as voice beautifier and audio effect, users can hear the voice after adding these effects.
|
|
4602
4711
|
*/
|
|
4603
4712
|
EarMonitoringFilterBuiltInAudioFilters = 1 << 1,
|
|
4604
4713
|
/**
|
|
4605
|
-
* 1<<2:
|
|
4714
|
+
* 1<<2: Add noise suppression audio filter to in-ear monitoring.
|
|
4606
4715
|
*/
|
|
4607
4716
|
EarMonitoringFilterNoiseSuppression = 1 << 2,
|
|
4717
|
+
/**
|
|
4718
|
+
* 1<<15: Reuse the audio filter that has been processed on the sending end for in-ear monitoring. This enumerator reduces CPU usage while increasing in-ear monitoring latency, which is suitable for latency-tolerant scenarios requiring low CPU consumption.
|
|
4719
|
+
*/
|
|
4720
|
+
EarMonitoringFilterReusePostProcessingFilter = 1 << 15,
|
|
4608
4721
|
}
|
|
4609
4722
|
|
|
4610
4723
|
/**
|
|
@@ -4921,7 +5034,7 @@ export class SpatialAudioParams {
|
|
|
4921
5034
|
speaker_attenuation?: number;
|
|
4922
5035
|
/**
|
|
4923
5036
|
* Whether to enable the Doppler effect: When there is a relative displacement between the sound source and the receiver of the sound source, the tone heard by the receiver changes. true : Enable the Doppler effect. false : (Default) Disable the Doppler effect.
|
|
4924
|
-
* This parameter is suitable for scenarios where the sound source is moving at high speed (for example, racing games). It is not recommended for common audio and video interactive scenarios (for example, voice chat,
|
|
5037
|
+
* This parameter is suitable for scenarios where the sound source is moving at high speed (for example, racing games). It is not recommended for common audio and video interactive scenarios (for example, voice chat, co-streaming, or online KTV).
|
|
4925
5038
|
* When this parameter is enabled, Agora recommends that you set a regular period (such as 30 ms), and then call the updatePlayerPositionInfo, updateSelfPosition, and updateRemotePosition methods to continuously update the relative distance between the sound source and the receiver. The following factors can cause the Doppler effect to be unpredictable or the sound to be jittery: the period of updating the distance is too long, the updating period is irregular, or the distance information is lost due to network packet loss or delay.
|
|
4926
5039
|
*/
|
|
4927
5040
|
enable_doppler?: boolean;
|