agora-electron-sdk 4.3.0 → 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 +9 -0
- 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
|
@@ -73,6 +73,10 @@ export enum VideoSourceType {
|
|
|
73
73
|
* 14: The fourth screen.
|
|
74
74
|
*/
|
|
75
75
|
VideoSourceScreenFourth = 14,
|
|
76
|
+
/**
|
|
77
|
+
* @ignore
|
|
78
|
+
*/
|
|
79
|
+
VideoSourceSpeechDriven = 15,
|
|
76
80
|
/**
|
|
77
81
|
* 100: An unknown video source.
|
|
78
82
|
*/
|
|
@@ -112,11 +116,11 @@ export enum AudioRoute {
|
|
|
112
116
|
*/
|
|
113
117
|
RouteBluetoothDeviceHfp = 5,
|
|
114
118
|
/**
|
|
115
|
-
*
|
|
119
|
+
* 6: The audio route is a USB peripheral device. (For macOS only)
|
|
116
120
|
*/
|
|
117
121
|
RouteUsb = 6,
|
|
118
122
|
/**
|
|
119
|
-
*
|
|
123
|
+
* 7: The audio route is an HDMI peripheral device. (For macOS only)
|
|
120
124
|
*/
|
|
121
125
|
RouteHdmi = 7,
|
|
122
126
|
/**
|
|
@@ -204,7 +208,7 @@ export enum MediaSourceType {
|
|
|
204
208
|
*/
|
|
205
209
|
SecondaryScreenSource = 5,
|
|
206
210
|
/**
|
|
207
|
-
* 6
|
|
211
|
+
* 6: Custom video source.
|
|
208
212
|
*/
|
|
209
213
|
CustomVideoSource = 6,
|
|
210
214
|
/**
|
|
@@ -231,6 +235,10 @@ export enum MediaSourceType {
|
|
|
231
235
|
* @ignore
|
|
232
236
|
*/
|
|
233
237
|
TranscodedVideoSource = 12,
|
|
238
|
+
/**
|
|
239
|
+
* @ignore
|
|
240
|
+
*/
|
|
241
|
+
SpeechDrivenVideoSource = 13,
|
|
234
242
|
/**
|
|
235
243
|
* 100: Unknown media source.
|
|
236
244
|
*/
|
|
@@ -449,6 +457,10 @@ export enum VideoPixelFormat {
|
|
|
449
457
|
* @ignore
|
|
450
458
|
*/
|
|
451
459
|
VideoTextureId3d11texture2d = 17,
|
|
460
|
+
/**
|
|
461
|
+
* @ignore
|
|
462
|
+
*/
|
|
463
|
+
VideoPixelI010 = 18,
|
|
452
464
|
}
|
|
453
465
|
|
|
454
466
|
/**
|
|
@@ -611,6 +623,10 @@ export class ExternalVideoFrame {
|
|
|
611
623
|
* @ignore
|
|
612
624
|
*/
|
|
613
625
|
alphaBuffer?: Uint8Array;
|
|
626
|
+
/**
|
|
627
|
+
* @ignore
|
|
628
|
+
*/
|
|
629
|
+
fillAlphaBuffer?: boolean;
|
|
614
630
|
/**
|
|
615
631
|
* This parameter only applies to video data in Windows Texture format. It represents an index of an ID3D11Texture2D texture object used by the video frame in the ID3D11Texture2D array.
|
|
616
632
|
*/
|
|
@@ -636,15 +652,15 @@ export class VideoFrame {
|
|
|
636
652
|
*/
|
|
637
653
|
height?: number;
|
|
638
654
|
/**
|
|
639
|
-
* For YUV data, the line span of the Y buffer; for RGBA data, the total data length.
|
|
655
|
+
* For YUV data, the line span of the Y buffer; for RGBA data, the total data length. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
|
|
640
656
|
*/
|
|
641
657
|
yStride?: number;
|
|
642
658
|
/**
|
|
643
|
-
* For YUV data, the line span of the U buffer; for RGBA data, the value is 0.
|
|
659
|
+
* For YUV data, the line span of the U buffer; for RGBA data, the value is 0. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
|
|
644
660
|
*/
|
|
645
661
|
uStride?: number;
|
|
646
662
|
/**
|
|
647
|
-
* For YUV data, the line span of the V buffer; for RGBA data, the value is 0.
|
|
663
|
+
* For YUV data, the line span of the V buffer; for RGBA data, the value is 0. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
|
|
648
664
|
*/
|
|
649
665
|
vStride?: number;
|
|
650
666
|
/**
|
|
@@ -664,7 +680,7 @@ export class VideoFrame {
|
|
|
664
680
|
*/
|
|
665
681
|
rotation?: number;
|
|
666
682
|
/**
|
|
667
|
-
* The Unix timestamp (ms) when the video frame is rendered. This timestamp can be used to guide the rendering of the video frame.
|
|
683
|
+
* The Unix timestamp (ms) when the video frame is rendered. This timestamp can be used to guide the rendering of the video frame. This parameter is required.
|
|
668
684
|
*/
|
|
669
685
|
renderTimeMs?: number;
|
|
670
686
|
/**
|
|
@@ -782,7 +798,7 @@ export class AudioFrame {
|
|
|
782
798
|
*/
|
|
783
799
|
samplesPerChannel?: number;
|
|
784
800
|
/**
|
|
785
|
-
* The number of bytes per sample.
|
|
801
|
+
* The number of bytes per sample. For PCM, this parameter is generally set to 16 bits (2 bytes).
|
|
786
802
|
*/
|
|
787
803
|
bytesPerSample?: BytesPerSample;
|
|
788
804
|
/**
|
|
@@ -815,6 +831,10 @@ export class AudioFrame {
|
|
|
815
831
|
* @ignore
|
|
816
832
|
*/
|
|
817
833
|
audioTrackNumber?: number;
|
|
834
|
+
/**
|
|
835
|
+
* @ignore
|
|
836
|
+
*/
|
|
837
|
+
rtpTimestamp?: number;
|
|
818
838
|
}
|
|
819
839
|
|
|
820
840
|
/**
|
|
@@ -891,9 +911,6 @@ export interface IAudioFrameObserverBase {
|
|
|
891
911
|
*
|
|
892
912
|
* @param channelId The channel ID.
|
|
893
913
|
* @param audioFrame The raw audio data. See AudioFrame.
|
|
894
|
-
*
|
|
895
|
-
* @returns
|
|
896
|
-
* Without practical meaning.
|
|
897
914
|
*/
|
|
898
915
|
onRecordAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
|
|
899
916
|
|
|
@@ -904,9 +921,6 @@ export interface IAudioFrameObserverBase {
|
|
|
904
921
|
*
|
|
905
922
|
* @param channelId The channel ID.
|
|
906
923
|
* @param audioFrame The raw audio data. See AudioFrame.
|
|
907
|
-
*
|
|
908
|
-
* @returns
|
|
909
|
-
* Without practical meaning.
|
|
910
924
|
*/
|
|
911
925
|
onPlaybackAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
|
|
912
926
|
|
|
@@ -917,9 +931,6 @@ export interface IAudioFrameObserverBase {
|
|
|
917
931
|
*
|
|
918
932
|
* @param channelId The channel ID.
|
|
919
933
|
* @param audioFrame The raw audio data. See AudioFrame.
|
|
920
|
-
*
|
|
921
|
-
* @returns
|
|
922
|
-
* Without practical meaning.
|
|
923
934
|
*/
|
|
924
935
|
onMixedAudioFrame?(channelId: string, audioFrame: AudioFrame): void;
|
|
925
936
|
|
|
@@ -929,9 +940,6 @@ export interface IAudioFrameObserverBase {
|
|
|
929
940
|
* In order to ensure that the obtained in-ear audio data meets the expectations, Agora recommends that you set the in-ear monitoring-ear audio data format as follows: After calling setEarMonitoringAudioFrameParameters to set the audio data format and registerAudioFrameObserver to register the audio frame observer object, the SDK calculates the sampling interval according to the parameters set in the methods, and triggers the onEarMonitoringAudioFrame callback according to the sampling interval.
|
|
930
941
|
*
|
|
931
942
|
* @param audioFrame The raw audio data. See AudioFrame.
|
|
932
|
-
*
|
|
933
|
-
* @returns
|
|
934
|
-
* Without practical meaning.
|
|
935
943
|
*/
|
|
936
944
|
onEarMonitoringAudioFrame?(audioFrame: AudioFrame): void;
|
|
937
945
|
}
|
|
@@ -943,12 +951,11 @@ export interface IAudioFrameObserver extends IAudioFrameObserverBase {
|
|
|
943
951
|
/**
|
|
944
952
|
* Retrieves the audio frame of a specified user before mixing.
|
|
945
953
|
*
|
|
954
|
+
* Due to framework limitations, this callback does not support sending processed audio data back to the SDK.
|
|
955
|
+
*
|
|
946
956
|
* @param channelId The channel ID.
|
|
947
957
|
* @param uid The user ID of the specified user.
|
|
948
958
|
* @param audioFrame The raw audio data. See AudioFrame.
|
|
949
|
-
*
|
|
950
|
-
* @returns
|
|
951
|
-
* Without practical meaning.
|
|
952
959
|
*/
|
|
953
960
|
onPlaybackAudioFrameBeforeMixing?(
|
|
954
961
|
channelId: string,
|
|
@@ -995,9 +1002,6 @@ export interface IAudioSpectrumObserver {
|
|
|
995
1002
|
* After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrum callback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK will trigger the callback as the time interval you set to report the received remote audio data spectrum.
|
|
996
1003
|
*
|
|
997
1004
|
* @param data The audio spectrum data of the local user. See AudioSpectrumData.
|
|
998
|
-
*
|
|
999
|
-
* @returns
|
|
1000
|
-
* Whether the spectrum data is received: true : Spectrum data is received. false : No spectrum data is received.
|
|
1001
1005
|
*/
|
|
1002
1006
|
onLocalAudioSpectrum?(data: AudioSpectrumData): void;
|
|
1003
1007
|
|
|
@@ -1008,9 +1012,6 @@ export interface IAudioSpectrumObserver {
|
|
|
1008
1012
|
*
|
|
1009
1013
|
* @param spectrums The audio spectrum information of the remote user, see UserAudioSpectrumInfo. The number of arrays is the number of remote users monitored by the SDK. If the array is null, it means that no audio spectrum of remote users is detected.
|
|
1010
1014
|
* @param spectrumNumber The number of remote users.
|
|
1011
|
-
*
|
|
1012
|
-
* @returns
|
|
1013
|
-
* Whether the spectrum data is received: true : Spectrum data is received. false : No spectrum data is received.
|
|
1014
1015
|
*/
|
|
1015
1016
|
onRemoteAudioSpectrum?(
|
|
1016
1017
|
spectrums: UserAudioSpectrumInfo[],
|
|
@@ -1031,9 +1032,6 @@ export interface IVideoEncodedFrameObserver {
|
|
|
1031
1032
|
* @param imageBuffer The encoded video image buffer.
|
|
1032
1033
|
* @param length The data length of the video image.
|
|
1033
1034
|
* @param videoEncodedFrameInfo For the information of the encoded video frame, see EncodedVideoFrameInfo.
|
|
1034
|
-
*
|
|
1035
|
-
* @returns
|
|
1036
|
-
* Without practical meaning.
|
|
1037
1035
|
*/
|
|
1038
1036
|
onEncodedVideoFrameReceived?(
|
|
1039
1037
|
uid: number,
|
|
@@ -1064,18 +1062,12 @@ export interface IVideoFrameObserver {
|
|
|
1064
1062
|
/**
|
|
1065
1063
|
* Occurs each time the SDK receives a video frame captured by local devices.
|
|
1066
1064
|
*
|
|
1067
|
-
*
|
|
1068
|
-
* The video data that this callback gets has not been pre-processed such as watermarking, cropping, and rotating.
|
|
1069
|
-
* If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel.
|
|
1065
|
+
* You can get raw video data collected by the local device through this callback.
|
|
1070
1066
|
*
|
|
1071
1067
|
* @param sourceType Video source types, including cameras, screens, or media player. See VideoSourceType.
|
|
1072
1068
|
* @param videoFrame The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows:
|
|
1073
1069
|
* macOS: I420 or CVPixelBufferRef
|
|
1074
1070
|
* Windows: YUV420
|
|
1075
|
-
*
|
|
1076
|
-
* @returns
|
|
1077
|
-
* When the video processing mode is ProcessModeReadOnly : true : Reserved for future use. false : Reserved for future use.
|
|
1078
|
-
* When the video processing mode is ProcessModeReadWrite : true : Sets the SDK to receive the video frame. false : Sets the SDK to discard the video frame.
|
|
1079
1071
|
*/
|
|
1080
1072
|
onCaptureVideoFrame?(
|
|
1081
1073
|
sourceType: VideoSourceType,
|
|
@@ -1086,16 +1078,13 @@ export interface IVideoFrameObserver {
|
|
|
1086
1078
|
* Occurs each time the SDK receives a video frame before encoding.
|
|
1087
1079
|
*
|
|
1088
1080
|
* After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data before encoding and then process the data according to your particular scenarios. After processing, you can send the processed video data back to the SDK in this callback.
|
|
1081
|
+
* Due to framework limitations, this callback does not support sending processed video data back to the SDK.
|
|
1089
1082
|
* The video data that this callback gets has been preprocessed, with its content cropped and rotated, and the image enhanced.
|
|
1090
1083
|
*
|
|
1091
1084
|
* @param sourceType The type of the video source. See VideoSourceType.
|
|
1092
1085
|
* @param videoFrame The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows:
|
|
1093
1086
|
* macOS: I420 or CVPixelBufferRef
|
|
1094
1087
|
* Windows: YUV420
|
|
1095
|
-
*
|
|
1096
|
-
* @returns
|
|
1097
|
-
* When the video processing mode is ProcessModeReadOnly : true : Reserved for future use. false : Reserved for future use.
|
|
1098
|
-
* When the video processing mode is ProcessModeReadWrite : true : Sets the SDK to receive the video frame. false : Sets the SDK to discard the video frame.
|
|
1099
1088
|
*/
|
|
1100
1089
|
onPreEncodeVideoFrame?(
|
|
1101
1090
|
sourceType: VideoSourceType,
|
|
@@ -1112,16 +1101,13 @@ export interface IVideoFrameObserver {
|
|
|
1112
1101
|
*
|
|
1113
1102
|
* After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data sent from the remote end before rendering, and then process it according to the particular scenarios.
|
|
1114
1103
|
* If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel.
|
|
1104
|
+
* Due to framework limitations, this callback does not support sending processed video data back to the SDK.
|
|
1115
1105
|
*
|
|
1116
1106
|
* @param channelId The channel ID.
|
|
1117
1107
|
* @param remoteUid The user ID of the remote user who sends the current video frame.
|
|
1118
1108
|
* @param videoFrame The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows:
|
|
1119
1109
|
* macOS: I420 or CVPixelBufferRef
|
|
1120
1110
|
* Windows: YUV420
|
|
1121
|
-
*
|
|
1122
|
-
* @returns
|
|
1123
|
-
* When the video processing mode is ProcessModeReadOnly : true : Reserved for future use. false : Reserved for future use.
|
|
1124
|
-
* When the video processing mode is ProcessModeReadWrite : true : Sets the SDK to receive the video frame. false : Sets the SDK to discard the video frame.
|
|
1125
1111
|
*/
|
|
1126
1112
|
onRenderVideoFrame?(
|
|
1127
1113
|
channelId: string,
|
|
@@ -1247,6 +1233,50 @@ export class MediaRecorderConfiguration {
|
|
|
1247
1233
|
recorderInfoUpdateInterval?: number;
|
|
1248
1234
|
}
|
|
1249
1235
|
|
|
1236
|
+
/**
|
|
1237
|
+
* Facial information observer.
|
|
1238
|
+
*
|
|
1239
|
+
* You can call registerFaceInfoObserver to register or unregister the IFaceInfoObserver object.
|
|
1240
|
+
*/
|
|
1241
|
+
export interface IFaceInfoObserver {
|
|
1242
|
+
/**
|
|
1243
|
+
* Occurs when the facial information processed by speech driven extension is received.
|
|
1244
|
+
*
|
|
1245
|
+
* @param outFaceInfo Output parameter, the JSON string of the facial information processed by the voice driver plugin, including the following fields:
|
|
1246
|
+
* faces: Object sequence. The collection of facial information, with each face corresponding to an object.
|
|
1247
|
+
* blendshapes: Object. The collection of face capture coefficients, named according to ARkit standards, with each key-value pair representing a blendshape coefficient. The blendshape coefficient is a floating point number with a range of [0.0, 1.0].
|
|
1248
|
+
* rotation: Object sequence. The rotation of the head, which includes the following three key-value pairs, with values as floating point numbers ranging from -180.0 to 180.0:
|
|
1249
|
+
* pitch: Head pitch angle. A positve value means looking down, while a negative value means looking up.
|
|
1250
|
+
* yaw: Head yaw angle. A positve value means turning left, while a negative value means turning right.
|
|
1251
|
+
* roll: Head roll angle. A positve value means tilting to the right, while a negative value means tilting to the left.
|
|
1252
|
+
* timestamp: String. The timestamp of the output result, in milliseconds. Here is an example of JSON:
|
|
1253
|
+
* {
|
|
1254
|
+
* "faces":[{
|
|
1255
|
+
* "blendshapes":{
|
|
1256
|
+
* "eyeBlinkLeft":0.9, "eyeLookDownLeft":0.0, "eyeLookInLeft":0.0, "eyeLookOutLeft":0.0, "eyeLookUpLeft":0.0,
|
|
1257
|
+
* "eyeSquintLeft":0.0, "eyeWideLeft":0.0, "eyeBlinkRight":0.0, "eyeLookDownRight":0.0, "eyeLookInRight":0.0,
|
|
1258
|
+
* "eyeLookOutRight":0.0, "eyeLookUpRight":0.0, "eyeSquintRight":0.0, "eyeWideRight":0.0, "jawForward":0.0,
|
|
1259
|
+
* "jawLeft":0.0, "jawRight":0.0, "jawOpen":0.0, "mouthClose":0.0, "mouthFunnel":0.0, "mouthPucker":0.0,
|
|
1260
|
+
* "mouthLeft":0.0, "mouthRight":0.0, "mouthSmileLeft":0.0, "mouthSmileRight":0.0, "mouthFrownLeft":0.0,
|
|
1261
|
+
* "mouthFrownRight":0.0, "mouthDimpleLeft":0.0, "mouthDimpleRight":0.0, "mouthStretchLeft":0.0, "mouthStretchRight":0.0,
|
|
1262
|
+
* "mouthRollLower":0.0, "mouthRollUpper":0.0, "mouthShrugLower":0.0, "mouthShrugUpper":0.0, "mouthPressLeft":0.0,
|
|
1263
|
+
* "mouthPressRight":0.0, "mouthLowerDownLeft":0.0, "mouthLowerDownRight":0.0, "mouthUpperUpLeft":0.0, "mouthUpperUpRight":0.0,
|
|
1264
|
+
* "browDownLeft":0.0, "browDownRight":0.0, "browInnerUp":0.0, "browOuterUpLeft":0.0, "browOuterUpRight":0.0,
|
|
1265
|
+
* "cheekPuff":0.0, "cheekSquintLeft":0.0, "cheekSquintRight":0.0, "noseSneerLeft":0.0, "noseSneerRight":0.0,
|
|
1266
|
+
* "tongueOut":0.0
|
|
1267
|
+
* },
|
|
1268
|
+
* "rotation":{"pitch":30.0, "yaw":25.5, "roll":-15.5},
|
|
1269
|
+
*
|
|
1270
|
+
* }],
|
|
1271
|
+
* "timestamp":"654879876546"
|
|
1272
|
+
* }
|
|
1273
|
+
*
|
|
1274
|
+
* @returns
|
|
1275
|
+
* true : Facial information JSON parsing successful. false : Facial information JSON parsing failed.
|
|
1276
|
+
*/
|
|
1277
|
+
onFaceInfo?(outFaceInfo: string): void;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1250
1280
|
/**
|
|
1251
1281
|
* @ignore
|
|
1252
1282
|
*/
|
package/ts/Private/IAgoraLog.ts
CHANGED
|
@@ -69,7 +69,7 @@ export enum LogFilterType {
|
|
|
69
69
|
*/
|
|
70
70
|
export class LogConfig {
|
|
71
71
|
/**
|
|
72
|
-
* The complete path of the log files.
|
|
72
|
+
* The complete path of the log files. Agora recommends using the default log directory. If you need to modify the default directory, ensure that the directory you specify exists and is writable. The default log directory is:
|
|
73
73
|
* macOS:
|
|
74
74
|
* If Sandbox is enabled: App Sandbox/Library/Logs/agorasdk.log. For example, /Users/<username>/Library/Containers/<AppBundleIdentifier>/Data/Library/Logs/agorasdk.log.
|
|
75
75
|
* If Sandbox is disabled: ~/Library/Logs/agorasdk.log
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
ExternalVideoFrame,
|
|
11
11
|
ExternalVideoSourceType,
|
|
12
12
|
IAudioFrameObserver,
|
|
13
|
+
IFaceInfoObserver,
|
|
13
14
|
IVideoEncodedFrameObserver,
|
|
14
15
|
IVideoFrameObserver,
|
|
15
16
|
} from './AgoraMediaBase';
|
|
@@ -98,9 +99,28 @@ export abstract class IMediaEngine {
|
|
|
98
99
|
observer: IVideoEncodedFrameObserver
|
|
99
100
|
): number;
|
|
100
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Registers a facial information observer.
|
|
104
|
+
*
|
|
105
|
+
* You can call this method to register the onFaceInfo callback to receive the facial information processed by Agora speech driven extension. When calling this method to register a facial information observer, you can register callbacks in the IFaceInfoObserver class as needed. After successfully registering the facial information observer, the SDK triggers the callback you have registered when it captures the facial information converted by the speech driven extension.
|
|
106
|
+
* Ensure that you call this method before joining a channel.
|
|
107
|
+
* Before calling this method, you need to make sure that the speech driven extension has been enabled by calling enableExtension.
|
|
108
|
+
*
|
|
109
|
+
* @param observer Facial information observer, see IFaceInfoObserver.
|
|
110
|
+
*
|
|
111
|
+
* @returns
|
|
112
|
+
* 0: Success.
|
|
113
|
+
* < 0: Failure.
|
|
114
|
+
*/
|
|
115
|
+
abstract registerFaceInfoObserver(observer: IFaceInfoObserver): number;
|
|
116
|
+
|
|
101
117
|
/**
|
|
102
118
|
* Pushes the external audio frame.
|
|
103
119
|
*
|
|
120
|
+
* Before calling this method to push external audio data, perform the following steps:
|
|
121
|
+
* Call createCustomAudioTrack to create a custom audio track and get the audio track ID.
|
|
122
|
+
* Call joinChannel to join the channel. In ChannelMediaOptions, set publishCustomAduioTrackId to the audio track ID that you want to publish, and set publishCustomAudioTrack to true.
|
|
123
|
+
*
|
|
104
124
|
* @param frame The external audio frame. See AudioFrame.
|
|
105
125
|
* @param trackId The audio track ID. If you want to publish a custom external audio source, set this parameter to the ID of the corresponding custom audio track you want to publish.
|
|
106
126
|
*
|
|
@@ -113,13 +133,12 @@ export abstract class IMediaEngine {
|
|
|
113
133
|
/**
|
|
114
134
|
* Pulls the remote audio data.
|
|
115
135
|
*
|
|
116
|
-
* Before calling this method,
|
|
117
|
-
* This method only supports pulling data from custom audio source. If you need to pull the data captured by the SDK, do not call this method.
|
|
136
|
+
* Before calling this method, call setExternalAudioSink (enabled : true) to notify the app to enable and set the external audio rendering. After a successful call of this method, the app pulls the decoded and mixed audio data for playback.
|
|
118
137
|
* Call this method after joining a channel.
|
|
119
|
-
*
|
|
120
|
-
*
|
|
138
|
+
* Both this method and onPlaybackAudioFrame callback can be used to get audio data after remote mixing. Note that after calling setExternalAudioSink to enable external audio rendering, the app no longer receives data from the onPlaybackAudioFrame callback. Therefore, you should choose between this method and the onPlaybackAudioFrame callback based on your actual business requirements. The specific distinctions between them are as follows:
|
|
139
|
+
* After calling this method, the app automatically pulls the audio data from the SDK. By setting the audio data parameters, the SDK adjusts the frame buffer to help the app handle latency, effectively avoiding audio playback jitter.
|
|
121
140
|
* The SDK sends the audio data to the app through the onPlaybackAudioFrame callback. Any delay in processing the audio frames may result in audio jitter.
|
|
122
|
-
*
|
|
141
|
+
* This method is only used for retrieving audio data after remote mixing. If you need to get audio data from different audio processing stages such as capture and playback, you can register the corresponding callbacks by calling registerAudioFrameObserver.
|
|
123
142
|
*
|
|
124
143
|
* @returns
|
|
125
144
|
* The AudioFrame instance, if the method call succeeds.
|
|
@@ -302,4 +321,15 @@ export abstract class IMediaEngine {
|
|
|
302
321
|
abstract unregisterVideoEncodedFrameObserver(
|
|
303
322
|
observer: IVideoEncodedFrameObserver
|
|
304
323
|
): number;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Unregisters a facial information observer.
|
|
327
|
+
*
|
|
328
|
+
* @param observer Facial information observer, see IFaceInfoObserver.
|
|
329
|
+
*
|
|
330
|
+
* @returns
|
|
331
|
+
* 0: Success.
|
|
332
|
+
* < 0: Failure.
|
|
333
|
+
*/
|
|
334
|
+
abstract unregisterFaceInfoObserver(observer: IFaceInfoObserver): number;
|
|
305
335
|
}
|
|
@@ -205,7 +205,16 @@ export abstract class IMediaPlayer {
|
|
|
205
205
|
abstract selectAudioTrack(index: number): number;
|
|
206
206
|
|
|
207
207
|
/**
|
|
208
|
-
*
|
|
208
|
+
* Selects the audio tracks that you want to play on your local device and publish to the channel respectively.
|
|
209
|
+
*
|
|
210
|
+
* You can call this method to determine the audio track to be played on your local device and published to the channel. Before calling this method, you need to open the media file with the openWithMediaSource method and set enableMultiAudioTrack in MediaSource as true.
|
|
211
|
+
*
|
|
212
|
+
* @param playoutTrackIndex The index of audio tracks for local playback. You can obtain the index through getStreamInfo.
|
|
213
|
+
* @param publishTrackIndex The index of audio tracks to be published in the channel. You can obtain the index through getStreamInfo.
|
|
214
|
+
*
|
|
215
|
+
* @returns
|
|
216
|
+
* 0: Success.
|
|
217
|
+
* < 0: Failure.
|
|
209
218
|
*/
|
|
210
219
|
abstract selectMultiAudioTrack(
|
|
211
220
|
playoutTrackIndex: number,
|