You need to enable JavaScript to run this app.
导航

macOS 客户端升级指南

最近更新时间2024.03.28 21:48:50

首次发布时间2021.09.14 18:55:43

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

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

3.58

类型变更

变更详情功能模块改动的数据类型说明
新增枚举值音效ByteRTCPlayerState

3.57

重要说明

  1. 该版本对所有不规范的 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旧版接口仅支持在手动订阅时使用,新增支持在自动订阅时使用。
删除音频处理ByteRTCAudioProcessorByteRTCAudioFrameProcessorByteRTCAudioProcessor 已在 3.42 中废弃。此次进行了删除。
参数数据结构新增成员变量音频管理enableAudioPropertiesReportenableAudioPropertiesReport新增参数 enableVoicePitch 控制是否回调本地用户的人声基频。
废弃视频处理ByteRTCVideo.getAuthMessageByteRTCVideoEffect.getAuthMessage使用类 ByteRTCVideoEffect 中的同名方法,替换 ByteRTCVideo 中的方法。

回调变更

变更详情功能模块废弃的类/接口替代的类/接口说明
删除主回调类ByteRTCEngineDelegateByteRTCVideoDelegate
参数变更消息(void)rtcEngineOnLogout:(ByteRTCVideo * _Nonnull)engine NS_SWIFT_NAME(rtcEngineOnLogout(_:))(void)rtcEngine:(ByteRTCVideo * _Nonnull)engine onLogout:(ByteRTCLogoutReason)reasononLogout 回调上新增 reason 参数,区分用户主动/被动登出。
参数数据结构新增成员变量音频管理onLocalAudioPropertiesReportonLocalAudioPropertiesReport新增参数voicePitch返回本地用户的人声基频。

类型变更

变更详情功能模块改动的数据类型说明
成员变量新增字幕翻译服务ByteRTCSubtitleMessage在字幕内容回调 rtcRoom:onSubtitleMessageReceived: 的参数 ByteRTCSubtitleMessage 中新增成员变量 languagemode,可用于同时收到字幕原文和字幕译文。
成员变量变更CDN 推流ByteRTCMixedStreamLayoutRegionConfig转推直播单个用户画面由设置相对于整体画面的归一化比例变更为可设置像素绝对值。
枚举值重命名视频管理ByteRTCVideoSourceType
  • ByteRTCVideoSourceTypeEncodedManualSimulcast = 2 变更为 ByteRTCVideoSourceTypeEncodedAutoSimulcast = 2
  • ByteRTCVideoSourceTypeEncodedAutoSimulcast = 3 变更为 ByteRTCVideoSourceTypeEncodedManualSimulcast = 3
  • 变更后的枚举值与其他端保持一致。

    错误码变更

    变更详情错误码说明
    枚举值增删ByteRTCUserMessageSendResult新增客户端向业务服务器发送消息失败错误码:
  • ByteRTCUserMessageSendResultE2BSSendFailed = 17
  • ByteRTCUserMessageSendResultE2BSReturnFailed = 18
  • 3.54

    重要说明

    1. 该版本 macOS 端新增音频编解码器插件、视频编解码器插件,详情参看按需集成插件文档。
    2. 该版本为全部 API 增加返回值,通过返回值可以明确发现失败的 API 调用,定位失败原因。具体返回值的含义参看各 API 注释。

    方法变更

    变更详情功能模块变动前方法变动后方法说明
    将混音相关的类和接口按音效和音乐进行拆分,具体变动情况请参看混音相关的新旧接口对应表混音一般来说,对于短时间的音效(比如小于 20s),可以使用音效类;对于较长的音频或 PCM 数据,可以使用音乐类。
    行为变更音频管理等待超时后返回空列表,超时时间默认为 10 s
    行为变更视频管理enumerateVideoCaptureDevices等待超时后返回空列表,超时时间默认为 10 s

    类型变更

    变更详情类型变更前变更后说明
    参数变更ByteRTCRoomStats
    • tx_cellular_kbitrate
    • rx_cellular_kbitrate
    • txCellularKBitrate
    • rxCellularKBitrate

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

    接口分类接口用途
    废弃类/接口
    新类/接口(音效)
    新类/接口(音乐)
    备注
    获取实例获取播放器实例getAudioMixingManagergetAudioEffectManagergetMediaPlayer
    混音类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

    新增枚举值:

    • ByteRTCPublicStreamErrorCodePullNoPushStream = 1300

    名称变更:

    • ByteRTCPublicStreamErrorCodeParamError = 1191 更新为 ByteRTCPublicStreamErrorCodePushParamError = 1191

    • ByteRTCPublicStreamErrorCodeStatusError = 1192 更新为 ByteRTCPublicStreamErrorCodePushStatusError = 1192

    • ByteRTCPublicStreamErrorCodeInternalError = 1193 更新为 ByteRTCPublicStreamErrorCodePushInternalError = 1193

    ByteRTCErrorCode

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

    废弃枚举值 ByteRTCErrorCodeOverScreenPublishLimit=-1081, 用 ByteRTCErrorCodeOverStreamPublishLimit=-1080 代替。

    3.50

    产物变更

    该版本 SDK 产物新增 libAGFX.dyliblibbytenn.dylib 依赖库,需手动导入项目,具体添加方式参看添加依赖

    头文件变更

    原 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:: 当前设置为内部源时,且已开启了采集,调用该接口切换为外部源时,不会停止内部采集

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

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

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

    优化屏幕共享接口的行为

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

    音视频处理

    • (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
    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 传入 uidstreamIndex

    (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 传入 roomiduidstreamIndex

    名称和参数变更

    音视频传输

    (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。

    • 方法名称由 pushScreenFrame 变更为 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

    名称变更

    高级功能

    UpdateScreenCaptureMouseCursor

    updateScreenCaptureMouseCursor

    大驼峰变为小驼峰。

    SetVideoWatermarksetVideoWatermark
    音视频处理ClearVideoWatermarkclearVideoWatermark
    ClearVideoWatermarkclearVideoWatermark
    视频管理SetVideoEncoderConfigsetVideoEncoderConfig
    SetMaxVideoEncoderConfigsetMaxVideoEncoderConfig
    屏幕分享getScreenCaptureSourceThumbnailgetThumbnail
    房间管理joinRoomByTokenjoinRoom
    renewTokenupdateToken
    setRtcRoomDelegatesetRTCRoomDelegate修正大小写。
    引擎管理getSdkVersiongetSDKVersion修正大小写。
    安全与加密setEncryptTypesetEncryptInfo
    屏幕分享SetScreenVideoEncoderConfigsetScreenVideoEncoderConfig
    音频管理startPlaybackDeviceTeststartAudioPlaybackDeviceTest
    stopPlaybackDeviceTeststopAudioPlaybackDeviceTest

    删除

    自定义流处理

    删除:

    • (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;

    回调变更

    变更详情功能模块变动前回调变动后回调备注

    参数变更

    消息

    (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;

    名称变更房间管理onLeaveRoomWithStatsonLeaveRoom

    音视频传输

    connectionChangedToState

    onConnectionStateChanged

    networkTypeChangedToTypeonNetworkTypeChanged
    reportSysStatsonSysStats

    网络管理

    onPerformanceAlarmsWithMode

    onPerformanceAlarms

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

    删除

    音视频传输

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

    /

    删除回调类

    范围语音

    ByteRTCRangeAudioObserver 类和相关的接口

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

    类型变更

    变更详情数据类型备注
    取值范围拓展ByteRTCVideoCompositingRegion 中,widthheight取值范围由 (0.0, 1.0] 拓展为 [0.0, 1.0]
    枚举值增删ByteRTCAudioFrameMethod新增枚举值:ByteRTCAudioFrameProcessorEarMonitor = 3
    成员变量变更ByteRTCFaceDetectionResult新增成员变量:frameTimestamp
    ByteRTCVideoCanvas删除变量:roomIduid

    ByteRTCVideoFrame

    • extendedData 的类型由 ByteRTCFrameExtendedData 变为 NSData

    • 新增成员变量:supplementaryInfo

    ByteRTCLiveTranscoding新增成员变量:ByteRTCTranscodingClientMixParam
    变量类型变更空间音频功能中表示空间坐标的 position 的 变量 x, y, z 类型由 int 更改为 float提升球面立体声渲染效果。
    配置变更ByteRTCRoomProfile房间属性的默认值 ByteRTCRoomProfileCommunication = 0,对应的由 ByteRTCRoomProfileChatRoom = 6 变更为 ByteRTCRoomProfileMeeting = 16

    错误码变更

    变更详情错误码备注
    枚举值增删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
  • 3.45.2

    方法变更

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

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