@byteplus/rtc 4.46.0 → 4.46.2
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/index.d.ts +33 -16
- package/index.esm.min.js +2 -2
- package/index.min.js +2 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -680,31 +680,44 @@ export interface AudioCodecProfile {
|
|
|
680
680
|
chn: number;
|
|
681
681
|
sr: number;
|
|
682
682
|
}
|
|
683
|
+
/**
|
|
684
|
+
* 音频采集参数下发,定义参考文档:https://bytedance.feishu.cn/sheets/shtcnu2nj9ghFLWiANQb6A1snxh?sheet=7d720e
|
|
685
|
+
*/
|
|
683
686
|
export interface IEngineBAC {
|
|
684
|
-
codec?:
|
|
685
|
-
|
|
686
|
-
|
|
687
|
+
codec?: {
|
|
688
|
+
enc_fs?: number;
|
|
689
|
+
};
|
|
690
|
+
adm?: {
|
|
691
|
+
play?: AudioCodecProfile;
|
|
692
|
+
record?: AudioCodecProfile;
|
|
693
|
+
};
|
|
687
694
|
agc?: any;
|
|
688
695
|
aec?: any;
|
|
689
696
|
ans?: any;
|
|
690
697
|
}
|
|
698
|
+
/**
|
|
699
|
+
* 音频编码参数下发,定义参考文档:https://bytedance.feishu.cn/sheets/shtcnu2nj9ghFLWiANQb6A1snxh?sheet=7d720e
|
|
700
|
+
*/
|
|
691
701
|
export interface IEngineANM {
|
|
692
|
-
enc_param
|
|
702
|
+
enc_param?: {
|
|
693
703
|
bitrate: number;
|
|
694
704
|
chn: number;
|
|
705
|
+
sr: number;
|
|
695
706
|
};
|
|
696
707
|
}
|
|
697
708
|
export interface IAudioConfig {
|
|
698
|
-
bitrate
|
|
699
|
-
channel
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
709
|
+
bitrate?: number;
|
|
710
|
+
channel?: number;
|
|
711
|
+
playChannel?: number;
|
|
712
|
+
sampleRate?: number;
|
|
713
|
+
playbackRate?: number;
|
|
714
|
+
agc?: boolean;
|
|
715
|
+
aec?: boolean;
|
|
716
|
+
ans?: boolean;
|
|
704
717
|
}
|
|
705
718
|
declare class AudioProfileManager {
|
|
706
|
-
engineBAC:
|
|
707
|
-
engineANM:
|
|
719
|
+
engineBAC: Partial<IEngineBAC>;
|
|
720
|
+
engineANM: IEngineANM;
|
|
708
721
|
bitrate?: number;
|
|
709
722
|
sampleRate?: number;
|
|
710
723
|
channel?: number;
|
|
@@ -715,6 +728,10 @@ declare class AudioProfileManager {
|
|
|
715
728
|
private _init;
|
|
716
729
|
updateEngineBAC(newProfile?: IEngineBAC): void;
|
|
717
730
|
updateEngineANM(newProfile?: IEngineANM): void;
|
|
731
|
+
/**
|
|
732
|
+
* 通过setAudioProfile设置进来的预设编码参数
|
|
733
|
+
* @param profile AudioProfile
|
|
734
|
+
*/
|
|
718
735
|
setAudioProfile(profile: AudioProfileType): void;
|
|
719
736
|
setBitrate(bitrate: number): void;
|
|
720
737
|
setAEC(enable: boolean): void;
|
|
@@ -2744,7 +2761,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2744
2761
|
* @brief Send point-to-point text messages to a specified user in the room.
|
|
2745
2762
|
* The recipient receives the message via [onUserMessageReceived](104479#onusermessagereceived) once the message is sent successfully.
|
|
2746
2763
|
* @param userId User ID of the recipient
|
|
2747
|
-
* @param message Text to be sent within
|
|
2764
|
+
* @param message Text to be sent within 64 KB
|
|
2748
2765
|
* @return
|
|
2749
2766
|
* @notes Call [joinRoom](#joinroom) to join the room before calling this API.
|
|
2750
2767
|
* @region Message
|
|
@@ -2755,7 +2772,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2755
2772
|
* @brief Send point-to-point binary messages to a specified user in the room.
|
|
2756
2773
|
* The recipient receives the message via [onUserBinaryMessageReceived](104479#onuserbinarymessagereceived) once the message is sent successfully.
|
|
2757
2774
|
* @param userId User ID of the recipient
|
|
2758
|
-
* @param message Binary to be sent within
|
|
2775
|
+
* @param message Binary to be sent within 64 KB
|
|
2759
2776
|
* @return
|
|
2760
2777
|
* @notes Call [joinRoom](#joinroom) to join the room before calling this API.
|
|
2761
2778
|
* @region Message
|
|
@@ -2765,7 +2782,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2765
2782
|
/**
|
|
2766
2783
|
* @brief Send text messaging to all other users in the room.
|
|
2767
2784
|
* Users in the room will receive message via [onRoomMessageReceived](104479#onroommessagereceived) once the message is sent successfully.
|
|
2768
|
-
* @param message Text to be sent within
|
|
2785
|
+
* @param message Text to be sent within 64 KB
|
|
2769
2786
|
* @return
|
|
2770
2787
|
* @region Message
|
|
2771
2788
|
*/
|
|
@@ -2774,7 +2791,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2774
2791
|
/**
|
|
2775
2792
|
* @brief Send binary messaging to all other users in the room.
|
|
2776
2793
|
* Users in the room will receive binary message via [onRoomBinaryMessageReceived](104479#onroombinarymessagereceived) once the message is sent successfully.
|
|
2777
|
-
* @param message Binary message to be sent within
|
|
2794
|
+
* @param message Binary message to be sent within 64 KB
|
|
2778
2795
|
* @return
|
|
2779
2796
|
* @region Message
|
|
2780
2797
|
*/
|