@byteplus/rtc 4.45.2 → 4.45.3

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 CHANGED
@@ -690,31 +690,44 @@ export interface AudioCodecProfile {
690
690
  chn: number;
691
691
  sr: number;
692
692
  }
693
+ /**
694
+ * 音频采集参数下发,定义参考文档:https://bytedance.feishu.cn/sheets/shtcnu2nj9ghFLWiANQb6A1snxh?sheet=7d720e
695
+ */
693
696
  export interface IEngineBAC {
694
- codec?: any;
695
- play?: AudioCodecProfile;
696
- record?: AudioCodecProfile;
697
+ codec?: {
698
+ enc_fs?: number;
699
+ };
700
+ adm?: {
701
+ play?: AudioCodecProfile;
702
+ record?: AudioCodecProfile;
703
+ };
697
704
  agc?: any;
698
705
  aec?: any;
699
706
  ans?: any;
700
707
  }
708
+ /**
709
+ * 音频编码参数下发,定义参考文档:https://bytedance.feishu.cn/sheets/shtcnu2nj9ghFLWiANQb6A1snxh?sheet=7d720e
710
+ */
701
711
  export interface IEngineANM {
702
- enc_param: {
712
+ enc_param?: {
703
713
  bitrate: number;
704
714
  chn: number;
715
+ sr: number;
705
716
  };
706
717
  }
707
718
  export interface IAudioConfig {
708
- bitrate: number;
709
- channel: number;
710
- sampleRate: number;
711
- agc: boolean;
712
- aec: boolean;
713
- ans: boolean;
719
+ bitrate?: number;
720
+ channel?: number;
721
+ playChannel?: number;
722
+ sampleRate?: number;
723
+ playbackRate?: number;
724
+ agc?: boolean;
725
+ aec?: boolean;
726
+ ans?: boolean;
714
727
  }
715
728
  declare class AudioProfileManager {
716
- engineBAC: any;
717
- engineANM: any;
729
+ engineBAC: Partial<IEngineBAC>;
730
+ engineANM: IEngineANM;
718
731
  bitrate?: number;
719
732
  sampleRate?: number;
720
733
  channel?: number;
@@ -725,6 +738,10 @@ declare class AudioProfileManager {
725
738
  private _init;
726
739
  updateEngineBAC(newProfile?: IEngineBAC): void;
727
740
  updateEngineANM(newProfile?: IEngineANM): void;
741
+ /**
742
+ * 通过setAudioProfile设置进来的预设编码参数
743
+ * @param profile AudioProfile
744
+ */
728
745
  setAudioProfile(profile: AudioProfileType): void;
729
746
  setBitrate(bitrate: number): void;
730
747
  setAEC(enable: boolean): void;
@@ -1559,7 +1576,8 @@ declare enum EngineEventsTypes {
1559
1576
  onNetworkQuality = "onNetworkQuality",
1560
1577
  onSimulcastSubscribeFallback = "onSimulcastSubscribeFallback",
1561
1578
  onRemoteVideoSizeChanged = "onRemoteVideoSizeChanged",
1562
- onLocalVideoSizeChanged = "onLocalVideoSizeChanged"
1579
+ onLocalVideoSizeChanged = "onLocalVideoSizeChanged",
1580
+ onServerParamsSetResult = "onServerParamsSetResult"
1563
1581
  }
1564
1582
 
1565
1583
  /**
@@ -2397,6 +2415,14 @@ export interface IEngineEvents {
2397
2415
  height: number;
2398
2416
  };
2399
2417
  }) => void;
2418
+
2419
+ /**
2420
+ * @brief Event of whether the setting for the message server successes
2421
+ * @param error Error code
2422
+ * @notes + This event notifies you the result after the call of [setServerParams](104478#setServerParams).
2423
+ * + If the client losts connection after the call of [setServerParams](104478#setServerParams) this event notifies once the client reconnects.
2424
+ */
2425
+ [EngineEventsTypes.onServerParamsSetResult]: (error?: ErrorCode) => void;
2400
2426
  }
2401
2427
 
2402
2428
  /**
@@ -2992,7 +3018,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2992
3018
  * @param signature Dynamic signature.
2993
3019
  * @param url Address of the IM server
2994
3020
  * @return
2995
- * @notes Call [login](#login) before calling this API.
3021
+ * @notes + Call [login](#login) before calling this API.
3022
+ * + [onServerParamsSetResult](104479#onserverparamssetresult) notifies you whether the setting successes.
2996
3023
  */
2997
3024
  setServerParams(signature: string, url: string): Promise<any>;
2998
3025
 
@@ -3030,13 +3057,13 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
3030
3057
 
3031
3058
  /**
3032
3059
  * @brief Starts publishing a public media stream.
3033
- * A public stream is a media stream that does not belong to any room or any user. Users with the same `appID` can call [startPlayPublicStream](#startplaypublicstream) to subscribe to and play the public stream.
3034
3060
  * @param publicStreamId The public stream's ID.
3035
3061
  * @param publicStreamParam The public stream's parameters.
3036
3062
  * A public stream can contain several media streams and will appears as the designated layout.
3037
3063
  * If the designated media stream is not published yet, the public stream will automatically update once the media stream is published.
3038
3064
  * @return
3039
- * @notes + You cannot update the parameters of the public stream by repeatedly calling this API with the same stream ID by the same user. Call [updatePublicStreamParam](#updatepublicstreamparam) to update the parameters instead.
3065
+ * @notes + Users with the same `appID` can call [startPlayPublicStream](#startplaypublicstream) to subscribe to and play the public stream despite whether he/she has join the room.
3066
+ * + You cannot update the parameters of the public stream by repeatedly calling this API with the same stream ID by the same user. Call [updatePublicStreamParam](#updatepublicstreamparam) to update the parameters instead.
3040
3067
  * + Users with different `userID` can call this API with the same stream ID to update the parameters.
3041
3068
  * + Call this API with different stream ID to publish multiple public streams.
3042
3069
  * + Call [stopPushPublicStream](#stoppushpublicstream) to stop publishing the public stream.