如果你希望从此前版本的 iOS 客户端 SDK 升级到最新的客户端 SDK,请在工程文件中,替换最新的客户端 SDK 文件,并参考本文完成 API,回调,参数类型等的替换。

升级过程中,你可能需要参考历史版本文档归档。

3.58
类型变更
变更详情功能模块改动的数据类型说明
新增枚举值音效ByteRTCPlayerState
3.57
重要说明
  1. 该版本将必选库 RealXBase.xcframework 从主库 VolcEngineRTC.xcframework 中拆出,如果你只集成了主库或集成了主库和部分自选插件,则需对集成方式进行调整。3.57 以前版本需要引入一个必选主库 VolcEngineRTC.xcframework,3.57 及之后版本需要引入两个必选主库 VolcEngineRTC.xcframework 和 RealXBase.xcframework,参看 iOS 集成指南的更新。

  2. 提供 SAMI 音频技术动态库插件、VP8 编解码插件、AAC 软件编解码插件,详情参看按需集成插件以缩小应用体积。

  3. 该版本对所有不规范的 API 命名进行了统一修复,提升代码规范度和易用性。以下仅为变更示例,请至类型详情页查看所用类型的具体改动。

    变更对象变更详情旧版示例新版示例
    枚举值统一以 “ByteRTC” 为前缀,改为“类名+值名”以 ByteRTCSEICountPerFrame 为例:
    • kSingleSEIPerFrame = 0,
    • kMultiSEIPerFrame = 1,
    以 ByteRTCSEICountPerFrame 为例:
    • ByteRTCSEICountPerFrameSingle = 0,
    • ByteRTCSEICountPerFrameMulti = 1,
    结构体成员改为首字母小写,驼峰标识以 ByteRTCLocalStreamStats 为例:
    • audio_stats
    • video_stats
    • tx_quality
    • rx_quality
    • is_screen
    以 ByteRTCLocalStreamStats 为例:
    • audioStats
    • videoStats
    • txQuality
    • rxQuality
    • isScreen
方法变更
变更详情功能模块废弃的类/接口替代的类/接口说明
删除主调类ByteRTCEngineKitByteRTCVideo
删除引擎管理ByteRTCVideo.setEnvRTCVideo.createRTCVideo:delegate:parameters:咨询技术支持获取详细信息。
废弃自定义流处理setLocalVideoSinksetLocalVideoRender:withSink:withLocalRenderConfig:原接口废弃,新接口支持回调采集后的视频帧。新接口使用默认值时行为与原接口一致。
废弃自定义流处理setRemoteVideoSinksetRemoteVideoRender:withSink:withRemoteRenderConfig:原接口废弃,新接口支持将远端流镜像渲染、将旋转角旋转为 0 度。新接口使用默认值时行为与原接口一致。
使用范围拓展视频处理setVideoDecoderConfigsetVideoDecoderConfig旧版接口仅支持在手动订阅时使用,新增支持在自动订阅时使用。
废弃视频管理- (int)updateRemoteStreamVideoCanvas:(ByteRTCRemoteStreamKey * _Nonnull)key withRenderMode:(ByteRTCRenderMode)renderMode withBackgroundColor:(NSUInteger)backgroundColor NS_SWIFT_NAME(updateRemoteStreamVideoCanvas(_:withRenderMode:withBackgroundColor:));- (int)updateRemoteStreamVideoCanvas:(ByteRTCRemoteStreamKey * _Nonnull)key withRemoteVideoRenderConfig:(ByteRTCRemoteVideoRenderConfig * _Nonnull)remoteVideoRenderConfig NS_SWIFT_NAME(updateRemoteStreamVideoCanvas(_:withRemoteVideoRenderConfig:));新接口通过 remoteVideoRenderConfig 参数统一设置渲染模式和背景颜色,另外新增 renderRotation 参数,支持设置视频帧旋转角度。
删除音频处理ByteRTCAudioProcessorByteRTCAudioFrameProcessorByteRTCAudioProcessor 已在 3.42 中废弃。此次进行了删除。
参数数据结构新增成员变量音频管理enableAudioPropertiesReportenableAudioPropertiesReport新增参数 enableVoicePitch 控制是否回调本地用户的人声基频。
回调变更
变更详情功能模块废弃的类/接口替代的类/接口说明
删除主回调类ByteRTCEngineDelegateByteRTCVideoDelegate
参数变更消息(void)rtcEngineOnLogout:(ByteRTCVideo * _Nonnull)engine NS_SWIFT_NAME(rtcEngineOnLogout(_:))(void)rtcEngine:(ByteRTCVideo * _Nonnull)engine onLogout:(ByteRTCLogoutReason)reason在 onLogout 回调上新增 reason 参数,区分用户主动/被动登出。
参数数据结构新增成员变量音频管理onLocalAudioPropertiesReportonLocalAudioPropertiesReport新增参数voicePitch返回本地用户的人声基频。
类型变更
变更详情功能模块改动的数据类型说明
成员变量新增字幕翻译服务ByteRTCSubtitleMessage在字幕内容回调 rtcRoom:onSubtitleMessageReceived: 的参数 ByteRTCSubtitleMessage 中新增成员变量 language 和 mode,可用于同时收到字幕原文和字幕译文。
成员变量变更CDN 推流ByteRTCMixedStreamLayoutRegionConfig转推直播单个用户画面由设置相对于整体画面的归一化比例变更为可设置像素绝对值
错误码变更
变更详情错误码说明
枚举值增删ByteRTCUserMessageSendResult新增客户端向业务服务器发送消息失败错误码:
  • ByteRTCUserMessageSendResultE2BSSendFailed = 17
  • ByteRTCUserMessageSendResultE2BSReturnFailed = 18
  • 3.54
    重要说明
    1. 该版本 iOS 端新增音频编解码器插件、视频编解码器插件、超分插件、视频降噪插件和视频锐化插件,详情参看按需集成插件文档。
    2. 该版本为全部 API 增加返回值,通过返回值可以明确发现失败的 API 调用,定位失败原因。具体返回值的含义参看各 API 注释。
    方法变更
    变更详情功能模块变动前方法变动后方法说明
    将混音相关的类和接口按音效和音乐进行拆分,具体变动情况请参看混音相关的新旧接口对应表混音一般来说,对于短时间的音效(比如小于 20s),可以使用音效类;对于较长的音频或 PCM 数据,可以使用音乐类。
    类型变更
    变更详情类型变更前变更后说明
    参数变更ByteRTCRoomStats
    • tx_cellular_kbitrate
    • rx_cellular_kbitrate
    • txCellularKBitrate
    • rxCellularKBitrate

    附:混音相关的新旧接口对应表

    接口分类接口用途
    废弃类/接口
    新类/接口(音效)
    新类/接口(音乐)
    备注
    获取实例获取播放器实例getAudioMixingManagergetAudioEffectManagergetAudioMediaManager
    混音类ByteRTCAudioMixingManagerByteRTCAudioEffectManagerByteRTCAudioMediaManager

    混音主调接口

    将音效文件加载至内存

    • preloadAudioMixing
    • unloadAudioMixing
    • preload
    • unload
    • unloadAll
    • open
    • openWithCustomSource

    播放/停止/暂停/恢复

    • startAudioMixing
    • stopAudioMixing
    • stopAllAudioMixing
    • pauseAudioMixing
    • pauseAllAudioMixing
    • resumeAudioMixing
    • resumeAllAudioMixing
    • start
    • stop
    • stopAll
    • pause
    • pauseAll
    • resume
    • resumeAll
    • start
    • stop
    • stopAll
    • pause
    • resume

    获取/指定位置/时长

    • setAudioMixingPosition
    • getAudioMixingCurrentPosition
    • getAudioMixingDuration
    • setPosition
    • getPosition
    • getDuration
    • setPosition
    • getTotalDuration
    • getPlaybackDuration

    获取/指定音量

    • setAudioMixingVolume
    • NA
    • setVolume
    • getVolume
    • setVolume
    • getVolume
    调整音调setAudioMixingPitchNAsetAudioPitch
    设置声道模式setAudioMixingDualMonoModeNAsetAudioDualMonoMode

    获取/设置音轨数

    • getAudioTrackCount
    • selectAudioTrack

    NA

    • getAudioTrackCount
    • selectAudioTrack

    Index 取值修改为从 0 开始

    设置播放速度setAudioMixingPlaybackSpeedNAsetPlaybackSpeed
    设置播放进度回调间隔setAudioMixingProgressIntervalNAsetProgressInterval
    设置响度setAudioMixingLoudnessNAsetLoudness

    播放外部音频源

    • enableAudioMixingFrame
    • disableAudioMixingFrame
    • pushAudioMixingFrame

    NA

    • openWithCustomSource
    • pushExternalAudioFrame

    混音回调接口

    播放状态回调

    onAudioMixingStateChanged

    • setEventHandler
    • onAudioEffectPlayerStateChanged
    • setEventHandler
    • onMediaPlayerStateChanged
    • onMediaPlayerPlayingProgress

    音频数据回调

    • registerAudioFileFrameObserver
    • onAudioFileFrame

    NA

    • ByteRTCMediaPlayerAudioFrameObserver
    • onFrame
    3.52
    方法变更
    变更详情功能模块变动前方法变动后方法说明
    参数变更引擎管理feedback:info:参数数据类型变更
    废弃CDN 推流- (int)startLiveTranscoding:(NSString *_Nonnull)taskID transcoding:(ByteRTCLiveTranscoding *_Nullable)transcoding observer:(id<LiveTranscodingDelegate> _Nullable)observer;- (int)startPushMixedStreamToCDN:(NSString * _Nonnull)taskID mixedConfig:(ByteRTCMixedStreamConfig *_Nullable)config observer:(id<ByteRTCMixedStreamObserver> _Nullable)observer;合流转推直播接口/参数类型重命名,行为逻辑无变化,新旧版本类名对应关系参看该版本中的“类型变更”
    - (int)stopLiveTranscoding:(NSString *_Nonnull)taskID;- (int)stopPushStreamToCDN:(NSString *_Nonnull)taskID NS_SWIFT_NAME(stopPushStreamToCDN(_:));
    - (int)updateLiveTranscoding:(NSString *_Nonnull)taskID transcoding:(ByteRTCLiveTranscoding *_Nonnull)transcoding;- (int)updatePushMixedStreamToCDN:(NSString *_Nonnull)taskID mixedConfig:(ByteRTCMixedStreamConfig *_Nonnull)config;

    合并

    高级功能

    • -(int)updatePosition:(Position* _Nonnull) pos
    • -(int)updateSelfOrientation:(HumanOrientation* _Nonnull) orientation

    -(int)updateSelfPosition:(ByteRTCPositionInfo* _Nonnull)positionInfo;

    新接口支持本地用户同时设置自己的发声位置和发声朝向。

    • -(int)updateListenerPosition:(Position* _Nonnull) pos
    • -(int)updateListenerOrientation:(HumanOrientation* _Nonnull)orientation

    -(int)updateRemotePosition:(NSString * _Nonnull)uid positionInfo:(ByteRTCPositionInfo* _Nonnull)positionInfo;

    新接口支持本地用户设置远端用户的发声位置和发声朝向。

    回调变更
    变更详情方法说明

    参数变更

    rtcEngine:onPublicStreamSEIMessageReceived:andMessage:

    参数 sourceType 的类型由 ByteRTCSEIMessageSourceType

    变更为 ByteRTCDataMessageSourceType

    拆分为:

    类型变更
    变更详情类型变更前变更后说明
    重命名转推直播一级结构体ByteRTCLiveTranscodingByteRTCMixedStreamConfig结构体中变量名称/方法名称均有变更,请至对应的类型详情中查看
    转推直播 ObserverLiveTranscodingDelegateByteRTCMixedStreamObserver
    转推直播二级结构体ByteRTCTranscodingVideoConfigByteRTCMixedStreamVideoConfig结构体中变量名称/方法名称均有变更,请至对应的类型详情中查看
    ByteRTCTranscodingAudioConfigByteRTCMixedStreamAudioConfig
    ByteRTCTranscodingSpatialConfigByteRTCMixedStreamSpatialAudioConfig
    ByteRTCTranscodingClientMixParamByteRTCMixedStreamClientMixConfig
    ByteRTCVideoCompositingRegionByteRTCMixedStreamLayoutRegionConfig
    ByteRTCVideoCompositingLayoutByteRTCMixedStreamLayoutConfig
    转推直播相关枚举类型ByteRTCClientMixVideoFormatByteRTCMixedStreamClientMixVideoFormat各枚举类中的枚举值名称均有变更,请至对应的类型详情中查看
    ByteRTCTranscoderContentControlTypeByteRTCMixedStreamMediaType
    ByteRTCRenderModeByteRTCMixedStreamRenderMode
    ByteRTCTranscoderLayoutRegionTypeByteRTCMixedStreamLayoutRegionType
    ByteRTCAACProfileByteRTCMixedStreamAudioProfile
    ByteRTCTranscodingVideoCodecByteRTCMixedStreamVideoCodecType
    ByteRTCTranscodingAudioCodecByteRTCMixedStreamAudioCodecType
    ByteRTCStreamMixingTypeByteRTCMixedStreamType
    错误码变更
    变更详情错误码说明

    枚举值变更

    ByteRTCPublicStreamErrorCode

    新增枚举值:

    • ERROR_CODE_PULL_NO_PUSH_STREAM(1300)

    名称变更:

    • ByteRTCPublicStreamErrorCodeParamError = 1191 更新为 ByteRTCPublicStreamErrorCodePushParamError = 1191

    • ByteRTCPublicStreamErrorCodeStatusError = 1192 更新为 ByteRTCPublicStreamErrorCodePushStatusError = 1192

    • ByteRTCPublicStreamErrorCodeInternalError = 1193 更新为 ByteRTCPublicStreamErrorCodePushInternalError = 1193

    ByteRTCErrorCode

    新增枚举值 kErrorCodeJoinRoomRoomForbidden=-1025 和 kErrorCodeJoinRoomUserForbidden=-1026。
    当服务端在指定房间封禁指定用户,而此用户加入房间失败,或从房间中被踢出时收到。

    废弃枚举值 ByteRTCErrorCodeOverScreenPublishLimit=-1081, 用 ByteRTCErrorCodeOverStreamPublishLimit=-1080 代替。
    3.50
    头文件变更

    原 ByteRTCCommonDefines.h 文件拆分为 ByteRTCMediaDefines.h 及 ByteRTCRtsDefines.h

    方法变更
    变更详情功能模块变动前方法变动后方法备注

    拆分

    视频管理

    (int) registerFaceDetectionObserver:(_Nullable id<ByteRTCFaceDetectionObserver>)faceDetectionObserver withInterval:(NSInteger)interval;

    解除人脸识别与视频特效之间的耦合,提升接口易用性。

    参数变更

    消息

    (int64_t)sendUserMessage:(NSString *_Nonnull)userId message:(NSString *_Nonnull)message config:(ByteRTCMessageConfig)config;

    (NSInteger)sendUserMessage:(NSString *_Nonnull)userId message:(NSString *_Nonnull)message config:(ByteRTCMessageConfig)config;

    返回参数类型由 int64_t 变更为 NSInteger

    (int64_t)sendUserBinaryMessage:(NSString * _Nonnull)uid message:(NSData * _Nonnull)message config:(ByteRTCMessageConfig)config;(NSInteger)sendUserBinaryMessage:(NSString * _Nonnull)uid message:(NSData * _Nonnull)message config:(ByteRTCMessageConfig)config;
    (int64_t)sendRoomMessage:(NSString *_Nonnull)message NS_SWIFT_NAME(sendRoomMessage(_:));(NSInteger)sendRoomMessage:(NSString *_Nonnull)message NS_SWIFT_NAME(sendRoomMessage(_:));
    (int64_t)sendRoomBinaryMessage:(NSData * _Nonnull)message NS_SWIFT_NAME(sendRoomBinaryMessage(_:));(NSInteger)sendRoomBinaryMessage:(NSData * _Nonnull)message NS_SWIFT_NAME(sendRoomBinaryMessage(_:));
    (int64_t)sendUserMessageOutsideRoom:(NSString * _Nonnull)userId message:(NSString * _Nonnull)messageStr config:(ByteRTCMessageConfig)config;(NSInteger)sendUserMessageOutsideRoom:(NSString * _Nonnull)userId message:(NSString * _Nonnull)messageStr config:(ByteRTCMessageConfig)config;
    (int64_t)sendUserBinaryMessageOutsideRoom:(NSString * _Nonnull)userId message:(NSData * _Nonnull)messageStr config:(ByteRTCMessageConfig)config;(NSInteger)sendUserBinaryMessageOutsideRoom:(NSString * _Nonnull)userId message:(NSData * _Nonnull)messageStr config:(ByteRTCMessageConfig)config;
    (int64_t)sendServerMessage:(NSString * _Nonnull)messageStr;(NSInteger)sendServerMessage:(NSString * _Nonnull)messageStr;
    (int64_t)sendServerBinaryMessage:(NSData * _Nonnull)messageStr;(NSInteger)sendServerBinaryMessage:(NSData * _Nonnull)messageStr;

    参数类型变更

    屏幕共享

    -(int)setScreenVideoEncoderConfig:(ByteRTCVideoEncoderConfig * _Nullable) screen_solution;

    -(int)setScreenVideoEncoderConfig:(ByteRTCScreenVideoEncoderConfig * _Nullable) screen_solution;

    参数类型变更为新增的 ByteRTCScreenVideoEncoderConfig

    行为变更

    屏幕共享

    • setVideoSourceType:WithStreamIndex:: 屏幕流默认为外部源

    • setScreenAudioSourceType:: 当前设置为内部源时,且已开启了采集,调用该接口切换为外部源时,不会停止内部采集

    • startScreenCapture:bundleId:: 当前为外部源时,调用本接口将自动切换为内部源,并开启采集

    • stopScreenCapture: 当前为外部源时,调用本接口将关闭外部采集

    - startScreenCapture:bundleId:: 当前为外部源时,调用本接口失败,并触发 rtcEngine:onVideoDeviceWarning:deviceType:deviceWarning:或 rtcEngine:onAudioDeviceWarning:deviceType:deviceWarning:

    - stopScreenCapture: 当前为外部源时,调用本接口失败,并触发 rtcEngine:onVideoDeviceWarning:deviceType:deviceWarning:或 rtcEngine:onAudioDeviceWarning:deviceType:deviceWarning:

    优化屏幕共享接口的行为

    所属类型变更、名称变更、参数变更

    音视频处理

    • (int)checkVideoEffectLicense:(NSString * _Nonnull)licenseFile;

    • (void)setVideoEffectAlgoModelPath:(NSString * _Nonnull)modelPath;

    (int) initCVResource:(NSString* _Nonnull)license_file withAlgoModelDir: (NSString* _Nonnull)algo_model_dir;

    • 统一从 ByteRTCVideo 类下调整到 ByteRTCVideoEffect 类下

    • 统一返回值

    (int)enableVideoEffect:(BOOL)enabled;

    (int) setVideoEffectNodes:(NSArray <NSString *> *_Nonnull)effectNodePaths;(int) setEffectNodes:(NSArray<NSString*>*_Nonnull)effect_nodes;
    (int) updateVideoEffectNode:(NSString * _Nonnull)nodePath nodeKey:(NSString * _Nonnull)nodeKey nodeValue:(float) nodeValue;(int) updateEffectNode:(NSString* _Nonnull)node key:(NSString* _Nonnull)key value:(float) value;

    (int) setBackgroundSticker:(NSString* _Nullable)modelPath source:(ByteRTCVirtualBackgroundSource* _Nonnull)source;

    (int) setVideoEffectColorFilter:(NSString * _Nonnull)resPath;(int) setColorFilter:(NSString* _Nonnull)filter_res;
    (int) setVideoEffectColorFilterIntensity:(float) intensity;(int) setColorFilterIntensity:(float) intensity;

    参数变更

    消息

    (int)sendSEIMessage:(ByteRTCStreamIndex)streamIndex andMessage:(NSData* _Nonnull)message andRepeatCount:(int)repeatCount;

    (int)sendSEIMessage:(ByteRTCStreamIndex)streamIndex andMessage:(NSData* _Nonnull)message andRepeatCount:(int)repeatCount andCountPerFrame:(ByteRTCSEICountPerFrame) mode;

    支持 SEI 多发模式,即在 1 帧间隔内多次发送 SEI 数据时,多个 SEI 随下个视频帧同时发送。

    多个模块

    返回值类型变化,例如:

    • 旧方法——(void)subscribeStream:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;

    • 新方法——(int)subscribeStream:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;

    以下接口返回值类型由 void 变为 int,具体 int 值含义参考新增数据结构 ByteRTCReturnStatus:
    subscribeStream
    subscribeScreen
    setVoiceChangerType
    setVoiceReverbType
    login
    以下接口返回值类型由 BOOL 变为 int,具体 int 值含义参考新增数据结构 ByteRTCReturnStatus:
    pushExternalEncodedVideoFrame
    以下接口返回值类型由 BOOL 变为 void:
    setUserVisibility
    setMultiDeviceAVSync
    registerAudioProcessor
    以下接口返回值类型由 int 变为 void:
    leaveRoom
    publishStream
    unpublishStream
    publishScreen
    unpublishScreen
    enableSimulcastMode
    updateLocalVideoCanvas
    setLocalVideoMirrorType
    setVideoRotationMode
    switchCamera
    setAudioRoute
    startLiveTranscoding
    stopLiveTranscoding
    setPublishFallbackOption
    setSubscribeFallbackOption

    视频管理

    (int)setRemoteVideoCanvas:(NSString * _Nonnull)uid withIndex:(ByteRTCStreamIndex)streamIndex withCanvas:(ByteRTCVideoCanvas * _Nullable)canvas;

    (void)setRemoteVideoCanvas:(ByteRTCRemoteStreamKey * _Nonnull)key withCanvas:(ByteRTCVideoCanvas * _Nullable)canvas;

    • 返回值类型由 int 变更为 void。

    • 通过 key 传入 uid 和 streamIndex。

    (int)updateRemoteStreamVideoCanvas:(NSString * _Nonnull)roomid withUserId:(NSString * _Nonnull)uid withIndex:(ByteRTCStreamIndex)streamIndex withRenderMode:(ByteRTCRenderMode)renderMode withBackgroundColor:(NSUInteger)backgroundColor;

    (void)updateRemoteStreamVideoCanvas:(ByteRTCRemoteStreamKey * _Nonnull)key withRenderMode:(ByteRTCRenderMode)renderMode withBackgroundColor:(NSUInteger)backgroundColor;

    • 返回值类型由 int 变更为 void。

    • 通过 key 传入 roomid 、uid 和 streamIndex。

    名称变更

    房间管理

    setRtcRoomDelegate

    setRTCRoomDelegate

    修正大小写。

    joinRoomByTokenjoinRoom
    renewTokenupdateToken
    引擎管理getSdkVersiongetSDKVersion修正大小写。
    安全与加密setEncryptTypesetEncryptInfo
    音视频处理SetVideoWatermarksetVideoWatermark大驼峰变为小驼峰。
    音视频处理ClearVideoWatermarkclearVideoWatermark
    屏幕分享SetScreenVideoEncoderConfigsetScreenVideoEncoderConfig
    视频管理SetVideoEncoderConfigsetVideoEncoderConfig
    SetMaxVideoEncoderConfigsetMaxVideoEncoderConfig

    名称和参数变更

    音视频传输

    (void)unSubscribeStream:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;

    (int)unsubscribeStream:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;

    • 返回值由 void 变为 int。

    • 修正名称中的大小写。

    (void)unSubscribeScreen:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;

    (int)unsubscribeScreen:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;

    • 返回值由 void 变为 int。

    • 修正名称中的大小写。

    屏幕分享

    (void)pushScreenCaptureFrame:(CVPixelBufferRef _Nonnull )frame time:(CMTime)pts rotation:(int)rotation;

    (int)pushScreenVideoFrame:(CVPixelBufferRef _Nonnull )frame time:(CMTime)pts rotation:(int)rotation;

    • 返回值由 void 变为 int。

    • 名称由 pushScreenCaptureFrame 变为

    pushScreenVideoFrame。

    自定义流处理

    (BOOL)pushExternalByteVideoFrame:(ByteRTCVideoFrame * _Nonnull)frame;

    (int)pushExternalVideoFrame:(ByteRTCVideoFrame * _Nonnull)frame;

    • 返回值由 BOOL 变为 int

    • 名称由 pushExternalByteVideoFrame 变更为 pushExternalVideoFrame

    (BOOL)setAudioFrameObserver:(_Nullable id<ByteRTCAudioFrameObserver>) audioFrameObserver;

    (void)registerAudioFrameObserver:(_Nullable id<ByteRTCAudioFrameObserver>) audioFrameObserver;

    • 返回值由 BOOL 变为 void

    • 名称由 setAudioFrameObserver 变为 registerAudioFrameObserver

    删除

    自定义流处理

    删除:

    • (BOOL)pushExternalVideoFrame:(CVPixelBufferRef _Nonnull )frame time:(CMTime)pts;

    • (BOOL)pushExternalVideoFrame:(CVPixelBufferRef _Nonnull )frame time:(CMTime)pts rotation:(ByteRTCVideoRotation)rotation;

    • (BOOL)pushExternalVideoFrame:(CVPixelBufferRef _Nonnull )frame time:(CMTime)pts rotation:(ByteRTCVideoRotation)rotation extendedData:(NSData* _Nullable)extendedData supplementaryInfo:(NSData* _Nullable)supplementoryInfo;

    由以下接口替代:
    (int)pushExternalVideoFrame:(ByteRTCVideoFrame * _Nonnull)frame;

    回调变更
    变更详情功能模块变动前回调变动后回调备注
    行为变更自定义流处理onProcessRecordAudioFrame此回调原本支持返回本地采集的音频帧,修改音频帧后,会影响发送到远端的音频数据和本地软件耳返中的音频数据。自此版本后,修改此回调中返回的音频帧,仅影响发送到远端的音频数据;如果你希望修改本地软件耳返中音频数据,参看 onProcessEarMonitorAudioFrame。

    参数变更

    消息

    (void)rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onUserMessageSendResult:(int64_t)msgid error:(ByteRTCUserMessageSendResult)error;

    (void)rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onUserMessageSendResult:(NSInteger)msgid error:(ByteRTCUserMessageSendResult)error;

    msgid 参数类型由 int64_t 变更为 NSInteger

    (void)rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onRoomMessageSendResult:(int64_t)msgid error:(ByteRTCRoomMessageSendResult)error;(void)rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onRoomMessageSendResult:(NSInteger)msgid error:(ByteRTCRoomMessageSendResult)error;
    (void)rtcEngine:(ByteRTCVideo * _Nonnull)engine onUserMessageSendResultOutsideRoom:(int64_t)msgid error:(ByteRTCUserMessageSendResult)error;(void)rtcEngine:(ByteRTCVideo * _Nonnull)engine onUserMessageSendResultOutsideRoom:(NSInteger)msgid error:(ByteRTCUserMessageSendResult)error;

    CDN 推流

    (void)onMixingAudioFrame:(ByteRTCAudioFrame *_Nonnull)audioFrame taskId:(NSString *_Nonnull)taskId;

    (void)onMixingAudioFrame:(ByteRTCAudioFrame *_Nonnull)audioFrame timestamp:(int64_t)timeStamp taskId:(NSString *_Nonnull)taskId;

    新增参数 timeStamp

    消息

    (void)rtcEngine:(ByteRTCVideo * _Nonnull)engine onPublicStreamSEIMessageReceived:(NSString* _Nonnull)publicStreamId andMessage:(NSData* _Nonnull)message;

    (void)rtcEngine:(ByteRTCVideo * _Nonnull)engine onPublicStreamSEIMessageReceived:(NSString* _Nonnull)publicStreamId andMessage:(NSData* _Nonnull)message andSourceType:(ByteRTCSEIMessageSourceType)sourceType;

    名称变更

    房间管理

    onLeaveRoomWithStats

    onLeaveRoom

    音视频传输

    connectionChangedToState

    onConnectionStateChanged

    networkTypeChangedToTypeonNetworkTypeChanged
    reportSysStatsonSysStats

    网络管理

    onPerformanceAlarmsWithMode

    onPerformanceAlarms

    OnSimulcastSubscribeFallbackonSimulcastSubscribeFallback大驼峰变为小驼峰。
    安全与加密ByteRTCEncryptRawDataonEncryptData
    ByteRTCDecryptRawDataonDecryptData
    视频管理onFaceDetectionResultonFaceDetectResult

    删除

    音视频传输

    删除:
    (void)rtcEngine:(ByteRTCVideo * _Nonnull)engine remoteVideoStateChangedOfUid:(NSString * _Nonnull)uid state:(ByteRTCRemoteVideoState)state;

    /

    删除回调类

    范围语音

    ByteRTCRangeAudioObserver 类和相关的接口

    此前,在手动订阅的场景下,如果你希望使用范围语音功能,你必须根据此回调获取的衰减系数,设定音量。
    自此版本起,无论是手动订阅还是自动订阅,衰减效果都由 SDK 实现,无需使用此接口。

    类型变更
    变更详情数据类型备注
    参数数据结构改动ByteRTCVideoFrame数据结构中,删除了无用的字段:cropLeft, cropTop, cropRight, cropBottom
    取值范围拓展ByteRTCVideoCompositingRegion 中,width 和 height取值范围由 (0.0, 1.0] 拓展为 [0.0, 1.0]。
    枚举值变化ByteRTCAudioRouteByteRTCAudioRouteUnknown 变更为 ByteRTCAudioRouteDefault
    音频路由和发布订阅状态到音量类型的映射关系改变ByteRTCAudioScenarioType最新的映射关系查看数据结构的文档。
    枚举值增删ByteRTCAudioFrameMethod新增枚举值:ByteRTCAudioFrameProcessorEarMonitor = 3

    成员变量变更

    ByteRTCFaceDetectionResult

    新增成员变量:frameTimestamp

    ByteRTCVideoCanvas删除变量:roomId 和 uid

    ByteRTCVideoFrame

    • extendedData 的类型由 ByteRTCFrameExtendedData 变为 NSData

    • 新增成员变量:supplementaryInfo

    ByteRTCLiveTranscoding新增成员变量:ByteRTCTranscodingClientMixParam

    变量类型变更

    空间音频功能中表示空间坐标的 position 的 变量 x, y, z 类型由 int 更改为 float。

    提升球面立体声渲染效果。

    配置变更

    ByteRTCRoomProfile

    房间属性的默认值 ByteRTCRoomProfileCommunication = 0,对应的由 ByteRTCRoomProfileChatRoom = 6 变更为 ByteRTCRoomProfileMeeting = 16。

    新增ByteRTCPublicStreamErrorCodeonPlayPublicStreamResult: 和 onPushPublicStreamResult: 中的 errorCode 参数类型由 ByteRTCTranscodingError 改为 ByteRTCPublicStreamErrorCode
    错误码变更
    变更详情错误码备注
    枚举值增删ByteRTCErrorCode新增枚举值:ByteRTCUserIDDifferent = -1014
    ByteRTCUserMessageSendResult新增枚举值:ByteRTCUserMessageSendResultExceedQPS = 5
    ByteRTCRoomMessageSendResult新增枚举值:ByteRTCRoomMessageSendResultExceedQPS = 5
    新增ByteRTCPublicStreamErrorCodeonPlayPublicStreamResult: 和 onPushPublicStreamResult: 中的 errorCode 参数类型由 ByteRTCTranscodingError 改为 ByteRTCPublicStreamErrorCode
    3.45.6
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    枚举值增删ByteRTCAudioFrameMethod新增屏幕共享音频的枚举值: ByteRTCAudioFrameProcessorScreen = 4
    3.45.4
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块
    方法
    备注
    参数数据结构改动音频管理(void)enableAudioPropertiesReport:(ByteRTCAudioPropertiesConfig* _Nonnull)config;数据结构中,新增参数:
  • ByteRTCAudioPropertiesMode
  • ByteRTCAudioReportMode
  • 类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    成员变量增删ByteRTCAudioScenarioType新增高音质畅聊模式:ByteRTCAudioScenarioHighqualityChat
    枚举值增删ByteRTCAudioFrameMethod新增获取软件耳返音频:ByteRTCAudioFrameProcessorEarMonitor
    3.45.2
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块
    变动前方法
    变动后方法
    备注
    废弃原方法音频处理(void)muteAudioPlayback:(ByteRTCMuteState)muteState;(void)setPlaybackVolume:(NSInteger)volume;设置远端用户音量为 0 即可停止播放本地收到的音频流
    3.44
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块
    变动前方法
    变动后方法
    备注

    合并、名称和参数变化

    音视频处理

    • (int) initVirtualBackground(NSString* _Nonnull)licensePath withModel:(NSString* _Nonnull)modelPath;
    • (int) enableVirtualBackground(ByteRTCVirtualBackgroundSource* _Nonnull)source;
    • (int) disableVirtualBackground;

    (int) setBackgroundSticker:(NSString* _Nullable)modelPath source(ByteRTCVirtualBackgroundSource* _Nonnull)source;

    3.43

    该版本部分头文件名称及路径发生变化,请参照下表在工程文件中进行调整:

    平台3.423.43备注
    iOS../VolcEngineRTC.framework/Headers/objc/rtc/ByteRTCRoom.h../VolcEngineRTC.framework/Headers/objc/ByteRTCRoom.h迁移至上级目录 objc 中
    ../VolcEngineRTC.framework/Headers/objc/rtc/ByteRTCEngineKit.h../VolcEngineRTC.framework/Headers/objc/ByteRTCVideo.h文件名变更,并迁移至上级目录 objc 中
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情
    功能模块
    变动前方法变动后方法备注
    基础类名变更所有模块@class ByteRTCEngineKit;@class RTCVideo;
    名称和参数变更引擎管理(id _Nonnull)initWithAppId:(NSString * _Nonnull)appId delegate:(id<ByteRTCEngineDelegate> _Nullable)delegate parameters:(NSDictionary* _Nullable)parameters;(RTCVideo * _Nullable) createRTCVideo:(NSString * _Nonnull)appId delegate:(id<RTCVideoDelegate> _Nullable)delegate parameters:(NSDictionary * _Nonnull)parameters;
    (void)destroyEngine;(void)destroyRTCVideo:(RTCVideo *_Nonnull)video;
    多房间(ByteRTCRoom * _Nullable)createRtcRoom:(NSString * _Nonnull)roomId;( RTCRoom * _Nullable)createRTCRoom:(NSString * _Nonnull)roomId;
    位置迁移,所属类型变更
  • 房间管理
  • 消息
  • 屏幕共享
  • 音视频传输
  • 视频管理
  • 转推直播
  • 音频管理
  • 公共流管理
  • 多房间
  • 以下方法从 RTCVideo(原 ByteRTCEngineKit)类下移除,使用 RTCRoom 类中的同名方法代替:
  • setUserVisibility
  • publishStream
  • unpublishStream
  • 移除 joinRoomByKey,使用 joinRoomByToken 代替
  • leaveRoom
  • 移除 updateToken,使用 renewToken 代替
  • pauseAllSubscribedStream
  • resumeAllSubscribedStream
  • setRemoteVideoConfig
  • subscribeStream
  • unSubscribeStream
  • subscribeScreen
  • unSubscribeScreen
  • sendRoomMessage
  • sendRoomBinaryMessage
  • sendUserMessage
  • sendUserBinaryMessage
  • publishScreen
  • unpublishScreen
  • startForwardStreamToRooms
  • updateForwardStreamToRooms
  • stopForwardStreamToRooms
  • pauseForwardStreamToAllRooms
  • resumeForwardStreamToAllRooms
  • setMultiDeviceAVSync
  • 参数变更网络管理(int)setRemoteUserPriority:(ByteRTCRemoteUserPriority)priority uid:(NSString *_Nonnull)uid;(int)setRemoteUserPriority:(ByteRTCRemoteUserPriority)priority InRoomId:(NSString *_Nonnull)roomId uid:(NSString *_Nonnull)uid;
    音频管理(void)setRemoteAudioPlaybackVolume:(NSString* _Nonnull)uid volume:(int)volume;(void)setRemoteAudioPlaybackVolume:(NSString *_Nonnull)room_id remoteUid:(NSString *_Nonnull)uid playVolume:(NSInteger)volume;新增 room_id 参数,且为必填。
    删除引擎管理
  • (ByteRTCEngineKit * _Nullable) sharedInstance;
  • (void)destroy;
  • /
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情
    功能模块
    变动前方法变动后方法备注
    基础类名变更所有模块@protocol ByteRTCEngineDelegate @protocol RTCVideoDelegate
    位置迁移,所属类型变化
  • 引擎管理
  • 房间管理
  • 视频管理
  • 音频管理
  • 网络管理
  • 数据统计
  • 消息
  • 音视频传输
  • 公共流管理
  • 以下回调从 ByteRTCEngineDelegate 类下移除,使用 RTCRoomDelegate(原 ByteRTCRoomDelegate) 类中的同名回调代替:
  • onRoomStateChanged
  • onLeaveRoomWithStats
  • onUserJoined
  • onUserLeave
  • onTokenWillExpire
  • onUserPublishStream
  • onUserUnPublishStream
  • onUserPublishScreen
  • onUserUnPublishScreen
  • onVideoStreamBanned
  • onAudioStreamBanned
  • onRoomMessageReceived
  • onRoomBinaryMessageReceived
  • onRoomStats
  • onLocalStreamStats
  • onRemoteStreamStats
  • onUserMessageReceived
  • onUserBinaryMessageReceived
  • onUserMessageSendResult
  • onRoomMessageSendResult
  • onForwardStreamStateChanged
  • onForwardStreamEvent
  • onAVSyncStateChange
  • 参数变更音频管理(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserStartAudioCapture:(NSString *_Nonnull)userId;(void)rtcEngine:(RTCVideo * _Nonnull)engine onUserStartAudioCapture:(NSString* _Nonnull)roomId uid:(NSString *_Nonnull)userId;
    (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserStopAudioCapture:(NSString *_Nonnull)userId;(void)rtcEngine:(RTCVideo * _Nonnull)engine onUserStopAudioCapture:(NSString* _Nonnull)roomId uid:(NSString *_Nonnull)userId;
    音视频传输(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserStartVideoCapture:(NSString *_Nonnull)userId;(void)rtcEngine:(RTCVideo * _Nonnull)engine onUserStartVideoCapture:(NSString * _Nonnull)roomId uid:(NSString * _Nonnull)uid;
    (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserStopVideoCapture:(NSString *_Nonnull)userId;(void)rtcEngine:(RTCVideo * _Nonnull)engine onUserStopVideoCapture:(NSString * _Nonnull)roomId uid:(NSString * _Nonnull)uid;
    房间管理(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onAudioFrameSendStateChanged:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state;(void)rtcEngine:(RTCVideo *_Nonnull)engine onAudioFrameSendStateChanged:(NSString * _Nonnull)roomId rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state;
    (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onVideoFrameSendStateChanged:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state;(void)rtcEngine:(RTCVideo *_Nonnull)engine onVideoFrameSendStateChanged:(NSString * _Nonnull)roomId rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state;
    (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onScreenVideoFrameSendStateChanged:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state;(void)rtcEngine:(RTCVideo *_Nonnull)engine onScreenVideoFrameSendStateChanged:(NSString * _Nonnull)roomId rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state;
    (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onAudioFramePlayStateChanged:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state;(void)rtcEngine:(RTCVideo *_Nonnull)engine onAudioFramePlayStateChanged:(NSString * _Nonnull)roomId rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state;
    (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onVideoFramePlayStateChanged:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state;(void)rtcEngine:(RTCVideo *_Nonnull)engine onVideoFramePlayStateChanged:(NSString * _Nonnull)roomId rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state;
    (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onScreenVideoFramePlayStateChanged:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state;(void)rtcEngine:(RTCVideo *_Nonnull)engine onScreenVideoFramePlayStateChanged:(NSString * _Nonnull)roomId rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state;
    公共流管理(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onPushPublicStreamResult:(NSString *_Nonnull)publicStreamId errorCode:(int)errorCode;(void)rtcEngine:(RTCVideo *_Nonnull)engine onPushPublicStreamResult:(NSString *_Nonnull)roomId publiscStreamId:(NSString *_Nonnull)streamId errorCode:(ByteRTCTranscodingError)errorCode;
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    成员变量增删ByteRTCVideoSolution删除成员变量:mode
    ByteRTCVideoEncoderConfig删除成员变量:scaleMode
    枚举值增删ByteRTCConnectionState增加枚举值:ByteRTCConnectionStateFailed
    错误码变更

    以下表格中的错误码发生了变化,你需要进行相应的处理:

    变更详情错误码备注
    枚举值增删ByteRTCErrorCode新增枚举值:-1084
    3.42
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    基础类名变更所有模块@class ByteRTCRoom@class RTCRoom
    位置迁移,所属类型变更多房间以下方法从 RTCRoom(原 ByteRTCRoom)类下移除,使用 ByteRTCEngineKit 类中的同名方法代替:
  • setRemoteVideoCanvas
  • startLiveTranscoding
  • stopLiveTranscoding
  • updateLiveTranscoding
  • setRemoteAudioPlaybackVolume
  • startPushPublicStream
  • stopPushPublicStream
  • updatePublicStreamParam
  • 由于新方法变更为从引擎类上调用,因此增加了 roomId 相关的字段,且均为必填字段。
    名称和参数变更引擎管理(int)feedbackTypes:(NSArray* _Nullable)types desc:(NSString* _Nullable)desc;(int)feedback:(NSArray<ByteRTCProblemOption *> * _Nullable)types desc:(NSString* _Nullable)desc;
    自定义音频处理(BOOL)registerLocalAudioProcessor:(_Nullable id<ByteRTCAudioProcessor>) audioProcessor format:(ByteRTCAudioFormat* _Nullable)format;(BOOL)registerAudioProcessor:(_Nullable id<ByteRTCAudioProcessor>) audioProcessor format:(ByteRTCAudioFormat* _Nullable)format;
    参数变更消息(int64_t)sendUserMessage:(NSString * _Nonnull)uid message:(NSString * _Nonnull)message;(int64_t)sendUserMessage:(NSString * _Nonnull)uid message:(NSString * _Nonnull)message config:(ByteRTCMessageConfig)config;
    (int64_t)sendUserBinaryMessage:(NSString * _Nonnull)uid message:(NSData * _Nonnull)message;(int64_t)sendUserBinaryMessage:(NSString * _Nonnull)uid message:(NSData * _Nonnull)message config:(ByteRTCMessageConfig)config;
    (int64_t)sendUserMessageOutsideRoom:(NSString * _Nonnull)userId message:(NSString * _Nonnull)messageStr;(int64_t)sendUserMessageOutsideRoom:(NSString * _Nonnull)userId message:(NSString * _Nonnull)messageStr config:(ByteRTCMessageConfig)config;
    (int64_t)sendUserBinaryMessageOutsideRoom:(NSString * _Nonnull)userId message:(NSData * _Nonnull)messageStr;(int64_t)sendUserBinaryMessageOutsideRoom:(NSString * _Nonnull)userId message:(NSData * _Nonnull)messageStr config:(ByteRTCMessageConfig)config;
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    基础类名变更所有模块@protocol ByteRTCRoomDelegate @protocol RTCRoomDelegate
    位置迁移,所属类型变更多房间以下回调从 RTCRoomDelegate(原 ByteRTCRoomDelegate) 类下移除,使用 ByteRTCEngineDelegate 类中的同名回调代替:
  • onUserStartAudioCapture
  • onUserStopAudioCapture
  • onFirstLocalAudioFrame
  • onFirstRemoteAudioFrame
  • onUserStartVideoCapture
  • onUserStopVideoCapture
  • onFirstLocalVideoFrameCaptured
  • onFirstRemoteVideoFrameRendered
  • onFirstRemoteVideoFrameDecoded
  • onRemoteVideoSizeChanged
  • onLocalVideoSizeChanged
  • onAudioFrameSendStateChanged
  • onVideoFrameSendStateChanged
  • onScreenVideoFrameSendStateChanged
  • onAudioFramePlayStateChanged
  • onVideoFramePlayStateChanged
  • onScreenVideoFramePlayStateChanged
  • onFirstLocalAudioFrame
  • onLocalAudioStateChanged
  • onRemoteAudioStateChanged
  • onLocalVideoStateChanged
  • onRemoteVideoStateChanged
  • 参数变更音频路由(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onAudioRouteChanged:(ByteRTCAudioRoute)device;(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onAudioRouteChanged:(ByteRTCAudioRoute)device;`](70087#rtcengine-onaudioroutechanged)| |
    回调重构自定义音频处理@protocol ByteRTCAudioProcessor <NSObject>
    - (int)processAudioFrame:(ByteRTCAudioFrame * _Nonnull)audioFrame;
    @end
    @protocol ByteRTCAudioProcessor <NSObject>
    - (int)onProcessRecordAudioFrame:(ByteRTCAudioFrame * _Nonnull)audioFrame;
    - (int)onProcessPlaybackAudioFrame:(ByteRTCAudioFrame * _Nonnull)audioFrame;
    - (int)onProcessRemoteUserAudioFrame:(ByteRTCAudioFrame * _Nonnull)audioFrame;
    @end
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注

    枚举值增删

    ByteRTCRoomProfile

    增加以下枚举值:

    • ByteRTCRoomProfileChat = 5
    • ByteRTCRoomProfileChatRoom = 6
    • ByteRTCRoomProfileLwTogether = 7
    • ByteRTCRoomProfileGameHD = 8
    • ByteRTCRoomProfileCoHost = 9
    • ByteRTCRoomProfileInteractivePodcast = 10
    • ByteRTCRoomProfileKTV = 11
    • ByteRTCRoomProfileChorus = 12
    • ByteRTCRoomProfileVRChat = 13
    • ByteRTCRoomProfileGameStreaming = 14
    • ByteRTCRoomProfileLanLiveStreaming = 15
    • ByteRTCRoomProfileMeeting = 16
    • ByteRTCRoomProfileMeetingRoom = 17
    • ByteRTCRoomProfileClassroom = 18
      删除了 ByteRTCRoomProfileLiveBroadcasting = 1,建议根据实际业务情况,替换为以下模式:
    • ByteRTCRoomProfileChatRoom = 6
    • ByteRTCRoomProfileCoHost = 9
    • ByteRTCRoomProfileInteractivePodcast = 10
    • ByteRTCRoomProfileKTV = 11
    • ByteRTCRoomProfileChorus = 12

    枚举值增删

    ByteRTCAudioProfileType

    增加以下枚举值:

    • ByteRTCAudioProfileStandardStereo = 4
    • ByteRTCAudioProfileHDMono = 5

    成员变量增删

    ByteRTCLocalVideoStats

    删除以下成员变量:

    • sentTargetKBitrate
    • sentTargetFrameRate

    成员变量增删

    ByteRTCRoomStats

    增加以下成员变量:

    • txKbitrate
    • rxKbitrate
    • txScreenKBitrate
    • rxScreenKBitrate

    枚举值增删

    ByteRTCMediaDeviceWarning

    增加以下枚举值:

    • ByteRTCMediaDeviceWarningSetAudioRouteInvalidScenario = 20
    • ByteRTCMediaDeviceWarningSetAudioRouteNotExists = 21
    • ByteRTCMediaDeviceWarningSetAudioRouteFailedByPriority = 22
    • ByteRTCMediaDeviceWarningSetAudioRouteNotVoipMode = 23
    • ByteRTCMediaDeviceWarningSetAudioRouteDeviceNotStart = 24
    枚举值含义变更ByteRTCAudioScenarioType枚举值对应的语音模式决策逻辑发生变化,本地是否播放不再是决策因素,只取决于麦克风是否开启
    错误码变更

    以下表格中的错误码发生了变化,你需要进行相应的处理:

    变更详情错误码备注
    枚举值增删ByteRTCWarningCode新增枚举值:-2014
    3.41
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    合并或拆分房间管理(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onJoinRoomResult:(NSString *_Nonnull)roomId withUid:(nonnull NSString *)uid errorCode:(NSInteger)errorCode joinType:(NSInteger)joinType elapsed:(NSInteger)elapsed;
  • (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onRoomStateChanged:(NSString *_Nonnull)roomId withUid:(nonnull NSString *)uid state:(NSInteger)state extraInfo:(NSString *_Nonnull)extraInfo;
  • (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onStreamStateChanged:(NSString *_Nonnull)roomId withUid:(nonnull NSString *)uid state:(NSInteger)state extraInfo:(NSString *_Nonnull)extraInfo;
  • 合并或拆分多房间
  • (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onJoinRoomResult:(NSString *_Nonnull)roomId withUid:(nonnull NSString *)uid errorCode:(NSInteger)errorCode joinType:(NSInteger)joinType elapsed:(NSInteger)elapsed;
  • (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onRoomWarning:(ByteRTCWarningCode)warningCode;
  • (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onRoomError:(ByteRTCErrorCode)errorCode;
  • (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onRoomStateChanged:(NSString *_Nonnull)roomId withUid:(nonnull NSString *)uid state:(NSInteger)state extraInfo:(NSString *_Nonnull)extraInfo;
  • (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onStreamStateChanged:(NSString *_Nonnull)roomId withUid:(nonnull NSString *)uid state:(NSInteger)state extraInfo:(NSString *_Nonnull)extraInfo;
  • 3.40
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    名称和参数变更音频管理(ByteRTCPositionAudioRender *_Nullable)getPositionAudioRender;(ByteRTCSpatialAudio *_Nullable)getSpatialAudio;接口由 ByteRTCEngineKit 类移动至 ByteRTCRoom 类
    名称变化音频管理(void)enableAudioSpatialRender:(BOOL) enable;(void)enableSpatialAudio:(BOOL)enable;

    原接口废弃,使用新接口代替

    音频管理

    • (void)enableExternalAudioDevice:(ByteRTCAudioFormat * _Nonnull) recordingFormat playbackFormat:(ByteRTCAudioFormat * _Nonnull) playbackFormat;
    • (void)disableExternalAudioDevice;
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注

    枚举值增删

    ByteRTCAACProfile

    删除枚举值:ByteRTCAACProfileMain。
    枚举值ByteRTCAACProfileHEv1的值变为 1,枚举值ByteRTCAACProfileHEv2的值变为 2。

    类型增减ByteRTCTranscoderContentControlType新增
    成员变量变化ByteRTCVideoCompositingRegion成员变量contentControl变更为枚举类型
    类型名称变化ByteRTCAudioRoute类型名由ByteRTCAudioRouteDevice修改为 ByteRTCAudioRoute
    错误码变更

    以下表格中的错误码发生了变化,你需要进行相应的处理:

    变更详情错误码备注
    枚举值增删ByteRTCErrorCode新增枚举值:-1083
    3.39
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    返回值变更实时消息(void)login:(NSString * _Nonnull)token uid:(NSString * _Nonnull)uid;(int64_t)login:(NSString * _Nonnull)token uid:(NSString * _Nonnull)uid;---

    API 行为变更

    订阅媒体流
    subscribeStream:mediaStreamType:
    unSubscribeStream:mediaStreamType:
    subscribeScreen
    unsubscribeScreen

    SDK 在每条远端流属性中维护订阅关系。如果该流被移除,订阅关系也将取消

    SDK 在房间属性中维护订阅关系列表。订阅关系将在用户退房后才会取消。

    ---

    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化实时消息(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onServerMessageSendResult:(int64_t)msgid error:(ByteRTCUserMessageSendResult)error;(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onServerMessageSendResult:(int64_t)msgid error:(ByteRTCUserMessageSendResult)error message:(NSData * _Nonnull)message;
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    成员函数属性ByteRTCLiveTranscoding其中成员函数 roomId 由可选传入改为必须传入
    错误码变更

    以下表格中的错误码发生了变化,你需要进行相应的处理:

    变更详情错误码备注
    枚举值增删ByteRtcTranscoderErrorCode新增枚举值:1095、1096、1097、1098、1099
    3.38
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    替换音频路由设置(int)setAudioPlaybackDevice:(ByteRTCAudioPlaybackDevice)audioPlaybackDevice;(int)setAudioRoute:(ByteRTCAudioRouteDevice)audioRouteDevice;
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    替换音频路由设置(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onAudioPlaybackDeviceChanged:(ByteRTCAudioPlaybackDevice)device;(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onAudioRouteChanged:(ByteRTCAudioRouteDevice)device;
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    成员变量变化ByteRTCRemoteVideoConfigframeRateRation 变为 framerate,由输入与原始帧率的比例变为输入期望订阅的最大帧率
    成员变量增删ByteRTCSubscribeConfig新增成员变量 framerate
    枚举值增删ByteRTCAudioMixingError新增枚举值:ByteRTCAudioMixingErrorInValidPlaybackSpeed
    枚举值增删ByteRTCMediaDeviceState新增枚举值:ByteRTCMediaDeviceStateInterruptionBegan,表示媒体设备采集暂停,等待自动恢复
    枚举值增删ByteRTCMediaDeviceState新增枚举值:ByteRTCMediaDeviceStateInterruptionEnded,表示媒体设备采集已自动恢复
    错误码变更

    以下表格中的错误码发生了变化,你需要进行相应的处理:

    变更详情错误码备注
    枚举值增删ByteRTCErrorCode新增错误码:ByteRTCErrorCodeTokenExpired,表示用户因 Token 过期被踢出房间
    枚举值增删ByteRTCErrorCode新增枚举值:ByteRTCErrorCodeUpdateTokenWithInvalidToken,表示调用 updateToken: 使用的 Token 无效
    3.37
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    合并音频数据回调
  • - (BOOL)setRecordingAudioFrameParameters:(NSInteger)samplesPerSec channels:(NSInteger)channels;
  • - (BOOL)setPlaybackAudioFrameParameters:(NSInteger)samplesPerSec channels:(NSInteger)channels;
  • - (BOOL)setMixedAudioFrameParameters:(NSInteger)samplesPerSec channels:(NSInteger)channels;
  • - (void)enableAudioFrameCallback:(ByteRTCAudioFrameCallbackMethod) method format:(ByteRTCAudioFormat* _Nullable)format;在format中设置回调的音频数据类型
    参数增加本地录制- (int)startFileRecording:(ByteRTCStreamIndex)streamIndex withRecordingConfig:(ByteRTCRecordingConfig* _Nonnull)recordingConfig;- (int)startFileRecording:(ByteRTCStreamIndex)streamIndex withRecordingConfig:(ByteRTCRecordingConfig* _Nonnull)recordingConfig type:(ByteRTCRecordingType)recordingType;
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前方法
    变动后方法
    备注
    拆分引擎管理- (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onMediaDeviceStateChanged:(NSString*_Nonnull)device_id device_type:(ByteRTCMediaDeviceType)device_type device_state:(ByteRTCMediaDeviceState)device_state device_error:(ByteRTCMediaDeviceError)device_error;
  • - (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onAudioDeviceStateChanged:(NSString*_Nonnull)device_id device_type:(ByteRTCAudioDeviceType)device_type device_state:(ByteRTCMediaDeviceState)device_state device_error:(ByteRTCMediaDeviceError)device_error;
  • - (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onVideoDeviceStateChanged:(NSString*_Nonnull)device_id device_type:(ByteRTCVideoDeviceType)device_type device_state:(ByteRTCMediaDeviceState)device_state device_error:(ByteRTCMediaDeviceError)device_error;
  • 媒体设备状态回调拆分成音频和视频设备状态回调
    拆分引擎管理- (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onMediaDeviceWarning:(NSString*_Nonnull)deviceId deviceType:(ByteRTCMediaDeviceType)deviceType deviceWarning:(ByteRTCMediaDeviceWarning)deviceWarning;
  • - (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onAudioDeviceWarning:(NSString*_Nonnull)deviceId deviceType:(ByteRTCAudioDeviceType)deviceType deviceWarning:(ByteRTCMediaDeviceWarning)deviceWarning;
  • - (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onVideoDeviceWarning:(NSString*_Nonnull)deviceId deviceType:(ByteRTCVideoDeviceType)deviceType deviceWarning:(ByteRTCMediaDeviceWarning)deviceWarning;
  • 媒体设备警告回调拆分成音频和视频设备警告回调
    3.36
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化转推直播/多房间
  • - (int)startLiveTranscoding:(ByteRTCLiveTranscoding *_Nullable)transcoding observer:(id<LiveTranscodingDelegate> _Nullable)observer;
  • - (int)stopLiveTranscoding;
  • - (int)updateLiveTranscoding:(ByteRTCLiveTranscoding *_Nonnull)transcoding;
  • - (int)startLiveTranscoding:(NSString * _Nonnull)task_id transcoding:(ByteRTCLiveTranscoding *_Nullable)transcoding observer:(id<LiveTranscodingDelegate> _Nullable)observer;
  • - (int)stopLiveTranscoding:(NSString *_Nonnull)task_id;
  • - (int)updateLiveTranscoding:(NSString *_Nonnull)task_id transcoding:(ByteRTCLiveTranscoding *_Nonnull)transcoding;
  • 新增参数,设置转推直播任务 ID
    参数变化屏幕共享
  • - (void)publishScreen;
  • - (void)unpublishScreen;
  • - (void)publishScreen:(ByteRTCMediaStreamType)type;
  • - (void)unpublishScreen:(ByteRTCMediaStreamType)type;
  • 新增参数,设置发布/取消发布的媒体类型
    参数变化多房间
  • - (int)publishScreen;
  • - (int)unpublishScreen;
  • - (int)publishScreen;
  • - (int)unpublishScreen;
  • 新增参数,设置发布/取消发布的媒体类型
    名称变化屏幕共享- (void)stopScreenSharing API_AVAILABLE(ios(12));- (void)stopScreenCapture
    名称和参数变化多房间
  • - (int)publish;
  • - (int)unpublish;
  • - (int)publishStream:(ByteRTCMediaStreamType)type;
  • [- (int)unpublishStream:(ByteRTCMediaStreamType)type;](70086.html#ByteRTCRoom-unpublishstream)
  • 新版本中新增独立的接口单独控制摄像头/麦克风采集的音频/视频的发布/取消发布
    合并房间管理
  • - (BOOL)publish;
  • - (BOOL)unpublish;
  • - (void)muteLocalAudio:(ByteRTCMuteState)muteState;
  • - (void)muteLocalVideo:(ByteRTCMuteState)mute_state;
  • - (BOOL)publishStream:(ByteRTCMediaStreamType)type;
  • - (BOOL)unpublishStream:(ByteRTCMediaStreamType)type;
  • 新版本中新增独立的接口单独控制摄像头/麦克风采集的音频/视频的发布/取消发布
    拆分屏幕共享- (int)startScreenSharingWithPreferredExtension:(NSString *_Nullable)extension groupId:(NSString *_Nonnull)groupId API_AVAILABLE(ios(12));
  • - (void)setExtensionConfig:(NSString *_Nullable)groupId;
  • - (void)startScreenCapture:(ByteRTCScreenMediaType) type boudleId:(NSString *_Nullable)bundleId;
  • 拆分房间管理- (void)subscribeUserStream:(NSString *_Nonnull)userId streamType:(ByteRTCStreamIndex)streamType mediaType:(ByteRTCSubscribeMediaType)mediaType videoConfig:(ByteRTCSubscribeVideoConfig *_Nonnull)videoConfig;
  • - (void)subscribeStream:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;
  • - (void)unSubscribeStream:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;
  • - (void)subscribeScreen:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;
  • - (void)unSubscribeScreen:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;
  • 单房间模式下,解耦摄像头/麦克风采集的媒体流与屏幕共享媒体流的订阅/取消订阅
    拆分多房间- (void)subscribeUserStream:(NSString *_Nonnull)userId streamType:(ByteRTCStreamIndex)streamType mediaType:(ByteRTCSubscribeMediaType)mediaType videoConfig:(ByteRTCSubscribeVideoConfig *_Nonnull)videoConfig;
  • - (void)subscribeStream:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;
  • - (void)unSubscribeStream:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;
  • - (void)subscribeScreen:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;
  • - (void)unSubscribeScreen:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType;
  • 单房间模式下,解耦摄像头/麦克风采集的媒体流与屏幕共享媒体流的订阅/取消订阅
    拆分视频管理 - (int)setVideoEncoderConfig:(ByteRTCStreamIndex)streamIndex config:(NSArray <ByteRTCVideoSolution *> * _Nullable)videoSolutions;
  • -(int)SetVideoEncoderConfig:(NSArray <ByteRTCVideoEncoderConfig *> * _Nullable) channel_solutions;
  • -(int)SetScreenVideoEncoderConfig:(ByteRTCVideoEncoderConfig * _Nullable) screen_solution;
  • 使用独立的接口分别设置摄像头视频流和屏幕视频流的发布参数
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前回调变动后回调备注
    参数变化房间管理
  • (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onUserLeave:(NSString *_Nonnull)uid reason:(ByteRTCUserOfflineReason)reason;
  • (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onUserLeave:(NSString *_Nonnull)uid reason:(ByteRTCUserOfflineReason)reason;
  • (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onUserLeave:(NSString *_Nonnull)uid reason:(ByteRTCUserOfflineReason)reason;
  • - (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onUserLeave:(NSString *_Nonnull)uid reason:(ByteRTCUserOfflineReason)reason;
  • reason 参数变化
    删除转推直播- (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onLiveTranscodingResult:(NSString *_Nonnull)url errorCode:(ByteRTCTranscodingError)errorCode;/
    删除多房间- (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onLiveTranscodingResult:(NSString *_Nonnull)url errorCode:(ByteRTCTranscodingError)errorCode;/
    拆分或合并房间管理
  • - (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onStreamAdd:(id <ByteRTCStream> _Nonnull)stream;
  • - (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine didStreamRemoved:(NSString *_Nonnull)uid stream:(id<ByteRTCStream> _Nonnull)stream reason:(ByteRTCStreamRemoveReason)reason;
  • - (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserMuteAudio:(NSString * _Nonnull)uid muteState:(ByteRTCMuteState)muteState;
  • - (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserMuteVideo:(NSString * _Nonnull)uid withMuteState:(ByteRTCMuteState)muteState;
  • - (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserPublishStream:(NSString *_Nonnull)userId type:(ByteRTCMediaStreamType)type;
  • - (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserPublishScreen:(NSString *_Nonnull)userId type:(ByteRTCMediaStreamType)type;
  • - (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserUnPublishStream:(NSString *_Nonnull)userId type:(ByteRTCMediaStreamType)type reason:(ByteRTCStreamRemoveReason)reason;
  • - (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserUnPublishScreen:(NSString *_Nonnull)userId type:(ByteRTCMediaStreamType)type reason:(ByteRTCStreamRemoveReason)reason;
  • 单房间模式下,解耦新增或移除摄像头/麦克风采集的媒体流与新增屏幕共享媒体流的回调,同时去除旧版本回调在功能上的重合
    拆分或合并多房间
  • - (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onStreamAdd:(id<ByteRTCStream> _Nonnull)stream;
  • - (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom didStreamRemoved:(NSString *_Nonnull)uid stream:(id<ByteRTCStream> _Nonnull)stream reason:(ByteRTCStreamRemoveReason)reason;
  • - (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onUserMut
  • - (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onUserMuteVideo:(NSString *_Nonnull)uid withMuteState:(ByteRTCMuteState)muteState;
  • - (void)rtcRoom:(ByteRTCRoom * _Nonnull)rtcRoom onUserPublishStream:(NSString *_Nonnull)userId type:(ByteRTCMediaStreamType)type;
  • - (void)rtcRoom:(ByteRTCRoom * _Nonnull)rtcRoom onUserPublishScreen:(NSString *_Nonnull)userId type:(ByteRTCMediaStreamType)type;
  • - (void)rtcRoom:(ByteRTCRoom * _Nonnull)rtcRoom onUserUnPublishStream:(NSString *_Nonnull)userId type:(ByteRTCMediaStreamType)type reason:(ByteRTCStreamRemoveReason)reason;
  • - (void)rtcRoom:(ByteRTCRoom * _Nonnull)rtcRoom onUserUnPublishScreen:(NSString *_Nonnull)userId type:(ByteRTCMediaStreamType)type reason:(ByteRTCStreamRemoveReason)reason;
  • 单房间模式下,解耦新增或移除摄像头/麦克风采集的媒体流与新增屏幕共享媒体流的回调,同时去除旧版本回调在功能上的重合
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    枚举值增减ByteRTCMediaDeviceType新增了枚举值:ByteRTCMediaDeviceTypeScreenVideoCaptureDevice
    枚举值增减ByteRTCStreamMixingEvent新增了多个枚举值
    类型增减ByteRTCScreenMediaType新增屏幕采集媒体类型
    成员变量变化ByteRTCLocalStreamStats 和 ByteRTCRemoteStreamStatstxQuality 和 rxQuality 成员变量移动到了新增类型 ByteRTCNetworkQualityStats 中,通过 rtcEngine:onNetworkQuality:remoteQualities: 回调获取
    成员变量变化ByteRTCAudioPropertiesInfo成员变量 volume 拆分为 linearVolume 和 nonlinearVolume
    成员变量增删ByteRTCRoomConfig新增 remoteVideoConfig
    成员变量增删ByteRTCMultiRoomConfig新增 remoteVideoConfig
    3.35
    行为变更

    自此版本起,本地视频采集参数默认由系统自动设置,而不是和编码参数保持一致。你可以通过 VideoCaptureConfig 进行相关设置。如果你的代码逻辑中对采集到的视频帧进行了自定义处理,应对处理逻辑进行相应修改。

    方法变更
    变更详情功能模块变动前方法变动后方法备注
    参数变化视频管理- (int)setVideoCaptureConfig:(ByteRTCVideoCaptureConfig * _Nullable)captureConfig;- (int)setVideoCaptureConfig:(ByteRTCVideoCaptureConfig * _Nullable)captureConfig;增加摄像头采集参数中的模式设置
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前回调变动后回调备注
    名称变化视频管理- (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onFirstRemoteVideoFrameRendered:(ByteRTCRemoteStreamKey * _Nonnull)streamKey withFrameInfo:(ByteRTCVideoFrameInfo * _Nonnull)frameInfo;- (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onFirstRemoteVideoFrameDecoded:(ByteRTCRemoteStreamKey * _Nonnull)streamKey withFrameInfo:(ByteRTCVideoFrameInfo * _Nonnull)frameInfo;
    名称变化多房间- (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onFirstRemoteVideoFrameRendered:(ByteRTCRemoteStreamKey *_Nonnull)streamKey withFrameInfo:(ByteRTCVideoFrameInfo *_Nonnull)frameInfo;- (void)rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onFirstRemoteVideoFrameDecoded:(ByteRTCRemoteStreamKey *_Nonnull)streamKey withFrameInfo:(ByteRTCVideoFrameInfo *_Nonnull)frameInfo;
    3.34
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    枚举值增减ByteRTCAudioMixingError新增了枚举值:ByteRTCNetworkDetectionStopReasonInnerErr
    枚举值增减ByteRTCNetworkDetectionStopReason新增了枚举值:ByteRTCAudioMixingErrorInValidPitch
    成员变量变化ByteRTCAudioMixingConfig新增了成员变量:position 和 callbackOnProgressInterval
    错误码变更

    以下表格中的错误码发生了变化,你需要进行相应的处理:

    变更详情错误码备注
    枚举值增减ByteRTCWarningCode新增了枚举值:-5011
    3.33
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化音频管理
  • (void)enableAudioMixingFrame:(ByteRTCAudioMixingType)type;
  • (void)disableAudioMixingFrame;
  • (int)pushAudioMixingFrame:(ByteRTCAudioFrame* _Nullable)audioFrame;
  • (void)enableAudioMixingFrame:(int)id type:(ByteRTCAudioMixingType)type;
  • (void)disableAudioMixingFrame:(int)id;
  • (int)pushAudioMixingFrame:(int)id audioFrame:(ByteRTCAudioFrame* _Nullable)audioFrame;
  • 错误码变更

    以下表格中的错误码发生了变化,你需要进行相应的处理:

    变更详情错误码备注
    枚举值增减ByteRTCWarningCode废弃了枚举值 -5002 ~ -5008。
    使用 onMediaDeviceStateChanged 代替。
    枚举值增减ByteRTCLocalVideoStreamError新增了枚举值 7。
    3.30
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    成员变量变化ByteRTCLocalVideoStats新增了成员变量:jitter
    成员变量变化ByteRTCRemoteVideoStats新增了成员变量:jitter
    成员变量变化ByteRTCLocalAudioStats新增了成员变量:jitter
    成员变量变化ByteRTCRemoteAudioStats新增了成员变量:jitter
    3.29
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化房间管理- (int)joinRoomByKey:(NSString *_Nullable)token roomId:(NSString *_Nonnull)roomId userInfo:(ByteRTCUserInfo *_Nonnull)userInfo rtcRoomConfig:(ByteRTCRoomConfig *_Nonnull)rtcRoomConfig;- (int)joinRoomByKey:(NSString *_Nullable)token roomId:(NSString *_Nonnull)roomId userInfo:(ByteRTCUserInfo *_Nonnull)userInfo rtcRoomConfig:(ByteRTCRoomConfig *_Nonnull)rtcRoomConfig;补充方法调用返回信息
    参数变化房间管理- (int)leaveRoom:(void (^_Nullable)(ByteRTCRoomStats *_Nonnull stat))leaveRoomBlock;- (int)leaveRoom;
    参数变化多房间- (int)joinRoomByToken:(NSString *_Nullable)token userInfo:(ByteRTCUserInfo *_Nonnull)userInfo roomConfig:(ByteRTCMultiRoomConfig *_Nonnull)roomConfig;- (int)joinRoomByToken:(NSString *_Nullable)token userInfo:(ByteRTCUserInfo *_Nonnull)userInfo roomConfig:(ByteRTCMultiRoomConfig *_Nonnull)roomConfig;补充方法调用返回信息
    参数变化视频管理- (void)setVideoSourceType:(ByteRTCVideoSourceType)type;- (void)setVideoSourceType:(ByteRTCVideoSourceType)type WithStreamIndex:(ByteRTCStreamIndex)streamIndex;
    名称和参数变化音频管理- (void)setAudioVolumeIndicationInterval:(NSInteger)interval;- (void)enableAudioPropertiesReport:(ByteRTCAudioPropertiesConfig* _Nonnull)config;
    名称和参数变化视频管理- (int)setLocalVideoMirrorMode:(ByteRTCMirrorMode) mode;- (int)setLocalVideoMirrorType:(ByteRTCMirrorType) mirrorType;
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前回调变动后回调备注
    删除视频管理- (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine didMirrorStateChanged:(BOOL)mirrored;/
    拆分或合并音频管理- (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onAudioVolumeIndication:(NSArray<ByteRTCAudioVolumeInfo *> * _Nonnull)speakers totalRemoteVolume:(NSInteger)totalRemoteVolume;
  • (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onLocalAudioPropertiesReport:(NSArray<ByteRTCLocalAudioPropertiesInfo *> * _Nonnull)audioPropertiesInfos;
  • (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onRemoteAudioPropertiesReport:(NSArray<ByteRTCRemoteAudioPropertiesInfo *> * _Nonnull)audioPropertiesInfos totalRemoteVolume:(NSInteger)totalRemoteVolume;
  • 旧版回调拆分为 onLocalAudioPropertiesReport: 和 onRemoteAudioPropertiesReport:
    3.28
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    枚举值增减ByteRTCAudioChannel新增了枚举值:ByteRTCAudioChannelAuto
    枚举值增减ByteRTCAudioSampleRate新增了枚举值:ByteRTCAudioSampleRateAuto
    3.27
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化视频管理- (int)setVideoEncoderConfig:(NSArray <ByteRTCVideoSolution *> *_Nullable)videoSolutions;- (int)setVideoEncoderConfig:(ByteRTCStreamIndex)streamIndex config:(NSArray <ByteRTCVideoSolution *> * _Nullable)videoSolutions;
    名称和参数变化音频管理- (void)setRecordingVolume:(NSInteger)volume- (void)setCaptureVolume:(ByteRTCStreamIndex)index volume:(int)volume;
    名称和参数变化音频数据回调- (BOOL)setMediaMetadataObserver:(_Nullable id<ByteRTCMediaMetadataObserver>) metadataObserver;- (int)sendSEIMessage:(ByteRTCStreamIndex)streamIndex andMessage:(NSData* _Nonnull)message andRepeatCount:(int)repeatCount;
    名称和参数变化引擎管理+ (int)feedbackGrade:(NSInteger)grade type:(NSInteger)type desc:(NSString* _Nullable)desc;- (int)feedbackTypes:(NSArray* _Nullable)types desc:(NSString* _Nullable)desc;
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前回调变动后回调备注
    名称和参数变化视频数据回调virtual void OnMetadataReceived(const char* roomid, const char* uid, const VideoMetadataBuffer& metadata) = 0;- (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onSEIMessageReceived:(ByteRTCRemoteStreamKey* _Nonnull)remoteStreamKey andMessage:(NSData* _Nonnull)message;
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    枚举值增减ByteRTCProblemFeedbackOption删除了枚举值:
  • ByteRTCProblemFeedbackOptionConnectionFailed
  • ByteRTCProblemFeedbackOptionConnectionFailed
  • ByteRTCProblemFeedbackOptionConnectionFailed
  • 新增了枚举值:
  • ByteRTCFeedBackProblemTypeEarBackDelay
  • 错误码变更

    以下表格中的错误码发生了变化,你需要进行相应的处理:

    变更详情错误码备注
    枚举值增减ByteRTCWarningCode新增了枚举值:
  • ByteRTCWarningSetScreenAudioSourceTypeFailed
  • ByteRTCWarningSetScreenAudioStreamIndexFailed
  • 3.26
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化房间管理- (int)joinRoomByKey:(NSString *_Nullable)token roomId:(NSString *_Nonnull)roomId roomProfile:(ByteRTCRoomProfile)roomProfile userInfo:(ByteRTCUserInfo *_Nonnull)userInfo;- (int)joinRoomByKey:(NSString *_Nullable)token roomId:(NSString *_Nonnull)roomId userInfo:(ByteRTCUserInfo *_Nonnull)userInfo rtcRoomConfig:(ByteRTCRoomConfig *_Nonnull)rtcRoomConfig;
    名称和参数变化房间管理- (BOOL)setUserRole:(ByteRTCUserRoleType)role;- (BOOL)setUserVisibility:(BOOL)enable;
    拆分或合并房间管理
  • - (void)subscribeStream:(NSString *_Nonnull)userId subscribeConfig:(ByteRTCSubscribeConfig *_Nonnull)info
  • - (void)unSubscribeStream:(NSString *_Nonnull)userId isScreen:(BOOL)isScreen
  • - (void)muteRemoteAudio:(NSString * _Nonnull)uid muteState:(ByteRTCMuteState)muteState
  • - (int)muteRemoteVideo:(NSString * _Nonnull)uid withMuteState:(ByteRTCMuteState)muteState
  • - (void)subscribeUserStream:(NSString *_Nonnull)userId streamType:(ByteRTCStreamIndex)streamType mediaType:(ByteRTCSubscribeMediaType)mediaType videoConfig:(ByteRTCSubscribeVideoConfig *_Nonnull)videoConfig;
    拆分或合并音频管理/视频管理
  • - (void)muteAllRemoteAudio:(ByteRTCMuteState)muteState
  • - (int)muteAllRemoteVideo:(ByteRTCMuteState)muteState
  • - (void)pauseAllSubscribedStream:(ByteRTCPauseResumControlMediaType) mediaType;
  • 通过 pauseAllSubscribedStream 和 resumeAllSubscribedStream 来暂停或接收所有远端媒体流
    删除房间管理- (BOOL)enableAutoSubscribe:(ByteRTCSubscribeMode)audioMode videoMode:(ByteRTCSubscribeMode)videoMode/使用 joinRoomBykey 中的 roomConfig 进行设置
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    枚举值增减ByteRTCAudioScenarioType新增了枚举值:ByteRTCAudioScenarioGameStreaming
    枚举值增减ByteRTCUserMessageSendResult新增了枚举值:
  • ByteRTCUserMessageSendResultNotLogin
  • ByteRTCUserMessageSendResultServerParamsNotSet
  • 错误码变更

    以下表格中的错误码发生了变化,你需要进行相应的处理:

    变更详情错误码备注
    枚举值增减ByteRTCWarningCode新增了枚举值:
  • ByteRTCWarningCodePublishStreamForbiden
  • ByteRTCWarningCodeCodeUserNotifyStop
  • 3.25
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化混音- (int)getAudioMixingDuration;-(int)getAudioMixingDuration:(int)id;
    参数变化混音- (int)getAudioMixingCurrentPosition;-(int)getAudioMixingCurrentPosition:(int)id;
    参数变化混音- (int)setAudioMixingPosition:(NSInteger)pos;-(void)setAudioMixingPosition:(int)id position:(int)position;
    名称和参数变化混音- (int)preloadEffect:(NSInteger)soundId filePath:(NSString * _Nullable)filePath-(void)preloadAudioMixing:(int)id filePath:(NSString * _Nullable)filePath;
    名称和参数变化混音- (BOOL)pushAudioMixingStreamData:(void*_Nonnull)audioFrame frameNum:(int)frameNum;-(int)pushAudioMixingFrame:(ByteRTCAudioFrame* _Nullable)audioFrame;
    拆分或合并自定义视频采集渲染
  • - (int)setLocalVideoRenderer:(id<ByteRTCVideoSinkProtocol> _Nullable)videoRenderer;
  • - (int)setLocalVideoRenderer:(id<ByteRTCVideoSinkProtocol> _Nullable)videoRenderer forRoomId:(NSString * _Nonnull)roomId forUserId:(NSString * _Nonnull)userId;
  • -(void) setLocalVideoSink:(ByteRTCStreamIndex)index withSink:(id<ByteRTCVideoSinkProtocol>) sink withPixelFormat:(ByteVideoPixelFormat)requiredFormat多个旧版接口合并为 setLocalVideoSink
    拆分或合并自定义视频采集渲染
  • - (int)setRemoteVideoRenderer:(id<ByteRTCVideoSinkProtocol> _Nullable)videoRenderer forRoomId:(NSString * _Nonnull)roomId forUserId:(NSString * _Nonnull)userId;
  • - (int)setRemoteVideoRenderer:(id<ByteRTCVideoSinkProtocol> _Nullable)videoRenderer forUserId:(NSString * _Nonnull)userId;
  • - (int)setupRemoteScreenRenderer:(id<ByteRTCVideoSinkProtocol> _Nullable)screenRenderer forRoomId:(NSString * _Nonnull)roomId forUserId:(NSString * _Nonnull)userId;
  • -(int)setupRemoteScreenRenderer:(id<ByteRTCVideoSinkProtocol> _Nullable)screenRenderer forUserId:(NSString * _Nonnull)userId;
  • -(void) setRemoteVideoSink:(ByteRTC RemoteStreamKey)streamKey withSink:(id<ByteRTCVideoSinkProtocol>) canvas withPixelFormat:(ByteVideoPixelFormat)requiredFormat多个旧版接口合并为 setRemoteVideoSink
    拆分或合并混音
  • - (int)startAudioMixing:(NSString * _Nonnull)filePath loopback:(BOOL)loopback replace:(BOOL)replace cycle:(NSInteger)cycle;
  • - (int)playEffect:(NSInteger)soundId filePath:(NSString * _Nullable)filePath loopback:(BOOL)loopback cycle:(NSInteger)cycle withVolume:(NSInteger)volume;
  • -(void)startAudioMixing:(int)id filePath:(NSString * _Nullable)filePath config:(ByteRTCAudioMixingConfig * _Nullable)config;多个接口合并为 startAudioMixing
    拆分或合并混音
  • - (int)stopAudioMixing;
  • - (int)stopEffect:(NSInteger)soundId;
  • - (int)stopAllEffects;
  • -(void)stopAudioMixing:(int)id;多个接口合并为 stopAudioMixing
    拆分或合并混音
  • - (int)pauseAudioMixing;
  • - (int)pauseEffect:(NSInteger)soundId;
  • - (int)pauseAllEffects;
  • -(void)pauseAudioMixing:(int)id;多个接口合并为pauseAudioMixing
    拆分或合并混音
  • - (int)resumeAudioMixing;
  • - (int)resumeEffect:(NSInteger)soundId;
  • - (int)resumeAllEffects;
  • -(void)resumeAudioMixing:(int)id;多个接口合并为 resumeAudioMixing
    拆分或合并混音
  • - (int)unloadEffect:(NSInteger)soundId;
  • - (int)unloadAllEffects;
  • -(void)unloadAudioMixing:(int)id;多个接口合并为 unloadAudioMixing
    拆分或合并混音
  • - (int)adjustAudioMixingVolume:(NSInteger)volume;
  • - (int)setVolumeOfEffect:(NSInteger)soundId withVolume:(NSInteger)volume
  • - (int)adjustAudioMixingPlayoutVolume:(NSInteger)volume;
  • - (int)adjustAudioMixingPublishVolume:(NSInteger)volume;
  • - (int)setEffectsVolume:(NSInteger)volume;
  • -(void)setAudioMixingVolume:(int)id volume:(int)volume type:(ByteRTCAudioMixingType)type;多个接口合并为setAudioMixingVolume
    拆分或合并混音- (BOOL)setAudioPlayoutMixStream:(BOOL) enable sampleRate:(int) sampleRate channelNum:(int) channelNum;
  • -(void)enableAudioMixingFrame:(ByteRTCAudioMixingType)type;
  • -(void)disableAudioMixingFrame;
  • 旧版接口拆分成 enableAudioMixingFrame 和 disableAudioMixingFrame
    删除混音- (int)getEffectVolume:(NSInteger)soundId;/
    删除混音- (int)getAudioMixingStreamCachedFrameNum;/
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    枚举值增减ByteRTCStreamMixingEvent新增了枚举值:StreamMixingUpdateTimeOut
    枚举值增减ByteRTCStreamMixingType删除了枚举值:StreamMixingTypeByAuto
    3.24
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化视频特效- (void) setVideoEffectNodes:(NSArray <NSString *> *_Nonnull)effectNodePaths;- (int) setVideoEffectNodes:(NSArray <NSString *> *_Nonnull)effectNodePaths;
    参数变化视频特效- (void) updateVideoEffectNode:(NSString * _Nonnull)nodePath nodeKey:(NSString * _Nonnull)nodeKey nodeValue:(float) nodeValue;- (int) updateVideoEffectNode:(NSString * _Nonnull)nodePath nodeKey:(NSString * _Nonnull)nodeKey nodeValue:(float) nodeValue;
    参数变化视频特效- (void) setVideoEffectColorFilter:(NSString * _Nonnull)resPath;- (int) setVideoEffectColorFilter:(NSString * _Nonnull)resPath;
    参数变化视频特效- (void) setVideoEffectColorFilterIntensity:(float) intensity;- (int) setVideoEffectColorFilterIntensity:(float) intensity;
    参数变化视频管理- (int)muteLocalVideo:(ByteRTCMuteState)mute_state;- (void)muteLocalVideo:(ByteRTCMuteState)mute_state;
    名称和参数变化视频管理- (void)setVideoInputType:(ByteRTCMediaInputType)type;- (void)setVideoSourceType:(ByteRTCVideoSourceType)type;
    删除视频特效- (int) checkVideoEffectSupport;/
    删除视频特效- (void) addVideoEffectNodes:(NSArray <NSString *> *_Nonnull)effectNodePaths;/
    删除视频特效- (void) removeVideoEffectNodes:(NSArray <NSString *> *_Nonnull)effectNodePaths;/
    删除音频管理- (void)setAudioPerformanceProfile:(ByteRTCAudioPerformanceProfile) profile;/
    3.23
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    删除视频管理(int)startPreview;/
    删除视频管理(int)stopPreview;/
    拆分或合并音频管理(int)enableLocalAudio:(BOOL)enabled;
  • (void)startAudioCapture;
  • (void)stopAudioCapture;
  • 拆分后的接口解除了音频采集与发布的绑定关系。无论是否发布音频,你都可以开启音频采集,并且停止发布后不再自动关闭采集
  • 新接口解除了对外部源的推送控制,仅控制是否进行内部音频采集
  • 方法行为变化视频管理virtual void StartVideoCapture() = 0;virtual void StartVideoCapture() = 0;
  • 无论是否发布视频,你都可以开启视频采集
  • 解除了对外部源的推送控制,仅控制内部视频采集
  • 方法行为变化视频管理virtual void StopVideoCapture() = 0;virtual void StopVideoCapture() = 0;
  • 停止视频发布后不再自动关闭采集,可手动关闭
  • 解除了对外部源的推送控制,仅控制内部视频采集
  • 方法行为变化视频管理(void)setVideoInputType:(ByteRTCMediaInputType)type;(void)setVideoInputType:(ByteRTCMediaInputType)type;
  • 由自定义采集切换至内部采集后,须手动开启内部采集方可开始采集
  • 无切换场景时,内部采集、自定义采集互不影响
  • 进房前后均可切换
  • 方法行为变化音频管理(void)enableExternalAudioDevice:(ByteRTCAudioFormat * _Nonnull) recordingFormat playbackFormat:(ByteRTCAudioFormat * _Nonnull) playbackFormat;(void)enableExternalAudioDevice:(ByteRTCAudioFormat * _Nonnull) recordingFormat playbackFormat:(ByteRTCAudioFormat * _Nonnull) playbackFormat;
  • 由自定义采集切换至内部采集时,必须先关闭自定义采集,后手动开启内部采集
  • 无切换场景时,内部采集、自定义采集互不影响
  • 仅支持进房前切换
  • 回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前回调变动后回调备注
    名称变化引擎管理- (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine didMediaDeviceStateChanged``:(NSString*_Nonnull)device_id device_type:(ByteRTCMediaDeviceType)device_type device_state:(ByteRTCMediaDeviceState)device_state device_error:(ByteRTCMediaDeviceError)device_error;- (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onMediaDeviceStateChanged``:(NSString*_Nonnull)device_id device_type:(ByteRTCMediaDeviceType)device_type device_state:(ByteRTCMediaDeviceState)device_state device_error:(ByteRTCMediaDeviceError)device_error;
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    枚举值增减ByteRTCWarningCode新增了枚举值:
  • ByteRTCWarningCodeMediaDeviceOperationDennied
  • ByteRTCWarningCodeInvalidCanvasHandle
  • 3.22
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化房间管理(int)leaveRoom:(void (^_Nullable)(ByteRTCRoomStats *_Nonnull stat))leaveChannelBlock;(int)leaveRoom:(void (^_Nullable)(ByteRTCRoomStats *_Nonnull stat))leaveRoomBlock;
    参数变化视频管理- (int)switchCamera;- (int)switchCamera:(ByteRTCCameraID) cameraId;
    参数变化CDN 推流- (int)startLiveTranscoding:(ByteRTCLiveTranscoding *_Nonnull)transcoding;- (int)startLiveTranscoding:(ByteRTCLiveTranscoding *_Nonnull)transcoding observer:(id<LiveTranscodingDelegate> _Nonnull)observer;
    名称和参数变化CDN 推流- (int)updateLiveTranscodingLayout:(ByteRTCVideoCompositingLayout *_Nonnull)layout;- (int)updateLiveTranscoding:(ByteRTCLiveTranscoding *_Nonnull)transcoding;
    删除音频管理- (BOOL)isSpeakerphoneEnabled;/
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前回调变动后回调备注
    参数变化警告码(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onWarning:(ByteRTCWarningCode)Code;(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onWarning:(ByteRTCWarningCode)Code;ByteRTCWarningCode 增加了枚举值:ByteRTCWarningCodeRecordingSilence
    参数变化引擎管理(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine didMediaDeviceStateChanged:(ByteRTCMediaDeviceType)device_type device_state:(ByteRTCMediaDeviceState)device_state;(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine didMediaDeviceStateChanged:(NSString*_Nonnull)device_id device_type:(ByteRTCMediaDeviceType)device_type device_state:(ByteRTCMediaDeviceState)device_state device_error:(ByteRTCMediaDeviceError)device_error;ByteRTCMediaDeviceType 枚举值名称变更
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    枚举值增减ByteRTCMediaDeviceState删除了枚举值:
  • ByteRTCMediaDeviceStateStartFailed
  • ByteRTCMediaDeviceStateStopFailed
  • ,新增了枚举值:
  • ByteRTCMediaDeviceStateRuntimeError
  • ByteRTCMediaDeviceStateAdded
  • ByteRTCMediaDeviceStateRemoved
  • 3.21
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化加密(void)setEncryptType:(ByteEncryptType)encrypt_type key:(NSString * _Nonnull)key;(void)setEncryptType:(ByteRTCEncryptType)encrypt_type key:(NSString * _Nonnull)key;
    参数变化房间管理(BOOL)enableAutoSubscribe:(ByteSubscribeMode)audioMode videoMode:(ByteSubscribeMode)videoMode;- (BOOL)enableAutoSubscribe:(ByteRTCSubscribeMode)audioMode videoMode:(ByteRTCSubscribeMode)videoMode;
    参数变化视频管理(BOOL)pushExternalByteVideoFrame:(ByteVideoFrame * _Nonnull)frame;(BOOL)pushExternalByteVideoFrame:(ByteRTCVideoFrame * _Nonnull)frame;
    参数变化视频管理(int) replaceBackground:(BackgroundMode)mode withDivideModel:(DivideModel)divideModel;(int) replaceBackground:(ByteRTCBackgroundMode)mode withDivideModel:(ByteRTCDivideModel)divideModel;
    参数变化视频管理(int)setLocalVideoMirrorMode:(ByteVideoMirrorMode) mode;(int)setLocalVideoMirrorMode:(ByteRTCMirrorMode) mode;
    参数变化性能回退(int)setPublishFallbackOption:(BytePublishFallbackOption)option;(int)setPublishFallbackOption:(ByteRTCPublishFallbackOption)option;
    参数变化性能回退(int)setSubscribeFallbackOption:(ByteSubscribeFallbackOption)option;(int)setSubscribeFallbackOption:(ByteRTCSubscribeFallbackOption)option;
    参数变化性能回退(int)setRemoteUserPriority:(ByteUserPriority)priority uid:(NSString *_Nonnull)uid;(int)setRemoteUserPriority:(ByteRTCRemoteUserPriority)priority uid:(NSString *_Nonnull)uid;
    参数变化音频管理(BOOL)pullExternalAudioFrame:(void* _Nonnull)audioFrame frameNum:(int)frameNum;(int)pullExternalAudioFrame:(ByteRTCAudioFrame * _Nonnull) audioFrame;
    参数变化音频管理(BOOL)pushExternalAudioFrame:(void* _Nonnull)audioFrame frameNum:(int)frameNum;(int)pushExternalAudioFrame:(ByteRTCAudioFrame * _Nonnull) audioFrame;
    参数变化音频管理(void)setAudioScenario:(ByteRtcAudioScenarioType)audioScenario;(void)setAudioScenario:(ByteRTCAudioScenarioType)audioScenario;
    名称变化房间管理- (int)renewChannelKey:(NSString * _Nonnull)token- (int)updateToken:(NSString *_Nonnull)token
    名称变化加密(NSData * _Nonnull)ByteEngineEncryptRawData:(NSData * _Nonnull)rawData;(NSData * _Nonnull) ByteRTCEncryptRawData:(NSData * _Nonnull)rawData;
    名称变化加密(NSData * _Nonnull)ByteEngineDecryptRawData:(NSData * _Nonnull)rawData;(NSData * _Nonnull) ByteRTCDecryptRawData:(NSData * _Nonnull)rawData;
    名称变化音频管理(int)adjustRecordingSignalVolume:(NSInteger)volume;(void)setRecordingVolume:(NSInteger)volume;
    名称变化音频管理(int)adjustPlaybackSignalVolume:(NSInteger)volume;(void)setPlaybackVolume:(NSInteger)volume;
    名称变化CDN 推流(int)disableLiveTranscoding(int)stopLiveTranscoding
    名称和参数变化房间管理- (BOOL)setClientRole:(ByteRtcClientRole)role;- (BOOL)setUserRole:(ByteRTCUserRoleType)role;
    名称和参数变化房间管理- (int)leaveChannel:(void(^ _Nullable)(ByteRtcStats * _Nonnull stat))leaveChannelBlock- (int)leaveRoom:(void (^_Nullable)(ByteRTCRoomStats *_Nonnull stat))leaveChannelBlock;
    名称和参数变化房间管理- (int)joinChannelByKey:(NSString * _Nullable)token channelName:(NSString * _Nonnull)roomId info:(NSString * _Nullable)info uid:(NSString * _Nonnull)userId- (int)joinRoomByKey:(NSString *_Nullable)token roomId:(NSString *_Nonnull)roomId roomProfile:(ByteRTCRoomProfile)roomProfile userInfo:(ByteRTCUserInfo *_Nonnull)userInfo;
    名称和参数变化视频管理(void)setExternalVideoSource:(BOOL)enable useTexture:(BOOL)useTexture pushMode:(BOOL)pushMode;(void)setVideoInputType:(ByteRTCMediaInputType)type;
    名称和参数变化视频管理(int)muteAllRemoteVideoStreams:(BOOL)mute;(int)muteAllRemoteVideo:(ByteRTCMuteState)muteState;
    名称和参数变化视频管理(int)muteRemoteVideoStream:(NSString * _Nonnull)uid mute:(BOOL)mute;(int)muteRemoteVideo:(NSString * _Nonnull)uid withMuteState:(ByteRTCMuteState)muteState;
    名称和参数变化视频管理(int)setupLocalVideo:(ByteRtcVideoCanvas * _Nullable)local;(int)setLocalVideoCanvas:(ByteRTCStreamIndex)streamIndex withCanvas:(ByteRTCVideoCanvas * _Nullable)canvas;
    名称和参数变化视频管理(int)muteLocalVideoStream:(BOOL)mute;(int)muteLocalVideo:(ByteRTCMuteState)mute_state;
    名称和参数变化视频管理(VideoStreamState)setVideoProfiles:(NSArray <VideoStreamDescription *> * _Nullable)videoStreamDescriptions(int)setVideoEncoderConfig:(NSArray <ByteRTCVideoSolution *> * _Nullable)videoSolutions
    名称和参数变化音频管理(int)setEnableSpeakerphone:(BOOL)enableSpeaker(int)setAudioPlaybackDevice:(ByteRTCAudioPlaybackDevice)audioPlaybackDevice
    名称和参数变化音频管理(void)setAudioPerfProfile:(AudioPerfProfile) profile(void)setAudioPerformanceProfile:(ByteRTCAudioPerformanceProfile) profile
    名称和参数变化音频管理(int)muteLocalAudioStream:(BOOL)mute(void)muteLocalAudio:(ByteRTCMuteState)muteState
    名称和参数变化音频管理(int)muteRemoteAudioStream:(NSString * _Nonnull)uid mute:(BOOL)mute(void)muteRemoteAudio:(NSString * _Nonnull)uid muteState:(ByteRTCMuteState)muteState
    名称和参数变化音频管理(int)enableAudioVolumeIndication:(NSInteger)interval smooth:(NSInteger)smooth(void)setAudioVolumeIndicationInterval:(NSInteger)interval
    名称和参数变化音频管理(int)adjustRemoteAudioVolume:(int)volume ofUid:(NSString* _Nonnull)uid(void)setRemoteAudioPlaybackVolume:(NSString* _Nonnull)uid volume:(int)volume
    名称和参数变化CDN 推流(int)enableLiveTranscoding:(ByteRtcLiveTranscoding * _Nonnull)transcoding(int)startLiveTranscoding:(ByteRTCLiveTranscoding *_Nonnull)transcoding
    名称和参数变化CDN 推流(int)setVideoCompositingLayout:(ByteRtcVideoCompositingLayout * _Nonnull)layout(int)updateLiveTranscodingLayout:(ByteRTCVideoCompositingLayout *_Nonnull)layout
    拆分或合并视频管理(int)enableLocalVideo:(BOOL)enabled;
  • (void)startVideoCapture;
  • (void)stopVideoCapture;
  • 旧版接口拆分成 startVideoCapture 和 stopVideoCapture
    拆分或合并视频管理
  • (int)setupRemoteVideo:(ByteRtcVideoCanvas * _Nonnull)remote;
  • (int)setupRemoteScreen:(ByteRtcVideoCanvas * _Nonnull)screen;
  • (int)setRemoteVideoCanvas:(NSString * _Nonnull)uid withIndex:(ByteRTCStreamIndex)streamIndex withCanvas:(ByteRTCVideoCanvas * _Nullable)canvas;旧版接口合并为 setRemoteVideoCanvas
    拆分或合并音频管理
  • (int)muteAllRemoteAudioStreams:(BOOL)mute
  • (void)setDefaultMuteAllRemoteAudioStreams:(BOOL)mute
  • (void)muteAllRemoteAudio:(ByteRTCMuteState)muteState多个旧版接口合并为 muteAllRemoteAudio:
    拆分或合并音频管理(BOOL)setExternalAudioDevice:(BOOL) enable sampleRate:(int) sampleRate recordChannelNum:(int) recordChannelNum playoutChannelNum:(int) playoutChannelNum
  • (void)enableExternalAudioDevice:(ByteRTCAudioFormat * _Nonnull) recordingFormat playbackFormat:(ByteRTCAudioFormat * _Nonnull) playbackFormat
  • (void)disableExternalAudioDevice
  • 旧版接口拆分为 enableExternalAudioDevice:playbackFormat: 和 disableExternalAudioDevice
    删除房间管理(int)setChannelProfile:(ByteChannelProfile)profile;/
    删除视频管理(VideoStreamState)setVideoProfiles:(NSArray <VideoStreamDescription *> * _Nullable)videoStreamDescriptions orientationMode:(ByteVideoOutputOrientationMode)mode;/
    删除视频管理(void)setDefaultMuteAllRemoteVideoStreams:(BOOL)mute;/
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前回调变动后回调备注
    参数变化引擎管理- (void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine didMediaDeviceStateChanged:(ByteMediaDeviceType)device_type device_state:(ByteMediaDeviceState)device_state;- (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine didMediaDeviceStateChanged:(ByteRTCMediaDeviceType)device_type device_state:(ByteRTCMediaDeviceState)device_state;
    参数变化房间管理- (void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine didStreamRemoved:(NSString *_Nonnull)uid stream:(id<ByteStream> _Nonnull)stream reason:(RtcStreamRemoveReason)reason;- (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine didStreamRemoved:(NSString *_Nonnull)uid stream:(id<ByteRTCStream> _Nonnull)stream reason:(ByteRTCStreamRemoveReason)reason;
    参数变化房间管理- (void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine onStreamAdd:(id <ByteStream> _Nonnull)stream;- (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onStreamAdd:(id <ByteRTCStream> _Nonnull)stream;ByteRTCStream 类型名称变化
    参数变化房间管理- (void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine onScreenVideoFrameSendStateChanged:(ByteRtcUser *_Nonnull)user state:(FirstFrameSendState)state;- (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onScreenVideoFrameSendStateChanged:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state;
    参数变化房间管理- (void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine onAudioFramePlayStateChanged:(ByteRtcUser *_Nonnull)user state:(FirstFramePlayState)state;- (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onAudioFramePlayStateChanged:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state;ByteRTCEngineKit、ByteRTCUser 和 ByteRTCFirstFramePlayState 类型名称变化
    参数变化房间管理- (void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine onVideoFramePlayStateChanged:(ByteRtcUser *_Nonnull)user state:(FirstFramePlayState)state;- (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onVideoFramePlayStateChanged:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state;ByteRTCEngineKit、ByteRTCUser 和 ByteRTCFirstFramePlayState 类型名称变化
    参数变化房间管理- (void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine onScreenVideoFramePlayStateChanged:(ByteRtcUser *_Nonnull)user state:(FirstFramePlayState)state;- (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onScreenVideoFramePlayStateChanged:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state;ByteRTCEngineKit、ByteRTCUser 和 ByteRTCFirstFramePlayState 类型名称变化
    参数变化数据统计(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine reportSysStats:(const ByteRtcSysStats * _Nonnull)stats;(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine reportSysStats:(const ByteRTCSysStats * _Nonnull)stats;
    参数变化网络连接(void) rtcEngine:(ByteRtcEngineKit * _Nonnull)engine connectionChangedToState:(ByteRtcConnectionState) state(void) rtcEngine:(ByteRTCEngineKit * _Nonnull)engine connectionChangedToState:(ByteRTCConnectionState) state
    参数变化网络连接(void) rtcEngine:(ByteRtcEngineKit * _Nonnull)engine networkTypeChangedToType:(ByteRtcNetworkType) type(void) rtcEngine:(ByteRTCEngineKit * _Nonnull)engine networkTypeChangedToType:(ByteRTCNetworkType) type
    参数变化音频管理(void)onRecordAudioFrame:(ByteAudioFrame * _Nonnull)audioFrame(void)onRecordAudioFrame:(ByteRTCAudioFrame * _Nonnull)audioFrame
    参数变化音频管理(void)onPlaybackAudioFrame:(ByteAudioFrame * _Nonnull)audioFrame(void)onPlaybackAudioFrame:(ByteRTCAudioFrame * _Nonnull)audioFrame
    参数变化音频管理(void)onMixedAudioFrame:(ByteAudioFrame * _Nonnull)audioFrame(void)onMixedAudioFrame:(ByteRTCAudioFrame * _Nonnull)audioFrame
    参数变化音频管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine didLocalAudioEnabled:(BOOL)enabled byUid:(NSString * _Nonnull)uid(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine didLocalAudioEnabled:(BOOL)enabled byUid:(NSString * _Nonnull)uid
    参数变化音频管理(void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine onAudioFrameSendStateChanged:(ByteRtcUser *_Nonnull)user state:(FirstFrameSendState)state(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onAudioFrameSendStateChanged:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state
    参数变化流消息(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine onRoomMessageReceived:(NSString * _Nonnull)uid message:(NSString * _Nonnull)message;(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onRoomMessageReceived:(NSString * _Nonnull)uid message:(NSString * _Nonnull)message;
    参数变化流消息(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine onRoomBinaryMessageReceived:(NSString * _Nonnull)uid message:(NSData * _Nonnull)message;(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onRoomBinaryMessageReceived:(NSString * _Nonnull)uid message:(NSData * _Nonnull)message;
    参数变化流消息(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine onUserMessageSendResult:(int64_t)msgid error:(UserMessageCode)error;(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserMessageSendResult:(int64_t)msgid error:(ByteRTCUserMessageSendResult)error;ByteRTCUserMessageSendResult 枚举值名称变更
    参数变化流消息(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine onRoomMessageSendResult:(int64_t)msgid error:(RoomMessageCode)error;(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onRoomMessageSendResult:(int64_t)msgid error:(ByteRTCRoomMessageSendResult)error;ByteRTCRoomMessageSendResult 枚举值名称变更
    删除视频管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine firstRemoteScreenDecodedOfUid:( NSString* _Nonnull )uid size:(CGSize)size elapsed:(NSInteger)elapsed;/
    删除视频管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine firstRemoteVideoDecodedOfUid:( NSString* _Nonnull )uid size:(CGSize)size elapsed:(NSInteger)elapsed;/
    删除房间管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine onLoginCompletion:(NSArray<id<ByteStream>>* _Nullable)streams errorCode:(NSInteger)errorcode;/
    删除房间管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine didJoinChannel:(NSString * _Nonnull)channel withUid:(nonnull NSString*)uid elapsed:(NSInteger) elapsed/
    删除房间管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine didRejoinChannel:(NSString * _Nonnull)channel withUid:(nonnull NSString*)uid elapsed:(NSInteger) elapsed/
    删除引擎管理(void)rtcEngine:(ByteRtcEngineKit* _Nonnull)engine log:(NSDictionary* _Nonnull)dict;/
    删除数据统计(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine audioQualityOfUid:(NSString* _Nonnull )uid quality:(ByteNetworkQuality)quality delay:(NSUInteger)delay lost:(NSUInteger)lost/
    拆分或合并房间管理
  • public void onJoinChannelSuccess(String channel, String uid, int elapsed
  • public void onRejoinChannelSuccess(String channel, String uid, int elapsed)
  • public void onJoinRoomResult(String roomId, String uid, int errorCode, int joinType, int elapsed)旧版回调合并为 onJoinRoomResult
    拆分或合并视频管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine didLocalVideoEnabled:(BOOL)enabled byUid:(NSString * _Nonnull)uid;
  • (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine didLocalVideoEnabled:(BOOL)enabled byUid:(NSString * _Nonnull)uid;
  • (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserStartVideoCapture:(NSString *_Nonnull)uid;
  • (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserStopVideoCapture:(NSString *_Nonnull)uid;
  • 旧版回调拆分为 didLocalVideoEnabled、onUserStartVideoCapture 和 onUserStopVideoCapture
    拆分或合并视频管理(void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine videoSizeChangedOfUid:(NSString * _Nonnull)uid size:(CGSize)size __attribute__((deprecated("Deprecated, please use a new interface")));
  • (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onLocalVideoSizeChanged:(ByteRTCStreamIndex)streamIndex withFrameInfo:(ByteRTCVideoFrameInfo *_Nonnull)frameInfo;
  • (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onRemoteVideoSizeChanged:(ByteRTCRemoteStreamKey *_Nonnull)streamKey withFrameInfo:(ByteRTCVideoFrameInfo *_Nonnull)frameInfo;
  • 旧版回调拆分为 onLocalVideoSizeChanged 和 onRemoteVideoSizeChanged
    拆分或合并视频管理
  • (void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine firstRemoteVideoFrameOfUid:(NSString* _Nonnull )uid size:(CGSize)size elapsed:(NSInteger)elapsed;
  • (void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine firstRemoteScreenFrameOfUid:(NSString* _Nonnull )uid size:(CGSize)size elapsed:(NSInteger)elapsed;
  • (void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onFirstRemoteVideoFrameRendered:(ByteRTCRemoteStreamKey * _Nonnull)streamKey withFrameInfo:(ByteRTCVideoFrameInfo * _Nonnull)frameInfo;旧版回调合并为 onFirstRemoteVideoFrameRendered
    拆分或合并数据统计
  • (void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine localVideoStats:(ByteRtcLocalVideoStats * _Nonnull)stats;
  • (void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine localAudioStats:(ByteRtcLocalAudioStats * _Nonnull)stats;
  • (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onLocalStreamStats:(const ByteRTCLocalStreamStats *_Nonnull)stats多个旧版回调合并为 rtcEngine:onLocalStreamStats: 中的多个状态
    拆分或合并数据统计
  • (void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine remoteVideoStats:(ByteRtcRemoteVideoStats * _Nonnull)stats;
  • (void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine remoteAudioStats:(ByteRtcRemoteVideoStats * _Nonnull)stats;
  • (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onRemoteStreamStats:(const ByteRTCRemoteStreamStats *_Nonnull)stats多个旧版回调合并为 rtcEngine:onRemoteStreamStats: 中的多个状态
    名称和参数变化警告码- (void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine didOccurWarning:(ByteRtcWarningCode)Code;- (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onWarning:(ByteRTCWarningCode)Code;
    名称和参数变化错误码- (void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine didOccurError:(ByteRtcErrorCode)errorCode;- (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onError:(ByteRTCErrorCode)errorCode;
    名称和参数变化房间管理public void onLeaveChannel(IRtcEngineEventHandler.RtcStats stats)public void onLeaveRoom(IRtcEngineEventHandler.RtcRoomStats stats)
    名称和参数变化房间管理- (void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine didJoinedOfUid:(nonnull NSString*)uid elapsed:(NSInteger)elapsed- (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onUserJoined:(nonnull ByteRTCUserInfo *)userInfo elapsed:(NSInteger)elapsed
    名称和参数变化房间管理- (void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine didOfflineOfUid:(NSString* _Nonnull )uid reason(ByteRtcUserOfflineReason)reason- (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onUserLeave:(NSString *_Nonnull)uid reason:(ByteRTCUserOfflineReason)reason;
    名称和参数变化房间管理- (void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine didPublishSucceedOfStream:(NSString *_Nonnull)userId isScreen:(BOOL)isScreen- (void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onStreamPublishSuccess:(NSString *_Nonnull)userId isScreen:(BOOL)isScreen;
    名称和参数变化视频管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine didVideoMuted:(BOOL)muted byUid:(NSString * _Nonnull)uid;(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserMuteVideo:(NSString * _Nonnull)uid withMuteState:(ByteRTCMuteState)muteState;
    名称和参数变化视频管理(void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine remoteVideoStateChanged:(NSString *_Nonnull)uid state:(ByteRemoteVideoState)state reason:(ByteRemoteVideoReason)reason elapsed:(NSInteger)elapsed;(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onRemoteVideoStateChanged:(ByteRTCRemoteStreamKey*_Nonnull)streamKey withVideoState:(ByteRTCRemoteVideoState)state withVideoStateReason:(ByteRTCRemoteVideoReason)reason;
    名称和参数变化视频管理(void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine localVideoStateChanged:(ByteLocalVideoStreamState)state error:(ByteLocalVideoStreamError)error;(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onLocalVideoStateChanged:(ByteRTCStreamIndex)streamIndex withStreamState:(ByteRTCLocalVideoStreamState)state withStreamError:(ByteRTCLocalVideoStreamError)error;
    名称和参数变化视频管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine firstLocalVideoFrameWithSize:(CGSize)size elapsed:(NSInteger)elapsed;(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onFirstLocalVideoFrameCaptured:(ByteRTCStreamIndex)streamIndex withFrameInfo:(ByteRTCVideoFrameInfo * _Nonnull)frameInfo;
    名称和参数变化数据统计(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine reportRtcStats:(ByteRtcStats * _Nonnull)stats(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onRoomStats:(ByteRTCRoomStats *_Nonnull)stats
    名称和参数变化性能回退(void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine onPerformanceAlarmsWithLevel:(NSInteger)level sourceWantedData:(ByteSourceWantedData *_Nonnull)data;(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onPerformanceAlarmsWithMode:(ByteRTCPerformanceAlarmMode)mode roomId:(NSString *_Nonnull)roomId reason:(ByteRTCPerformanceAlarmReason)reason sourceWantedData:(ByteRTCSourceWantedData *_Nonnull)data;
    名称和参数变化性能回退(void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine OnRemoteStreamSwitch:(ByteRemoteStreamSwitchEvent *_Nonnull)event(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine OnSimulcastSubscribeFallback:(ByteRTCRemoteStreamSwitchEvent *_Nonnull)event
    名称和参数变化音频管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine didAudioRouteChanged:(ByteAudioOutputRouting)routing(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onAudioPlaybackDeviceChanged:(ByteRTCAudioPlaybackDevice)device
    名称和参数变化音频管理(void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine localAudioStateChanged:(ByteLocalAudioStreamState)state error:(ByteLocalAudioStreamError)error(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onLocalAudioStateChanged:(ByteRTCLocalAudioStreamState)state error:(ByteRTCLocalAudioStreamError)error
    名称和参数变化音频管理(void)rtcEngine:(ByteRtcEngineKit *_Nonnull)engine remoteAudioStateChanged:(NSString *_Nonnull)uid state:(ByteRemoteAudioState)state reason:(ByteRemoteAudioReason)reason elapsed:(NSInteger)elapsed(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onRemoteAudioStateChanged:(ByteRTCRemoteStreamKey * _Nonnull)key state:(ByteRTCRemoteAudioState)state reason:(ByteRTCRemoteAudioStateChangeReason)reason
    名称和参数变化音频管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine didAudioMuted:(BOOL)muted byUid:(NSString * _Nonnull)uid(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onUserMuteAudio:(NSString * _Nonnull)uid muteState:(ByteRTCMuteState)muteState
    名称和参数变化音频管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine firstLocalAudioFrame:(NSInteger)elapsed(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onFirstLocalAudioFrame:(ByteRTCStreamIndex) streamIndex
    名称和参数变化音频管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine firstRemoteAudioFrameOfUid:(NSString * _Nonnull)uid elapsed:(NSInteger)elapsed(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onFirstRemoteAudioFrame:(ByteRTCRemoteStreamKey * _Nonnull)key
    名称和参数变化音频管理(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine reportAudioVolumeIndicationOfSpeakers:(NSArray<ByteRtcAudioVolumeInfo *> * _Nonnull)speakers totalVolume:(NSInteger)totalVolume(void)rtcEngine:(ByteRTCEngineKit * _Nonnull)engine onAudioVolumeIndication:(NSArray<ByteRTCAudioVolumeInfo *> * _Nonnull)speakers totalRemoteVolume:(NSInteger)totalRemoteVolume
    名称和参数变化CDN 推流(void)rtcEngine:(ByteRtcEngineKit * _Nonnull)engine TransCodingWithUrl:(NSString * _Nonnull)url errorCode:(ByteRtcTransCodeingErrorCode)errorCode;(void)rtcEngine:(ByteRTCEngineKit *_Nonnull)engine onLiveTranscodingResult:(NSString *_Nonnull)url errorCode:(ByteRTCTranscodingError)errorCodeByteRTCTranscodingError 错误码名称变更
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    名称变化ByteAACProfileByteRTCAACProfile
    名称变化ProblemFeedbackByteRTCProblemFeedbackOption
    枚举值增减ByteRTCRemoteVideoStats删除了枚举值:uid,此变量请参考 ByteRTCRemoteStreamStats 中的 uid
    枚举值增减ByteRTCRemoteAudioStats删除了枚举值:uid,此变量请参考 ByteRTCRemoteStreamStats 中的 uid
    类型增减ByteAudioDeviceObserver删除,且无替代类。
    3.20
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前回调变动后回调备注
    拆分或合并引擎管理
  • (void)rtcEngineConnectionDidInterrupted:(ByteRtcEngineKit * _Nonnull)engine
  • (void)rtcEngineConnectionDidLost:(ByteRtcEngineKit * _Nonnull)engine
  • rtcEngine:(ByteRtcEngineKit * _Nonnull)engine connectionChangedToState:(ByteRtcConnectionState) state多个旧版回调合并为 rtcEngine:connectionChangedToState: 中的多个状态
    3.19.2
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化房间管理(BOOL)enableAutoSubscribe:(BOOL)autoSubscribe(BOOL)enableAutoSubscribe:(ByteSubscribeMode)audioMode videoMode:(ByteSubscribeMode)videoMode;
    类型变更

    以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:

    变更详情数据类型备注
    名称变化MessageCodeUserMessageCode
    枚举值增减ByteRtcClientRole删除了枚举值:ByteRtc_ClientRole_Audience,建议使用 ByteRtc_ClientRole_Silent_Audience 代替。
    枚举值增减ByteRtcConnectionState新增了枚举值:ByteRtc_ConnectionState_Lost
    枚举值增减SubscribeState新增了枚举值:SUBSCRIBE_STATE_FAILED_OVER_LIMIT
    错误码变更

    以下表格中的错误码发生了变化,你需要进行相应的处理:

    变更详情错误码备注
    枚举值增减ByteRtcErrorCode新增了枚举值:
  • BRERR_OVER_STREAM_PUBLISH_LIMIT
  • BRERR_OVER_SCREEN_PUBLISH_LIMIT
  • BRERR_OVER_VIDEO_PUBLISH_LIMIT
  • 3.19.1
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化房间管理(void)setEncryptType:(ByteEncryptType)encrypt_type key:(NSString *)key(void)setEncryptType:(ByteEncryptType)encrypt_type key:(NSString * _Nonnull)key
    回调变更

    以下表格中的回调发生了变化。你需要在工程文件中找到该回调,并进行相关修改:

    变更详情功能模块变动前回调变动后回调备注
    删除(void)setTTMonitorCallBack:(void (^ _Nullable)(NSDictionary * _Nonnull data, NSString * _Nullable logType))callBack;
    删除(void)setByteLog:(BOOL)isConsole callBack:(void (^ _Nullable)(ByteRtcLogLevel leave, NSString * _Nonnull filename, NSString * _Nonnull tag, int line, NSString * _Nonnull funcName, NSString * _Nullable format))callBack;
    3.18.3
    方法变更

    以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:

    变更详情功能模块变动前方法变动后方法备注
    参数变化房间管理(void)unSubscribeStream:(NSString * _Nonnull)streamId(void)unSubscribeStream:(NSString *_Nonnull)userId isScreen:(BOOL)isScreen
    参数变化房间管理(void)subscribeStream:(NSString * _Nonnull)streamId subscribeConfig:(SubscribeConfig * _Nonnull)info(void)subscribeStream:(NSString *_Nonnull)userId subscribeConfig:(SubscribeConfig *_Nonnull)info