如果你希望从此前版本的 macOS 客户端 SDK 升级到最新的客户端 SDK,请在工程文件中,替换最新的客户端 SDK 文件,并参考本文完成 API,回调,参数类型等的替换。
升级过程中,你可能需要参考历史版本文档归档。
本文同时记录升级时需要适配的变更和新版本提供的新增能力。标题中标注“按需使用”的内容,不使用对应能力时无需修改现有代码。SDK 回调或返回的枚举新增取值时,建议检查现有的 switch、白名单和兜底逻辑是否能够处理新值。
如果你的业务使用单流转推,并且会穷举处理 ByteRTCSingleStreamTaskErrorCode,升级后需要补充以下错误码;其他业务无需修改。
ByteRTCSingleStreamTaskErrorCode 新增以下枚举值:
| 枚举值 | 数值 | 说明 |
|---|---|---|
ByteRTCSingleStreamTaskErrorCodePushToCDN | 1098 | 转推到 CDN 失败。 |
ByteRTCSingleStreamTaskErrorCodeTaskCountOverLimit | 1099 | 超过单流转推任务数限制,单个主播同时运行的转推任务不能超过 20 个。 |
本版本以下内容均为新增能力。不使用直播模式切换、自定义视频前处理范围、关键帧间隔或 SEI 发送能力时,无需修改现有代码。
类型 | 说明 |
|---|---|
ByteRTCRoomLiveMode(新增枚举) | 新增枚举,定义直播模式,包含取值:
|
ByteRTCProcessorActionDomain(新增枚举) | 新增枚举,定义视频前处理作用范围,包含取值:
|
ByteRTCRoomConfig | 新增 |
ByteRTCVideoPreprocessorConfig | 新增 |
ByteRTCVideoEncoderConfig | 新增 |
接口 | 说明 |
|---|---|
| 设置房间直播模式,加入房间后调用。 |
| 以 Key-Value JSON 格式发送 SEI 数据,需先设为单人直播模式。 |
仅 AI 音视频互动方案中使用 License 计费的业务需要关注该回调,并建议按下表说明处理。其他业务无需适配。
回调 | 说明 |
|---|---|
onLicenseQuotaExceeded | AI 音视频互动方案使用 License 计费时,License 配额用尽后,SDK 会触发此回调并中止服务。收到回调后,请及时续费并离开房间、销毁 SDK;续费成功后,再重新加入房间。 |
变更类型 | V3.58 | V3.60 |
|---|---|---|
头文件名称变更 | ../ByteRTCVideo.h | ../ByteRTCEngine.h |
基础类名变更(所有模块) | ByteRTCVideo | ByteRTCEngine |
基础类名变更(所有模块) | ByteRTCVideoDelegate | ByteRTCEngineDelegate |
新增加头文件 | 无 | ../ByteRTCRTSRoom.h |
功能 | V3.58 | V3.60 | 变更说明 |
|---|---|---|---|
创建引擎对象 | createRTCVideo:(NSString * _Nonnull)appId delegate:(id_Nullable)delegate parameters:(NSDictionary * _Nonnull)parameters; | createRTCEngine:(ByteRTCEngineConfig * _Nonnull) config delegate:(id_Nullable)delegate |
|
销毁引擎 | destroyRTCVideo | destroyRTCEngine | 方法名称变更 |
引擎事件回调 | ByteRTCVideoDelegate | ByteRTCEngineDelegate | 协议名称变更 |
功能 | V3.58 | V3.60 | 变更说明 |
|---|---|---|---|
加入房间 | joinRoom:(NSString *_Nullable)token userInfo:(ByteRTCUserInfo *_Nonnull)userInfo roomConfig:(ByteRTCRoomConfig *Nonnull)roomConfig NS_SWIFT_NAME(joinRoom(:userInfo:roomConfig:)); | joinRoom:(NSString *_Nullable)token userInfo:(ByteRTCUserInfo *_Nonnull)userInfo userVisibility:(BOOL)userVisibility roomConfig:(ByteRTCRoomConfig *Nonnull)roomConfig NS_SWIFT_NAME(joinRoom(:userInfo:userVisibility:roomConfig:)); |
|
创建房间实例 | createRTCRoom:(NSString * _Nonnull)roomId | createRTCRoom:(NSString * _Nonnull)roomId | 行为变更: |
创建房间失败回调 | rtcEngine:onCreateRoomStateChanged:errorCode: | rtcRoom:onRoomStateChanged:withUid:state:extraInfo: | 接口替换: |
设置房间附加信息结果的回调 | onSetRoomExtraInfoResult:(NSInteger)taskId error:(ByteRTCSetRoomExtraInfoResult)error; | onSetRoomExtraInfoResult:(NSInteger)taskId result:(ByteRTCSetRoomExtraInfoResult)result; | 参数变更: |
远端可见用户加入房间,或房内不可见用户切换为可见的回调 | onUserJoined:(ByteRTCUserInfo *_Nonnull)userInfo elapsed:(NSInteger)elapsed; | onUserJoined:(ByteRTCUserInfo*_Nonnull)userInfo; | 参数变更:删除无效参数 |
发布和订阅 Simulcast 流
变更类型 | V3.58 | V3.60 | 说明 |
|---|---|---|---|
开启/关闭推送多路视频流 | enableSimulcastMode:(BOOL) enabled | setLocalSimulcastMode:(ByteRTCVideoSimulcastMode)mode |
|
设置期望订阅的远端视频流的参数 | setRemoteVideoConfig:(NSString * _Nonnull) userId remoteVideoConfig:(ByteRTCRemoteVideoConfig *_Nonnull) remoteVideoConfig | setRemoteSimulcastStreamType:(NSString * _Nonnull) streamId streamType:(ByteRTCVideoSimulcastStreamType)streamType |
|
设置或更新 Simulcast 流的编码参数 | setVideoEncoderConfig:(NSArray <ByteRTCVideoEncoderConfig *> * _Nullable) encoderConfigs | setLocalSimulcastMode:(ByteRTCVideoSimulcastMode)mode config:(NSArray <ByteRTCVideoEncoderConfig *> * _Nullable)streamConfig |
|
| setMaxVideoEncoderConfig:(ByteRTCVideoEncoderConfig * _Nullable) max_solution; | setVideoEncoderConfig:(ByteRTCVideoEncoderConfig * _Nullable) encoderConfig; |
|
功能 | V3.58 | V3.60 | 详情 |
|---|---|---|---|
| |||
API:
|
|
|
|
音视频流发布状态改变回调 |
|
|
|
音视频流发布状态触发警告或错误时回调 | rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onStreamStateChanged:(NSString *_Nonnull)roomId withUid:(nonnull NSString *)uid state:(NSInteger)state extraInfo:(NSString *_Nonnull)extraInfo; |
|
|
| |||
|
|
|
|
音视频流订阅状态改变回调 | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onStreamSubscribed:(ByteRTCSubscribeState)state userId:(NSString *_Nonnull)userId subscribeConfig:(ByteRTCSubscribeConfig *_Nonnull)info |
|
|
音视频流订阅状态改变回调 | rtcRoom:(ByteRTCRoom *_Nonnull)rtcRoom onStreamStateChanged:(NSString *_Nonnull)roomId withUid:(nonnull NSString *)uid state:(NSInteger)state extraInfo:(NSString *_Nonnull)extraInfo; |
|
|
| |||
|
|
|
|
暂停接收来自远端的媒体流 | pauseAllSubscribedStream:(ByteRTCPauseResumControlMediaType) mediaType |
|
|
恢复接收来自远端的媒体流 | resumeAllSubscribedStream:(ByteRTCPauseResumControlMediaType) mediaType |
|
|
功能 | V3.58 | V3.60 | 变更说明 |
|---|---|---|---|
采集屏幕视频 | startScreenVideoCapture:(ByteRTCScreenCaptureSourceInfo _Nonnull)sourceInfo captureParameters:(ByteRTCScreenCaptureParam **Nonnull)captureParameters NS_SWIFT_NAME(startScreenVideoCapture(:captureParameters:)) | startScreenVideoCapture:(ByteRTCScreenCaptureSourceInfo _Nonnull)sourceInfo captureParameters:(ByteRTCScreenCaptureParam **Nonnull)captureParameters NS_SWIFT_NAME(startScreenVideoCapture(:captureParameters:)) | 行为变更: |
设置屏幕流编码参数 | setScreenVideoEncoderConfig:(ByteRTCScreenVideoEncoderConfig * _Nullable) encoderConfig | setVideoEncoderConfig:(ByteRTCVideoEncoderConfig * _Nullable) encoderConfig | 接口替换: |
发布/停止发布本地屏幕音视频流 | publishScreen:(ByteRTCMediaStreamType)type | publishStreamVideo:(BOOL)publish | 接口替换: |
订阅/取消订阅远端屏幕音视频流 | subscribeScreen:(NSString *_Nonnull)userId mediaStreamType:(ByteRTCMediaStreamType)mediaStreamType | subscribeStreamVideo:(NSString *_Nonnull)streamId subscribe:(BOOL)subscribe | 接口替换: |
远端用户发布或者取消发布屏幕流回调 | rtcRoom:( ByteRTCRoom * _Nonnull)rtcRoom onUserPublishScreen:(NSString *_Nonnull)userId type:(ByteRTCMediaStreamType)type | rtcRoom:(ByteRTCRoom* _Nonnull)rtcRoom onUserPublishStreamVideo:(NSString* _Nonnull)streamId info:(ByteRTCStreamInfo* _Nonnull)info isPublish:(BOOL)isPublish; | 接口替换: |
屏幕共享流的视频首帧发送状态回调 | rtcEngine:(ByteRTCVideo *_Nonnull)engine onScreenVideoFrameSendStateChanged:(NSString * _Nonnull)roomId rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state; | rtcEngine:(ByteRTCEngine _Nonnull)engine onVideoFrameSendStateChanged:(NSString * _Nonnull)streamId info:(ByteRTCStreamInfo _Nonnull)info rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state | 接口替换: |
屏幕共享流视频首帧播放状态回调 | rtcEngine:(ByteRTCVideo *_Nonnull)engine onScreenVideoFramePlayStateChanged:(NSString * _Nonnull)roomId rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state; | rtcEngine:(ByteRTCEngine _Nonnull)engine onVideoFramePlayStateChanged:(NSString * _Nonnull)streamId info:(ByteRTCStreamInfo _Nonnull)info rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state | 接口替换: |
RTC包含RTS能力,当前版本将RTS相关接口进一步进行拆分。如果仅使用RTS的相关能力则调用createRTSRoom创建RTSRoom实例,使用ByteRTCRTSRoomDelegate回调。如果既使用音视频能力又使用RTS能力则从RTCEngine中调用createRTCRoom创建RTCRoom实例,使用ByteRTCRoomDelegate回调。
功能 | v3.58 | v3.60 | 变更说明 |
|---|---|---|---|
创建RTS房间 | createRTCRoom:(NSString * _Nonnull)roomId; | createRTSRoom:(NSString * _Nonnull)roomId; | 接口拆分:仅使用RTS的相关能力则调用createRTSRoom创建RTSRoom实例 |
设置RTS相关回调 | setRTCRoomDelegate:(id_Nullable)roomDelegate; | setRTSRoomDelegate:(id_Nullable)roomDelegate; | 接口拆分:仅使用RTS的相关能力则在RTSRoom中的此接口设置回调 |
收到房间外用户 发来的二进制消息时,会收到此回调 | rtcEngine:(ByteRTCEngine * _Nonnull)engine onUserBinaryMessageReceivedOutsideRoom:(NSString * _Nonnull)uid message:(NSData * _Nonnull)message | rtcEngine:(ByteRTCEngine * _Nonnull)engine onUserBinaryMessageReceivedOutsideRoom:(NSInteger)msgid uid:(NSString * _Nonnull)uid message:(NSData * _Nonnull)message | 参数变更:回调参数增加msgid参数 |
接收到房间内广播消息的回调 | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onRoomMessageReceived:(NSString *_Nonnull)uid message:(NSString *_Nonnull)message | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onRoomMessageReceived:(NSInteger)msgid uid:(NSString *_Nonnull)uid message:(NSString *_Nonnull)message | 参数变更:回调参数增加msgid参数 |
收到房间内广播二进制消息的回调 | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onRoomBinaryMessageReceived:(NSString *_Nonnull)uid message:(NSData *_Nonnull)message | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onRoomBinaryMessageReceived:(NSInteger)msgid uid:(NSString *_Nonnull)uid message:(NSData *_Nonnull)message | 参数变更:回调参数增加msgid参数 |
收到来自房间中其他用户发来的点对点文本消息时,会收到此回调 | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onUserMessageReceived:(NSString *_Nonnull)uid message:(NSString *_Nonnull)message | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onUserMessageReceived:(NSInteger)msgid uid:(NSString *_Nonnull)uid message:(NSString *_Nonnull)message | 参数变更:回调参数增加msgid参数 |
收到来自房间中其他用户发来的点对点二进制消息时,会收到此回调 | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onUserBinaryMessageReceived:(NSString *_Nonnull)uid message:(NSData *_Nonnull)message | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onUserBinaryMessageReceived:(NSInteger)msgid uid:(NSString *_Nonnull)uid message:(NSData *_Nonnull)message | 参数变更:回调参数增加msgid参数 |
功能 | v3.58 | v3.60 | 变更说明 |
|---|---|---|---|
接收到房间内广播消息的回调 | rtsRoom:(ByteRTCRTSRoom * _Nonnull)rtsRoom onRoomMessageReceived:(NSString * _Nonnull)uid message:(NSString * _Nonnull)message; | rtsRoom:( ByteRTCRTSRoom *_Nonnull)rtsRoom onRoomMessageReceived:(NSInteger)msgid uid:(NSString *_Nonnull)uid message:(NSString *_Nonnull)message; | 参数变更:回调参数增加msgid参数 |
收到房间内广播二进制消息的回调 | rtsRoom:(ByteRTCRTSRoom * _Nonnull)rtsRoom onRoomBinaryMessageReceived:(NSString * _Nonnull)uid message:(NSData * _Nonnull)message; | rtsRoom:( ByteRTCRTSRoom *_Nonnull)rtsRoom onRoomBinaryMessageReceived:(NSInteger)msgid uid:(NSString *_Nonnull)uid message:(NSData *_Nonnull)message; | 参数变更:回调参数增加msgid参数 |
收到来自房间中其他用户发来的点对点文本消息时,会收到此回调 | rtsRoom:( ByteRTCRTSRoom *_Nonnull)rtsRoom onUserMessageReceived:(NSString *_Nonnull)uid message:(NSString *_Nonnull)message; | rtsRoom:( ByteRTCRTSRoom *_Nonnull)rtsRoom onUserMessageReceived:(NSInteger)msgid uid:(NSString *_Nonnull)uid message:(NSString *_Nonnull)message; | 参数变更:回调参数增加msgid参数 |
收到来自房间中其他用户发来的点对点二进制消息时,会收到此回调 | rtsRoom:( ByteRTCRTSRoom *_Nonnull)rtsRoom onUserBinaryMessageReceived:(NSString *_Nonnull)uid message:(NSData *_Nonnull)message; | rtsRoom:( ByteRTCRTSRoom *_Nonnull)rtsRoom onUserBinaryMessageReceived:(NSInteger)msgid uid:(NSString *_Nonnull)uid message:(NSData *_Nonnull)message; | 参数变更:回调参数增加msgid参数 |
ByteRTCWTNStream 类中。ByteRTCWTNStreamDelegate 回调类中。你需要先调用 setWTNStreamDelegate: 设置回调手柄。功能 | V3.58 | V3.60 | 变更说明 |
|---|---|---|---|
发布 WTN 流 | startPushPublicStream:(NSString * _Nonnull)publicStreamId withLayout:(ByteRTCPublicStreaming *_Nullable)publicStream | startPushMixedStream:(NSString * _Nonnull)taskId withPushTargetConfig:(ByteRTCMixedStreamPushTargetConfig*)pushTargetConfig withMixedConfig:(ByteRTCMixedStreamConfig *_Nullable)config |
|
更新 WTN 流 | updatePublicStreamParam:(NSString * _Nonnull)publicStreamId withLayout:(ByteRTCPublicStreaming *_Nullable)publicStream | updatePushMixedStream:(NSString _Nonnull)taskId withPushTargetConfig:(ByteRTCMixedStreamPushTargetConfig)pushTargetConfig withMixedConfig:(ByteRTCMixedStreamConfig *_Nonnull)config |
|
停止发布 WTN 流 | stopPushPublicStream:(NSString * _Nonnull)publicStreamId; | stopPushMixedStream:(NSString *_Nonnull)taskId withPushTargetType:(ByteRTCMixedStreamPushTargetType)pushTargetType |
|
|
|
|
|
绑定 WTN 流画布 | setPublicStreamVideoCanvas:(NSString *_Nonnull)publicStreamId withCanvas:(ByteRTCVideoCanvas * Nullable)canvas NS_SWIFT_NAME(setPublicStreamVideoCanvas(:withCanvas:)) | setWTNRemoteVideoCanvas:(NSString *_Nonnull)streamId withCanvas:(ByteRTCVideoCanvas * Nullable)canvas NS_SWIFT_NAME(setWTNRemoteVideoCanvas(:withCanvas:)) |
|
为 WTN 流指定外部渲染器 | setPublicStreamVideoSink:(NSString *_Nonnull)publicStreamId withSink:(id_Nullable)videoSink withPixelFormat:(ByteRTCVideoSinkPixelFormat)requiredFormat NS_SWIFT_NAME(setPublicStreamVideoSink(:withSink:withPixelFormat:)) | setWTNRemoteVideoSink:(NSString _Nonnull)streamId withSink:(id_Nullable)videoSink withConfig:(ByteRTCRemoteVideoSinkConfig)config NS_SWIFT_NAME(setWTNRemoteVideoSink(_:withSink:withConfig:)) |
|
调节 WTN 流播放音量 | setPublicStreamAudioPlaybackVolume:(NSString *_Nonnull)publicStreamId volume:(NSInteger)volume | setWTNRemoteAudioPlaybackVolume:(NSString *_Nonnull)streamId volume:(NSInteger)volume |
|
WTN 流任务回调 | rtcEngine:(ByteRTCVideo *_Nonnull)engine onPushPublicStreamResult:(NSString *_Nonnull)roomId publicStreamId:(NSString *_Nonnull)streamId errorCode:(ByteRTCPublicStreamErrorCode)errorCode | rtcEngine:(ByteRTCEngine * _Nonnull)engine onMixedStreamEvent:(ByteRTCMixedStreamTaskEvent)event withMixedStreamInfo:(ByteRTCMixedStreamTaskInfo*)info withErrorCode:(ByteRTCMixedStreamTaskErrorCode)errorCode |
|
播放 WTN 流任务回调 | rtcEngine:(ByteRTCVideo *_Nonnull)engine onPlayPublicStreamResult:(NSString *_Nonnull)publicStreamId errorCode:(ByteRTCPublicStreamErrorCode)errorCode |
|
|
接收 WTN 流中的 SEI 回调 | rtcEngine:(ByteRTCVideo * _Nonnull)engine onPublicStreamSEIMessageReceived:(NSString* _Nonnull)publicStreamId andMessage:(NSData* _Nonnull)message andSourceType:(ByteRTCDataMessageSourceType)sourceType | onWTNSEIMessageReceived:(NSString* _Nonnull)streamId andChannelId:(int)channelId andMessage:(NSData* _Nonnull)message |
|
接收 WTN 流中的 Data Message 回调 | rtcEngine:(ByteRTCVideo * _Nonnull)engine onPublicStreamDataMessageReceived:(NSString* _Nonnull)publicStreamId andMessage:(NSData* _Nonnull)message andSourceType:(ByteRTCDataMessageSourceType)sourceType | onWTNDataMessageReceived:(NSString* _Nonnull)streamId andMessage:(NSData* _Nonnull)message andSourceType:(ByteRTCDataMessageSourceType)sourceType |
|
WTN 视频流首帧解码成功回调 | rtcEngine:(ByteRTCVideo * _Nonnull)engine onFirstPublicStreamVideoFrameDecoded:(NSString * _Nonnull)publicStreamId withFrameInfo:(ByteRTCVideoFrameInfo * Nonnull)frameInfo NS_SWIFT_NAME(rtcEngine(:onFirstPublicStreamVideoFrameDecoded:withFrameInfo:)) | onWTNFirstRemoteVideoFrameDecoded:(NSString * _Nonnull)streamId withFrameInfo:(ByteRTCVideoFrameInfo * _Nonnull)frameInfo NS_SWIFT_NAME(onWTNFirstRemoteVideoFrameDecoded(streamId:withFrameInfo:)) |
|
WTN 音频流首帧解码成功回调 | rtcEngine:(ByteRTCVideo * _Nonnull)engine onFirstPublicStreamAudioFrame:(NSString * _Nonnull)publicStreamId | onWTNFirstRemoteAudioFrame:(NSString * _Nonnull)streamId |
|
优化了转推直播接口的易用性。与 WTN 接口共用 MixedStreamConfig,提升易用性。如果你已经实现了转推直播功能,参考以下表格对接口进行替换。
功能 | V3.58 | V3.60 | 变更说明 |
|---|---|---|---|
合流转推 | startPushMixedStreamToCDN:(NSString * _Nonnull)taskID mixedConfig:(ByteRTCMixedStreamConfig *_Nullable)config observer:(id_Nullable)observer | startPushMixedStream:(NSString * _Nonnull)taskId withPushTargetConfig:(ByteRTCMixedStreamPushTargetConfig*)pushTargetConfig withMixedConfig:(ByteRTCMixedStreamConfig *_Nullable)config |
|
更新合流转推任务 | updatePushMixedStreamToCDN:(NSString *_Nonnull)taskID mixedConfig:(ByteRTCMixedStreamConfig *_Nonnull)config | updatePushMixedStream:(NSString _Nonnull)taskId withPushTargetConfig:(ByteRTCMixedStreamPushTargetConfig)pushTargetConfig withMixedConfig:(ByteRTCMixedStreamConfig *_Nonnull)config |
|
单流转推 | startPushSingleStreamToCDN:(NSString *_Nonnull)taskID singleStream:(ByteRTCPushSingleStreamParam *_Nonnull)singleStream observer:(idNullable)observer NS_SWIFT_NAME(startPushSingleStreamToCDN(:singleStream:observer:)) | startPushSingleStream:(NSString *_Nonnull)taskId singleStream:(ByteRTCPushSingleStreamParam *_Nonnull)singleStream |
|
停止转推任务 | stopPushStreamToCDN:(NSString *Nonnull)taskID NS_SWIFT_NAME(stopPushStreamToCDN(:)) |
|
|
转推任务回调 | onMixingEvent:(ByteRTCStreamMixingEvent)event taskId:(NSString *_Nonnull)taskId error:(ByteRTCStreamMixingErrorCode)errorCode mixType:(ByteRTCMixedStreamType)mixType |
|
|
功能 | 接口名 | 变更说明 |
|---|---|---|
接收到来自远端某音频流的第一帧时回调 | rtcEngine:onFirstRemoteAudioFrame:info: | 参数变化: |
|
| 参数变化: |
将外部音频参考帧推到sdk内 | pushReferenceAudioPCMData:(ByteRTCAudioFrame * _Nonnull) audioFrame; | 新增API:自定义音频回声消除参考信号 |
功能 | V3.58 | V3.60 | 变更说明 |
|---|---|---|---|
音视频同步状态发生改变回调 | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onAVSyncStateChange:(ByteRTCAVSyncState)state | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onAVSyncEvent:(NSString *_Nonnull)roomId userId:(NSString *_Nonnull)userId eventCode:(ByteRTCAVSyncEvent)eventCode | 音画同步功能开启后,将通过本回调通知同步结果。新回调中新增了 roomId 和 userId。同时,同步状态 AVSyncState 被替换为同步失败事件 ByteRTCAVSyncEvent,你可以在收到该通知时,调用 setMultiDeviceAVSync: 传入空参数解绑同步关系,并再次调用该接口进行绑定。
|
功能 | V3.58 | V3.60 | 变更说明 |
|---|---|---|---|
调节指定远端用户的音频流在本地设备上的播放音量 | setRemoteAudioPlaybackVolume:(NSString *_Nonnull)roomID remoteUid:(NSString *_Nonnull)userID playVolume:(NSInteger)volume | setRemoteAudioPlaybackVolume:(NSString* _Nonnull)streamId volume:(int)volume |
|
强制切换当前的音频播放路由 | setAudioRoute: | setAudioRoute: | 限制发生变化: |
设置音频场景类型 | setAudioScenario: | setAudioScenario: | 音频设备使用的音量模式发生了变更,参看媒体音量和通话音量:
|
V3.58 | V3.60 | 变更说明 |
|---|---|---|
pushExternalVideoFrame:(ByteRTCVideoFrame * _Nonnull)frame | pushExternalVideoFrame:(ByteRTCVideoFrameData * _Nonnull)frame | 参数 |
V3.58 | V3.60 | 变更说明 |
|---|---|---|
getHotMusic:(ByteRTCMusicHotType)hotType filterType:(ByteRTCMusicFilterType)filterType | getHotMusic:(NSArray <NSString *> *_Nullable)customHotlistId filterType:(ByteRTCMusicFilterType)filterType | 参数替换:移除
|
当前版本使用 StreamId 唯一标识一路流,因此各个API中以前版本的 StreamIndex / RemoteStreamKey 参数被 StreamId 或相关信息替换,涉及到API如下:
所属类 | v3.58 | v3.60 | 变更说明 |
|---|---|---|---|
ByteRTCEngine | muteAudioCapture:(ByteRTCStreamIndex)index mute:(bool)mute | muteAudioCapture: (bool)mute | 参数变化: 删除StreamIndex参数 |
ByteRTCEngine | setCaptureVolume:(ByteRTCStreamIndex)index volume:(int)volume | setCaptureVolume: (int)volume | 参数变化: 删除StreamIndex参数 |
ByteRTCEngine | setLocalVideoCanvas:(ByteRTCStreamIndex)streamIndex withCanvas:(ByteRTCVideoCanvas * Nullable)canvas NS_SWIFT_NAME(setLocalVideoCanvas(:withCanvas:)) | setLocalVideoCanvas:(ByteRTCVideoCanvas * _Nullable)canvas NS_SWIFT_NAME(setLocalVideoCanvas(withCanvas:)) | 参数变化: 删除StreamIndex参数 |
ByteRTCEngine | updateLocalVideoCanvas:(ByteRTCStreamIndex)streamIndex withRenderMode:(ByteRTCRenderMode)renderMode withBackgroundColor:(NSUInteger)backgroundColor NS_SWIFT_NAME(updateLocalVideoCanvas(_:withRenderMode:withBackgroundColor:)) | updateLocalVideoCanvas:(ByteRTCRenderMode)renderMode withBackgroundColor:(NSUInteger)backgroundColor NS_SWIFT_NAME(updateLocalVideoCanvas(withBackgroundColor:)) | 参数变化: 删除StreamIndex参数 |
ByteRTCEngine | setRemoteVideoCanvas:(ByteRTCRemoteStreamKey * _Nonnull)key withCanvas:(ByteRTCVideoCanvas * Nullable)canvas NS_SWIFT_NAME(setRemoteVideoCanvas(:withCanvas:)) | setRemoteVideoCanvas:(NSString* _Nonnull)streamId withCanvas:(ByteRTCVideoCanvas * Nullable)canvas NS_SWIFT_NAME(setRemoteVideoCanvas(:withCanvas:)) | 参数变化: 将RemoteStreamKey变为streamId |
ByteRTCEngine | updateRemoteStreamVideoCanvas:(ByteRTCRemoteStreamKey * _Nonnull)key withRemoteVideoRenderConfig:(ByteRTCRemoteVideoRenderConfig * Nonnull)remoteVideoRenderConfig NS_SWIFT_NAME(updateRemoteStreamVideoCanvas(:withRemoteVideoRenderConfig:)); | updateRemoteStreamVideoCanvas:(NSString* _Nonnull)streamId withRemoteVideoRenderConfig:(ByteRTCRemoteVideoRenderConfig * Nonnull)remoteVideoRenderConfig NS_SWIFT_NAME(updateRemoteStreamVideoCanvas(:withRemoteVideoRenderConfig:)); | 参数变化: 将RemoteStreamKey变为streamId |
ByteRTCEngine | setRemoteVideoSink:(ByteRTCRemoteStreamKey* _Nonnull)streamKey withSink:(idNullable)videoSink withRemoteRenderConfig:(ByteRTCRemoteVideoSinkConfig)config NS_SWIFT_NAME(setRemoteVideoSink(*:withSink:withRemoteRenderConfig:)); | setRemoteVideoSink:(NSString* _Nonnull)streamId withSink:(idNullable)videoSink withRemoteRenderConfig:(ByteRTCRemoteVideoSinkConfig)config NS_SWIFT_NAME(setRemoteVideoSink(*:withSink:withRemoteRenderConfig:)); | 参数变化: 将RemoteStreamKey变为streamId |
ByteRTCEngine | setVideoSourceType:(ByteRTCVideoSourceType)type WithStreamIndex:(ByteRTCStreamIndex)streamIndex NS_SWIFT_NAME(setVideoSourceType(_:WithStreamIndex:)) | setVideoSourceType:(ByteRTCVideoSourceType)type NS_SWIFT_NAME(setVideoSourceType(_:)) | 参数变化: 删除StreamIndex参数 |
ByteRTCEngine | setRemoteVideoMirrorType:(ByteRTCRemoteStreamKey*)key withMirrorType:(ByteRTCRemoteMirrorType)mirrorType | setRemoteVideoMirrorType:(NSString* _Nonnull)streamId withMirrorType:(ByteRTCRemoteMirrorType)mirrorType | 参数变化: 将RemoteStreamKey变为streamId |
ByteRTCEngine | sendSEIMessage:(ByteRTCStreamIndex)streamIndex andMessage:(NSData* _Nonnull)message andRepeatCount:(int)repeatCount andCountPerFrame:(ByteRTCSEICountPerFrame) mode | sendSEIMessage: (NSData* _Nonnull)message andRepeatCount:(int)repeatCount andCountPerFrame:(ByteRTCSEICountPerFrame) mode | 参数变化: 删除StreamIndex参数 |
ByteRTCEngine | startFileRecording:(ByteRTCStreamIndex)streamIndex withRecordingConfig:(ByteRTCRecordingConfig* Nonnull)recordingConfig type:(ByteRTCRecordingType)recordingType NS_SWIFT_NAME(startFileRecording(:withRecordingConfig:type:)) | startFileRecording: (ByteRTCRecordingConfig* _Nonnull)recordingConfig type:(ByteRTCRecordingType)recordingType NS_SWIFT_NAME(startFileRecording(withRecordingConfig:type:)) | 参数变化: 删除StreamIndex参数 |
ByteRTCEngine | stopFileRecording:(ByteRTCStreamIndex)streamIndex | stopFileRecording | 参数变化: 删除StreamIndex参数 |
ByteRTCEngine | setRemoteAudioPlaybackVolume:(ByteRTCRemoteStreamKey* _Nonnull)streamKey volume:(int)volume; | setRemoteAudioPlaybackVolume:(NSString* _Nonnull)streamId volume:(int)volume | 参数变化: 将RemoteStreamKey变为streamId |
ByteRTCEngine | pushExternalEncodedVideoFrame:(ByteRTCStreamIndex)streamIndex withVideoIndex:(NSInteger)videoIndex withEncodedVideoFrame:(ByteRTCEncodedVideoFrame* Nonnull)videoFrame NS_SWIFT_NAME(pushExternalEncodedVideoFrame(:withVideoIndex:withEncodedVideoFrame:)) | pushExternalEncodedVideoFrame: (NSInteger)videoIndex withEncodedVideoFrame:(ByteRTCEncodedVideoFrame* _Nonnull)videoFrame NS_SWIFT_NAME(pushExternalEncodedVideoFrame(withVideoIndex:withEncodedVideoFrame:)) | 参数变化: 将StreamIndex变为videoIndex |
ByteRTCEngine | setVideoDecoderConfig:(ByteRTCRemoteStreamKey * Nonnull)key withVideoDecoderConfig:(ByteRTCVideoDecoderConfig)config NS_SWIFT_NAME(setVideoDecoderConfig(:withVideoDecoderConfig:)) | setVideoDecoderConfig:(NSString* Nonnull)streamId withVideoDecoderConfig:(ByteRTCVideoDecoderConfig)config NS_SWIFT_NAME(setVideoDecoderConfig(:withVideoDecoderConfig:)) | 参数变化: 将RemoteStreamKey变为streamId |
ByteRTCEngine | requestRemoteVideoKeyFrame:(ByteRTCRemoteStreamKey * _Nonnull)key | requestRemoteVideoKeyFrame:(NSString* _Nonnull)streamId | 参数变化: 将RemoteStreamKey变为streamId |
ByteRTCEngine | setVideoWatermark:(ByteRTCStreamIndex)streamIndex withImagePath:(NSString * _Nullable)imagePath withRtcWatermarkConfig:(ByteRTCVideoWatermarkConfig* _Nonnull)rtcWatermarkConfig | setVideoWatermark: (NSString * _Nullable)imagePath withRtcWatermarkConfig:(ByteRTCVideoWatermarkConfig* _Nonnull)rtcWatermarkConfig | 参数变化: 删除StreamIndex参数 |
ByteRTCEngine | clearVideoWatermark:(ByteRTCStreamIndex)streamIndex NS_SWIFT_NAME(clearVideoWatermark(_:)) | clearVideoWatermark | 参数变化: 删除StreamIndex参数 |
ByteRTCEngine | takeLocalSnapshot:(ByteRTCStreamIndex)streamIndex callback:(id_Nullable)callback | takeLocalSnapshot:(id_Nullable)callback | 参数变化: 删除StreamIndex参数 |
ByteRTCEngine | takeRemoteSnapshot:(ByteRTCRemoteStreamKey* _Nonnull)streamKey callback:(id_Nullable)callback | takeRemoteSnapshot:(NSString* _Nonnull)streamId callback:(id_Nullable)callback | 参数变化: 将RemoteStreamKey变为streamId |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine * _Nonnull)engine onUserStartVideoCapture:(NSString * _Nonnull)roomId uid:(NSString * _Nonnull)uid | rtcEngine:(ByteRTCEngine * _Nonnull)engine onUserStartVideoCapture:(NSString* _Nonnull)streamId info:(ByteRTCStreamInfo* _Nonnull)info | 参数变化: 将roomId和userId改为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine * _Nonnull)engine onUserStopVideoCapture:(NSString * _Nonnull)roomId uid:(NSString * _Nonnull)uid | rtcEngine:(ByteRTCEngine * _Nonnull)engine onUserStopVideoCapture:(NSString * _Nonnull)streamId info:(ByteRTCStreamInfo* _Nonnull)info | 参数变化: 将roomId和userId改为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine * _Nonnull)engine onUserStartAudioCapture:(NSString* _Nonnull)roomId uid:(NSString *_Nonnull)userId | rtcEngine:(ByteRTCEngine * _Nonnull)engine onUserStartAudioCapture:(NSString* _Nonnull)streamId info:(ByteRTCStreamInfo* _Nonnull)info | 参数变化: 将roomId和userId改为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine * _Nonnull)engine onUserStopAudioCapture:(NSString* _Nonnull)roomId uid:(NSString *_Nonnull)userId | rtcEngine:(ByteRTCEngine * _Nonnull)engine onUserStopAudioCapture:(NSString* _Nonnull)streamId info:(ByteRTCStreamInfo* _Nonnull)info· | 参数变化: 将roomId和userId改为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine *_Nonnull)engine onLocalAudioStateChanged:(ByteRTCLocalAudioStreamState)state error:(ByteRTCLocalAudioStreamError)error | rtcEngine:(ByteRTCEngine *_Nonnull)engine onLocalAudioStateChanged:(NSString *_Nonnull)streamId info:(ByteRTCStreamInfo *_Nonnull)info state:(ByteRTCLocalAudioStreamState)state error:(ByteRTCLocalAudioStreamError)error | 参数变化: 添加streamId和streamInfo参数 |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine **Nonnull)engine onLocalVideoStateChanged:(ByteRTCStreamIndex)streamIndex withStreamState:(ByteRTCLocalVideoStreamState)state withStreamError:(ByteRTCLocalVideoStreamError)error NS_SWIFT_NAME(rtcEngine(*:onLocalVideoStateChanged:withStreamState:withStreamError:)) | rtcEngine:(ByteRTCEngine *_Nonnull)engine onLocalVideoStateChanged:(NSString _Nonnull)streamId info:(ByteRTCStreamInfo **Nonnull)info withStreamState:(ByteRTCLocalVideoStreamState)state withStreamError:(ByteRTCLocalVideoStreamError)error NS_SWIFT_NAME(rtcEngine(:onLocalVideoStateChanged:info:withStreamState:withStreamError:)) | 参数变化: 将streamIndex变为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine *_Nonnull)engine onRemoteAudioStateChanged:(ByteRTCRemoteStreamKey * _Nonnull)key state:(ByteRTCRemoteAudioState)state reason:(ByteRTCRemoteAudioStateChangeReason)reason | rtcEngine:(ByteRTCEngine *_Nonnull)engine onRemoteAudioStateChanged:(NSString *_Nonnull)streamId info:(ByteRTCStreamInfo *_Nonnull)info state:(ByteRTCRemoteAudioState)state reason:(ByteRTCRemoteAudioStateChangeReason)reason | 参数变化: 将RemoteStreamKey变为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine _Nonnull)engine onRemoteVideoStateChanged:(ByteRTCRemoteStreamKeyNonnull)streamKey withVideoState:(ByteRTCRemoteVideoState)state withVideoStateReason:(ByteRTCRemoteVideoStateChangeReason)reason NS_SWIFT_NAME(rtcEngine(:onRemoteVideoStateChanged:withVideoState:withVideoStateReason:)) | rtcEngine:(ByteRTCEngine *_Nonnull)engine onRemoteVideoStateChanged:(NSString _Nonnull)streamId info:(ByteRTCStreamInfo **Nonnull)info withVideoState:(ByteRTCRemoteVideoState)state withVideoStateReason:(ByteRTCRemoteVideoStateChangeReason)reason NS_SWIFT_NAME(rtcEngine(:onRemoteVideoStateChanged:withVideoState:withVideoStateReason:)) | 参数变化: 将RemoteStreamKey变为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine * _Nonnull)engine onFirstLocalVideoFrameCaptured:(ByteRTCStreamIndex)streamIndex withFrameInfo:(ByteRTCVideoFrameInfo * Nonnull)frameInfo NS_SWIFT_NAME(rtcEngine(:onFirstLocalVideoFrameCaptured:withFrameInfo:)) | rtcEngine:(ByteRTCEngine * _Nonnull)engine onFirstLocalVideoFrameCaptured:(ByteRTCVideoSource* _Nullable)videoSource withFrameInfo:(ByteRTCVideoFrameInfo * Nonnull)frameInfo NS_SWIFT_NAME(rtcEngine(:onFirstLocalVideoFrameCaptured:withFrameInfo:)) | 参数变化: 将streamIndex变为VideoSource |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine _Nonnull)engine onLocalVideoSizeChanged:(ByteRTCStreamIndex)streamIndex withFrameInfo:(ByteRTCVideoFrameInfo **Nonnull)frameInfo NS_SWIFT_NAME(rtcEngine(:onLocalVideoSizeChanged:withFrameInfo:)) | rtcEngine:(ByteRTCEngine *_Nonnull)engine onLocalVideoSizeChanged:(ByteRTCVideoSource _Nullable)videoSource withFrameInfo:(ByteRTCVideoFrameInfo **Nonnull)frameInfo NS_SWIFT_NAME(rtcEngine(:onLocalVideoSizeChanged:withFrameInfo:)) | 参数变化: 将streamIndex变为VideoSource |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine *_Nonnull)engine onRemoteVideoSizeChanged:(ByteRTCRemoteStreamKey _Nonnull)streamKey withFrameInfo:(ByteRTCVideoFrameInfo **Nonnull)frameInfo NS_SWIFT_NAME(rtcEngine(:onRemoteVideoSizeChanged:withFrameInfo:)) | rtcEngine:(ByteRTCEngine *_Nonnull)engine onRemoteVideoSizeChanged:(NSString *_Nonnull)streamId info:(ByteRTCStreamInfo _Nonnull)info withFrameInfo:(ByteRTCVideoFrameInfo **Nonnull)frameInfo NS_SWIFT_NAME(rtcEngine(:onRemoteVideoSizeChanged:withFrameInfo:)) | 参数变化: 将RemoteStreamKey变为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine * _Nonnull)engine onFirstLocalAudioFrame:(ByteRTCStreamIndex) streamIndex | rtcEngine:(ByteRTCEngine * _Nonnull)engine onFirstLocalAudioFrame:(ByteRTCAudioSource* _Nullable)audioSource | 参数变化: 将streamIndex变为AudioSource |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine * _Nonnull)engine onSEIMessageReceived:(ByteRTCRemoteStreamKey* _Nonnull)remoteStreamKey andMessage:(NSData* _Nonnull)message | rtcEngine:(ByteRTCEngine * _Nonnull)engine onSEIMessageReceived:(NSString* _Nonnull)streamId info:(ByteRTCStreamInfo* _Nonnull)info andMessage:(NSData* _Nonnull)message | 参数变化: 将RemoteStreamKey变为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine * _Nonnull)engine onSEIStreamUpdate:(ByteRTCRemoteStreamKey* _Nonnull)remoteStreamKey eventType:(ByteRTCSEIStreamEventType)eventType | rtcEngine:(ByteRTCEngine * _Nonnull)engine onSEIStreamUpdate:(NSString* _Nonnull)streamId info:(ByteRTCStreamInfo* _Nonnull)info eventType:(ByteRTCSEIStreamEventType)eventType | 参数变化: 将RemoteStreamKey变为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine* _Nonnull)engine onRecordingStateUpdate:(ByteRTCStreamIndex)type state:(ByteRTCRecordingState)state error_code:(ByteRTCRecordingErrorCode)errorCode recording_info:(ByteRTCRecordingInfo* _Nonnull)recordingInfo | rtcEngine:(ByteRTCEngine* _Nonnull)engine onRecordingStateUpdate:(ByteRTCVideoSource* _Nullable)videoSource state:(ByteRTCRecordingState)state error_code:(ByteRTCRecordingErrorCode)errorCode recording_info:(ByteRTCRecordingInfo* _Nonnull)recordingInfo | 参数变化: 将streamIndex变为VideoSource |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine* _Nonnull)engine onRecordingProgressUpdate:(ByteRTCStreamIndex)type process:(ByteRTCRecordingProgress* _Nonnull)process recording_info:(ByteRTCRecordingInfo* _Nonnull)recordingInfo | rtcEngine:(ByteRTCEngine* _Nonnull)engine onRecordingProgressUpdate:(ByteRTCVideoSource* _Nullable)videoSource process:(ByteRTCRecordingProgress* _Nonnull)process recording_info:(ByteRTCRecordingInfo* _Nonnull)recordingInfo | 参数变化: 将streamIndex变为VideoSource |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine * _Nonnull)engine onStreamSyncInfoReceived:(ByteRTCRemoteStreamKey* _Nonnull)remoteStreamKey streamType:(ByteRTCSyncInfoStreamType)streamType data:(NSData* _Nonnull)data | rtcEngine:(ByteRTCEngine * _Nonnull)engine onStreamSyncInfoReceived:(NSString* _Nonnull)streamId info:(ByteRTCStreamInfo* _Nonnull)info streamType:(ByteRTCSyncInfoStreamType)streamType data:(NSData* _Nonnull)data | 参数变化: 将RemoteStreamKey变为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine *_Nonnull)engine onAudioFrameSendStateChanged:(NSString * _Nonnull)roomId rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state | rtcEngine:(ByteRTCEngine *_Nonnull)engine onAudioFrameSendStateChanged:(NSString * _Nonnull)streamId info:(ByteRTCStreamInfo *_Nonnull)info rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state | 参数变化: 将roomId改为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine *_Nonnull)engine onVideoFrameSendStateChanged:(NSString * _Nonnull)roomId rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state | rtcEngine:(ByteRTCEngine *_Nonnull)engine onVideoFrameSendStateChanged:(NSString * _Nonnull)streamId info:(ByteRTCStreamInfo *_Nonnull)info rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFrameSendState)state; | 参数变化: 将roomId改为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine *_Nonnull)engine onAudioFramePlayStateChanged:(NSString * _Nonnull)roomId rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state | rtcEngine:(ByteRTCEngine *_Nonnull)engine onAudioFramePlayStateChanged:(NSString * _Nonnull)streamId info:(ByteRTCStreamInfo *_Nonnull)info rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state | 参数变化: 将roomId改为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine *_Nonnull)engine onVideoFramePlayStateChanged:(NSString * _Nonnull)roomId rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state | rtcEngine:(ByteRTCEngine *_Nonnull)engine onVideoFramePlayStateChanged:(NSString * _Nonnull)streamId info:(ByteRTCStreamInfo *_Nonnull)info rtcUser:(ByteRTCUser *_Nonnull)user state:(ByteRTCFirstFramePlayState)state | 参数变化: 将roomId改为streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine *_Nonnull)engine onSimulcastSubscribeFallback:(ByteRTCRemoteStreamSwitchEvent *_Nonnull)event | rtcEngine:(ByteRTCEngine *_Nonnull)engine onSimulcastSubscribeFallback:(NSString _Nonnull)streamId info:(ByteRTCStreamInfo _Nonnull)info event:(ByteRTCRemoteStreamSwitchEvent *_Nonnull)event | 参数变化: 添加参数streamId和streamInfo |
ByteRTCEngineDelegate | rtcEngine:(ByteRTCEngine *_Nonnull)engine onPerformanceAlarms:(ByteRTCPerformanceAlarmMode)mode roomId:(NSString *_Nonnull)roomId reason:(ByteRTCPerformanceAlarmReason)reason sourceWantedData:(ByteRTCSourceWantedData *_Nonnull)data | rtcEngine:(ByteRTCEngine *_Nonnull)engine onPerformanceAlarms:(NSString _Nonnull)streamId info:(ByteRTCStreamInfo _Nonnull)info mode:(ByteRTCPerformanceAlarmMode)mode reason:(ByteRTCPerformanceAlarmReason)reason sourceWantedData:(ByteRTCSourceWantedData *_Nonnull)data | 参数变化: 添加参数streamId和streamInfo |
ByteRTCRoomDelegate | rtcRoom:( ByteRTCRoom _Nonnull)rtcRoom onLocalStreamStats:(ByteRTCLocalStreamStats **Nonnull)stats NS_SWIFT_NAME(rtcRoom(:onLocalStreamStats:)) | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onLocalStreamStats:(NSString *_Nonnull)streamId info:(ByteRTCStreamInfo _Nonnull)info stats:(ByteRTCLocalStreamStats **Nonnull)stats NS_SWIFT_NAME(rtcRoom(:onLocalStreamStats:)) | 参数变化: 添加参数streamId和streamInfo |
ByteRTCRoomDelegate | rtcRoom:( ByteRTCRoom _Nonnull)rtcRoom onRemoteStreamStats:(ByteRTCRemoteStreamStats **Nonnull)stats NS_SWIFT_NAME(rtcRoom(:onRemoteStreamStats:)) | rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onRemoteStreamStats:(NSString *_Nonnull)streamId info:(ByteRTCStreamInfo _Nonnull)info stats:(ByteRTCRemoteStreamStats **Nonnull)stats NS_SWIFT_NAME(rtcRoom(:onRemoteStreamStats:)) | 参数变化: 添加参数streamId和streamInfo |
LocalEncodedVideoFrameObserverObjC : ILocalEncodedVideoFrameObserver | onLocalEncodedVideoFrame:(ByteRTCStreamIndex) streamIndex Frame:(ByteRTCEncodedVideoFrame * _Null_unspecified)frame | onLocalEncodedVideoFrame:(ByteRTCVideoSource* _Nullable)videoSource Frame:(ByteRTCEncodedVideoFrame * _Null_unspecified)frame | 参数变化: 将streamIndex变为VideoSource |
RemoteEncodedVideoFrameObserverObjC : IRemoteEncodedVideoFrameObserver | onRemoteEncodedVideoFrame:(ByteRTCRemoteStreamKey * _Nonnull)streamKey withEncodedVideoFrame:(ByteRTCEncodedVideoFrame* _Nonnull)videoFrame | onRemoteEncodedVideoFrame:(NSString*)streamId info:(ByteRTCStreamInfo * _Nonnull)info withEncodedVideoFrame:(ByteRTCEncodedVideoFrame* _Nonnull)videoFrame | 参数变化: 将RemoteStreamKey变为streamId和streamInfo |
SnapshotResultObjC : ISnapshotResultCallback | onTakeLocalSnapshotResult:(NSInteger) taskId streamIndex:(ByteRTCStreamIndex)streamIndex image:(ByteRTCImage * _Nullable)image errorCode:(NSInteger)errorCode | onTakeLocalSnapshotResult:(NSInteger) taskId videoSource:(ByteRTCVideoSource * _Nullable)videoSource image:(ByteRTCImage * _Nullable)image errorCode:(NSInteger)errorCode | 参数变化: 将streamIndex变为VideoSource |
SnapshotResultObjC : ISnapshotResultCallback | onTakeRemoteSnapshotResult:(NSInteger)taskId streamKey:(ByteRTCRemoteStreamKey * _Nonnull)streamKey image:(ByteRTCImage * _Nullable)image errorCode:(NSInteger)errorCode | onTakeRemoteSnapshotResult:(NSInteger)taskId streamId:(NSString*)streamId info:(ByteRTCStreamInfo * _Nonnull)info image:(ByteRTCImage * _Nullable)image errorCode:(NSInteger)errorCode | 参数变化: 将RemoteStreamKey变为streamId和streamInfo |
ByteRTCAudioFrameObserver : IAudioFrameObserver | onRemoteUserAudioFrame:(ByteRTCRemoteStreamKey * _Nonnull)streamKey audioFrame:(ByteRTCAudioFrame * _Nonnull)audioFrame | onRemoteUserAudioFrame:(NSString * _Nonnull)streamId info:(ByteRTCStreamInfo * _Nonnull)info audioFrame:(ByteRTCAudioFrame * _Nonnull)audioFrame | 参数变化: 将RemoteStreamKey变为streamId和streamInfo |
ByteRtcAudioFrameProcessorOCC : IAudioFrameProcessor | onProcessRemoteUserAudioFrame:(ByteRTCRemoteStreamKey * _Nonnull)streamKey audioFrame:(ByteRTCAudioFrame * _Nonnull)audioFrame | onProcessRemoteUserAudioFrame:(NSString * _Nonnull)streamId info:(ByteRTCStreamInfo * _Nonnull)info audioFrame:(ByteRTCAudioFrame * _Nonnull)audioFrame | 参数变化: 将RemoteStreamKey变为streamId和streamInfo |
ExternalVideoEncoderEventHandlerObjC : IExternalVideoEncoderEventHandler | onStart:(ByteRTCStreamIndex)streamIndex | onStart:(NSString*)streamId info:(ByteRTCStreamInfo * _Nonnull)info | 参数变化: 将streamIndex变为streamId和streamInfo |
ExternalVideoEncoderEventHandlerObjC : IExternalVideoEncoderEventHandler | onStop:(ByteRTCStreamIndex)streamIndex | onStop:(NSString*)streamId info:(ByteRTCStreamInfo * _Nonnull)info | 参数变化: 将streamIndex变为streamId和streamInfo |
ExternalVideoEncoderEventHandlerObjC : IExternalVideoEncoderEventHandler | onRateUpdate:(ByteRTCStreamIndex)streamIndex withVideoIndex:(NSInteger)videoIndex withFps:(NSInteger)fps withBitRate:(NSInteger)bitRateKps | onRateUpdate:(NSString*)streamId info:(ByteRTCStreamInfo * _Nonnull)info withVideoIndex:(NSInteger)videoIndex withFps:(NSInteger)fps withBitRate:(NSInteger)bitRateKps | 参数变化: 将streamIndex变为streamId和streamInfo |
ExternalVideoEncoderEventHandlerObjC : IExternalVideoEncoderEventHandler | onRequestKeyFrame:(ByteRTCStreamIndex)streamIndex withVideoIndex:(NSInteger)videoIndex | onRequestKeyFrame:(NSString*)streamId info:(ByteRTCStreamInfo * _Nonnull)info withVideoIndex:(NSInteger)videoIndex | 参数变化: 将streamIndex变为streamId和streamInfo |
ExternalVideoEncoderEventHandlerObjC : IExternalVideoEncoderEventHandler | onActiveVideoLayer:(ByteRTCStreamIndex)streamIndex withVideoIndex:(NSInteger)videoIndex withActive:(BOOL)active | onActiveVideoLayer:(NSString*)streamId info:(ByteRTCStreamInfo * _Nonnull)info withVideoIndex:(NSInteger)videoIndex withActive:(BOOL)active | 参数变化: 将streamIndex变为streamId和streamInfo |
改动的数据类型 | V3.58 | V3.60 | 变更说明 |
|---|---|---|---|
ByteRTCRoomProfile |
| ByteRTCRoomProfileCall = 19 | 更注重流畅性,视频缺省码率相对低,对音质要求低,流畅性要求高。 |
| ByteRTCRoomProfileLive = 20 | 更注重画质,视频缺省码率相对高,对音质要求高。 |
功能 | V3.58 | V3.60 | 变更说明 |
|---|---|---|---|
视频帧数据 | ByteRTCVideoFrame | ByteRTCVideoFrameData |
|
远端视频帧回调位置 | ByteRTCRemoteVideoRenderPosition | ByteRTCRemoteVideoSinkPosition | 类型重命名 |
是否将视频帧镜像 | ByteRTCVideoRenderMirrorType | ByteRTCVideoSinkMirrorType | 类型重命名 |
ByteRTCStreamMixingEvent 变更为 ByteRTCMixedStreamTaskEvent,和 WTN 流任务共用同一个事件枚举类。描述 | V3.58 | V3.60 |
|---|---|---|
请求发起任务 | ByteRTCStreamMixingEventStart = 1 | ByteRTCMixedStreamTaskEventStartSuccess = 1 |
任务发起失败 | ByteRTCStreamMixingEventStartFailed= 3 | ByteRTCMixedStreamTaskEventStartFailed = 2 |
请求更新 | ByteRTCStreamMixingEventUpdate = 4 | ByteRTCMixedStreamTaskEventUpdateSuccess = 3 |
任务更新失败 | ByteRTCStreamMixingEventUpdateFailed = 6 | ByteRTCMixedStreamTaskEventUpdateFailed = 4 |
请求结束任务 | ByteRTCStreamMixingEventStop = 7 | ByteRTCMixedStreamTaskEventStopSuccess = 5 |
任务结束失败 | ByteRTCStreamMixingEventStopFailed = 9 | ByteRTCMixedStreamTaskEventStopFailed = 6 |
参数错误 | ByteRTCStreamMixingEventRequestParamError = 15 | 调用 startPushMixedStream:withPushTargetConfig:withMixedConfig: 或 updatePushMixedStream:withPushTargetConfig:withMixedConfig: 时返回 ByteRTCReturnStatusParameterErr = -2 |
任务处理超时,请检查网络状态并重试超时 | ByteRTCStreamMixingEventUpdateTimeout = 13 | startPushMixedStream:withPushTargetConfig:withMixedConfig: 或 updatePushMixedStream:withPushTargetConfig:withMixedConfig: 时返回ByteRTCMixedStreamTaskErrorCodeTimeout = 1091 |
合流加图片 | ByteRTCStreamMixingEventMixImage = 16 | ByteRTCMixedStreamTaskEventWarning = 7 |
Warning 事件 | 无 | ByteRTCMixedStreamTaskEventWarning = 7 |
其他 | ByteRTCStreamMixingEventChangeMixType = 10 | 移除 |
ByteRTCSingleStreamPushEvent 变更为 ByteRTCSingleStreamTaskEvent。描述 | V3.58 | V3.60 |
|---|---|---|
开始推流 | ByteRTCSingleStreamPushEventStart = 1 | ByteRTCSingleStreamTaskEventStartSuccess = 1 |
推流成功 | ByteRTCSingleStreamPushEventStartSuccess = 2 | ByteRTCSingleStreamTaskEventStartSuccess = 1 |
推流失败 | ByteRTCSingleStreamPushEventStartFailed = 3 | ByteRTCSingleStreamTaskEventStartFailed = 2 |
停止推流 | ByteRTCSingleStreamPushEventStop = 4 | ByteRTCSingleStreamTaskEventStopSuccess = 3 |
单流转推直播任务处理超时,请检查网络状态并重试 | ByteRTCSingleStreamPushEventTimeout = 5 | ByteRTCSingleStreamTaskEventWarning = 5,具体错误信息参看 ByteRTCSingleStreamTaskErrorCode。 |
参数错误 | ByteRTCSingleStreamPushEventParamError = 6 | 调用 startPushSingleStream:singleStream: 时返回 ByteRTCReturnStatusParameterErr = -2。 |
停止推流失败 | 无 | ByteRTCSingleStreamTaskEventStopFailed = 4 |
功能 | 改动的数据类型 | 变更说明 |
|---|---|---|
本地音频流统计信息 | ByteRTCLocalAudioStats | 增加字段 audioDeviceLoopDelay(音频采集播放延时)、encodeFrameRate(音频编码帧率) |
远端音频流统计信息 | ByteRTCRemoteAudioStats | 增加字段 decodeFrameRate(音频解码帧率) |
远端视频流统计信息 | ByteRTCRemoteVideoStats | 增加字段 capToRenderDelay(从发送端开始采集到接收端渲染完成的延时)、avSyncDiffMs(音画同步差异)、codecElapsePerFrame(视频解码平均耗时) |
功能 | 名称 | 变更说明 |
|---|---|---|
发布状态变化原因 | ByteRTCPublishStateChangeReason | 新增类 |
截图错误码 | ByteRTCSnapshotErrorCode | 新增枚举 |
音频场景类型 | ByteRTCAudioScenarioType | 枚举值增加 |
耳返功能的 Audio Filter 类型 | ByteRTCEarMonitorAudioFilter | 新增枚举 |
单流转推直播错误码 | ByteRTCSingleStreamTaskErrorCode | 枚举值增加 |
单流转推配置目标房间信息 | DestInfo | 新增类 |
单流转推类型 | ByteRTCSingleStreamPushType | 枚举增加 |
单流转推直播配置参数 | ByteRTCPushSingleStreamParam | 成员增加 |
镜像类型 | ByteRTCMirrorType | 枚举值增加 |
V3.58 | V3.60 |
|---|---|
ByteRTCWarningCodeOldRoomBeenReplaced = -2016 | 移除: |
ByteRTCPublicStreamErrorCode 变更为 ByteRTCMixedStreamTaskErrorCode,和合流转推任务共用同一个枚举类。描述 | V3.58 | V3.60 |
|---|---|---|
成功 | ByteRTCPublicStreamErrorCodeSuccess = 0 | ByteRTCMixedStreamTaskErrorCodeOK = 0 |
服务端参数检验失败 | ByteRTCPublicStreamErrorCodePushParamError = 1191 | 删除,不会回调此类错误。 |
服务端内部错误 | ByteRTCPublicStreamErrorCodePushStatusError = 1192 删除,不会回调此类错误。 | ByteRTCMixedStreamTaskErrorCodeInvalidStateByServer = 1094 |
服务端未知错误 | ByteRTCPublicStreamErrorCodePushInternalError = 1193 删除,不会回调此类错误。 | ByteRTCMixedStreamTaskErrorCodeUnKnownErrorByServer = 1096 |
任务失败 | ByteRTCPublicStreamErrorCodePushError = 1195 | ByteRTCMixedStreamTaskErrorCodePushWTNFailed = 1195 |
任务超时 | ByteRTCPublicStreamErrorCodePushTimeOut = 1196 | ByteRTCMixedStreamTaskErrorCodeTimeOut = 1091 |
流订阅超时 | ByteRTCPublicStreamErrorCodePullNoPushStream = 1300 | ByteRTCWTNSubscribeStateChangeReason.ByteRTCWTNSubscribeStateChangeReasonUnsubscribe = 1300,通过onWTNVideoSubscribeStateChanged:state:reason: 或onWTNAudioSubscribeStateChanged:state:reason: 返回。 |
ByteRtcTranscoderErrorCode 变更为 ByteRTCMixedStreamTaskErrorCode,和 WTN 流任务共用同一个枚举类。描述 | V3.58 | V3.60 |
|---|---|---|
推流成功 | ByteRtcTranscoderErrorCodeOK = 0 | ByteRTCMixedStreamTaskErrorCodeOK = 0 |
未定义的合流错误 | ByteRtcTranscoderErrorCodeBase = 1090 | 无,该错误码未启用。 |
客户端 SDK 检测到无效推流参数 | ByteRtcTranscoderErrorCodeInvalidParam = 1091 | 调用 startPushMixedStream:withPushTargetConfig:withMixedConfig: 或 updatePushMixedStream:withPushTargetConfig:withMixedConfig: 时返回 ByteRTCReturnStatusParameterErr = -2。 |
状态错误,需要在状态机正常状态下发起操作 | ByteRtcTranscoderErrorCodeInvalidState = 1092 | ByteRTCMixedStreamTaskErrorCodeInvalidStateByServer = 1094 |
无效操作 | ByteRtcTranscoderErrorCodeInvalidOperator = 1093 | ByteRTCMixedStreamTaskErrorCodeInvalidStateByServer = 1094 |
转推直播任务处理超时,请检查网络状态并重试 | ByteRtcTranscoderErrorCodeTimeOut = 1094 | ByteRTCMixedStreamTaskErrorCodeTimeOut = 1091 |
服务端检测到错误的推流参数 | ByteRtcTranscoderErrorCodeInvalidParamByServer = 1095 | ByteRTCMixedStreamTaskErrorCodeInvalidParamByServer = 1092 |
对流的订阅超时 | ByteRtcTranscoderErrorCodeSubTimeoutByServer = 1096 | ByteRTCMixedStreamTaskErrorCodeSubTimeoutByServer = 1093 |
合流服务端内部错误 | ByteRtcTranscoderErrorCodeInvalidStateByServer = 1097 | ByteRTCMixedStreamTaskErrorCodeInvalidStateByServer = 1094 |
合流服务端推 CDN 失败 | ByteRtcTranscoderErrorCodeAuthenticationByCDN = 1098 | ByteRTCMixedStreamTaskErrorCodeAuthenticationByCDN = 1095 |
服务端接收信令超时,请检查网络状态并重试。 | ByteRtcTranscoderErrorCodeTimeoutBySignaling = 1099 | ByteRTCMixedStreamTaskErrorCodeSignalRequestTimeout = 1097 |
图片合流失败 | ByteRtcTranscoderErrorCodeMixImageFail = 1100 | ByteRTCMixedStreamTaskErrorCodeMixImageFailed = 1098 |
服务端未知错误 | ByteRtcTranscoderErrorCodeUnKnownErrorByServer = 1101 | ByteRTCMixedStreamTaskErrorCodeUnKnownErrorByServer = 1096 |
ByteRTCTranscoderErrorCode 替换为 ByteRTCSingleStreamTaskErrorCode。描述 | V3.58 | V3.60 |
|---|---|---|
推流成功 | TRANSCODER_ERROR_OK = 0 | ByteRTCMixedStreamTaskErrorCodeOK = 0 |
未定义的合流错误 | TRANSCODER_ERROR_BASE = 1090 | 无,该错误码未启用。 |
客户端 SDK 检测到无效推流参数 | TRANSCODER_ERROR_INVALID_PARAM = 1091 | 调用 startPushSingleStream:singleStream: 时返回 ByteRTCReturnStatusParameterErr = -2。 |
状态错误,需要在状态机正常状态下发起操作 | TRANSCODER_ERROR_INVALID_STATE = 1092 | 无,单流任务不会触发该错误码。 |
无效操作 | TRANSCODER_ERROR_INVALID_OPERATOR = 1093 | 无,单流任务不会触发该错误码。 |
转推直播任务处理超时,请检查网络状态并重试 | TRANSCODER_ERROR_TIMEOUT = 1094 | 无,单流任务不会触发该错误码。 |
服务端检测到错误的推流参数 | TRANSCODER_ERROR_INVALID_PARAM_BY_SERVER = 1095 | 无,单流任务不会触发该错误码。 |
对流的订阅超时 | TRANSCODER_ERROR_SUB_TIMEOUT_BY_SERVER = 1096 | 无,单流任务不会触发该错误码。 |
合流服务端内部错误 | TRANSCODER_ERROR_INVALID_STATE_BY_SERVER = 1097 | 无,单流任务不会触发该错误码。 |
合流服务端推 CDN 失败 | TRANSCODER_ERROR_AUTHENTICATION_BY_CDN = 1098 | 无,单流任务不会触发该错误码。 |
服务端接收信令超时,请检查网络状态并重试 | TRANSCODER_ERROR_TIMEOUT_BY_SIGNALING = 1099 | ByteRTCSingleStreamTaskErrorCodeSignalRequestTimeout = 1092 |
图片合流失败 | TRANSCODER_ERROR_MIX_IMAGE_FAIL = 1100 | 无,单流任务不会触发该错误码。 |
服务端未知错误 | TRANSCODER_ERROR_UNKNOW_ERROR_BY_SERVER = 1101 | ByteRTCSingleStreamTaskErrorCodeUnknownByServer = 1091 |
删除了部分已废弃多个版本的错误码
描述 | 错误码 |
|---|---|
将自身可见性设置为 false 后,再尝试发布流会触发此警告。 | ByteRTCWarningCodePublishStreamForbiden = -2010 |
自动订阅模式未关闭时,尝试开启手动订阅模式会触发此警告。 | ByteRTCWarningCodeGetRoomFailed = -2000 |
接口 | 功能说明 |
|---|---|
createRTSRoom: | 创建RTS房间 |
pushReferenceAudioPCMData: | 将外部音频参考帧推到sdk内 |
getCallId | 获取通话 ID。该方法需要在加入房间后调用 |
onRemoteEncodedAudioFrame:info:audioFrame: | 调用 RegisterRemoteEncodedAudioFrameObserver 后,SDK 收到远端音频帧信息时,回调该事件 |
takeLocalSnapshotToFile: | 截取本地视频流画面,生成 JPG 文件,并保存到本地指定路径。 |
takeRemoteSnapshotToFile:filePath: | 截取远端的视频流画面,生成 JPG 文件,并保存到本地指定路径。 |
rtcEngine:onLocalSnapshotTakenToFile:filePath:width:height:errorCode:taskId: | 用 takeSnapshotToFile:filePath: 截取视频画面时,会收到此回调报告截图是否成功,以及截取的图片信息。 |
rtcEngine:onRemoteSnapshotTakenToFile:info:filePath:width:height:errorCode:taskId: | 用 takeSnapshotToFile:filePath: 截取视频画面时,会收到此回调报告截图是否成功,以及截取的图片信息。 |
setEarMonitorMode:filter: | 耳返支持复用自定义处理后的本地采集音频 |
setWTNStreamDelegate: | 设置 WTN 流回调接口 |
rtcRoom:onRoomEvent:uid:state:info: | 房间事件回调,并新增枚举 ByteRTCRoomEventInfo |
setStreamExtraInfo: | 设置当前推流的流附加信息 |
rtcRoom:onRoomStreamExtraInfoUpdate:info:extraInfo: | 接收同一房间内,其他用户调用 setStreamExtraInfo 设置的流附加信息的回调。 |
createGameRoom | 创建游戏房间 |
ByteRTCGameRoom.destroy | 销毁游戏房间 |
ByteRTCGameRoom.setRTCGameRoomDelegate: | 设置 GameRTCRoom 事件的代理对象 |
ByteRTCGameRoom.joinRoom: | 加入游戏房间 |
ByteRTCGameRoom.leaveRoom | 离开游戏房间 |
ByteRTCGameRoom.getRangeAudio | 新增 |
ByteRTCGameRoom.updateToken: | 更新 Token |
ByteRTCGameRoom.enableMicrophone: | 开启或关闭麦克风 |
ByteRTCGameRoom.enableSpeakerphone: | 开启或关闭扬声器 |
ByteRTCGameRoom.enableAudioSend: | 发送或取消发送音频流 |
ByteRTCGameRoom.enableAudioReceive: | 是否接收指定用户的音频流 |
ByteRTCGameRoom.setRemoteRoomAudioPlaybackVolume: | 调节某个房间内所有远端用户的音频播放音量。 |
删除了已废弃或不推荐使用的方法,具体如下:
功能 | 已删除/废弃接口 | 替代接口 |
|---|---|---|
废弃 |
|
|
废弃 |
|
|
删除 | (RTCVideo * _Nullable) createRTCVideo:(NSString * _Nonnull)appId delegate:(id_Nullable)delegate parameters:(NSDictionary * _Nonnull)parameters | (ByteRTCEngine * _Nullable) createRTCEngine:(ByteRTCEngineConfig * _Nonnull) config delegate:(id_Nullable)delegate |
删除 | getErrorDescription: | 无替代接口 |
删除 | startASR:handler: | 无替代接口 |
删除 | onSuccessonMessage:rtcEngine: | 如果需要使用 ASR 功能,可以通过实时字幕功能相关接口实现。rtcRoom:onSubtitleStateChanged:errorCode:errorMessage: |
删除 |
| 无替代接口 |
删除 | -(int)setAudioPlaybackDevice:(ByteRTCAudioPlaybackDevice)audioPlaybackDevice __deprecated_msg("Will be removed in new version") |
|
删除 | (void)rtcRoom:( ByteRTCRoom *_Nonnull)rtcRoom onRoomError:(ByteRTCErrorCode)errorCode __deprecated_msg("Will be removed in new version") |
|
删除 | (int)subscribeUserStream:(NSString *_Nonnull)userId streamType:(ByteRTCStreamIndex)streamType mediaType:(ByteRTCSubscribeMediaType)mediaType videoConfig:(ByteRTCSubscribeVideoConfig *_Nonnull)videoConfig __deprecated_msg("Will be removed in new version") |
|
删除 |
|
|
删除 |
| 美颜相关API从ByteRTCEngine(原ByteRTCVideo)移到了ByteRTCVideoEffect中:
|
删除 |
|
|
删除 | ByteRTCAudioMixingManager | ByteRTCMediaPlayer |
删除 | -(int)muteAudioPlayback:(ByteRTCMuteState)muteState __deprecated_msg("Will be removed in new version") |
|
|
| |
删除 |
| 屏幕分享功能部分删除,暂无替换 |
变更详情 | 功能模块 | 改动的数据类型 | 说明 |
|---|---|---|---|
新增枚举值 | 音效 |
自 3.57 版本起,macOS SDK 支持的最低版本为 macOS 10.13。
该版本对所有不规范的 API 命名进行了统一修复,提升代码规范度和易用性。以下仅为变更示例,请至类型详情页查看所用类型的具体改动。
变更对象 | 变更详情 | 旧版示例 | 新版示例 |
|---|---|---|---|
枚举值 | 统一以 “ByteRTC” 为前缀,改为“类名+值名” | 以
| 以
|
结构体成员 | 改为首字母小写,驼峰标识 | 以
| 以
|
变更详情 | 功能模块 | 废弃的类/接口 | 替代的类/接口 | 说明 |
|---|---|---|---|---|
删除 | 主调类 |
|
| |
删除 | 引擎管理 |
|
| 咨询技术支持获取详细信息。 |
使用范围拓展 | 视频处理 |
| 旧版接口仅支持在手动订阅时使用,新增支持在自动订阅时使用。 | |
删除 | 音频处理 |
|
| |
参数数据结构新增成员变量 | 音频管理 |
| 新增参数 | |
废弃 | 视频处理 |
| 使用类 |
变更详情 | 功能模块 | 废弃的类/接口 | 替代的类/接口 | 说明 |
|---|---|---|---|---|
删除 | 主回调类 |
|
| |
参数变更 | 消息 |
|
| 在 |
参数数据结构新增成员变量 | 音频管理 |
|
| 新增参数 |
变更详情 | 功能模块 | 改动的数据类型 | 说明 |
|---|---|---|---|
成员变量新增 | 字幕翻译服务 | 在字幕内容回调 | |
成员变量变更 | CDN 推流 | 转推直播单个用户画面由设置相对于整体画面的归一化比例变更为可设置像素绝对值。 | |
枚举值重命名 | 视频管理 |
|
变更详情 | 错误码 | 说明 |
|---|---|---|
枚举值增删 | 新增客户端向业务服务器发送消息失败错误码: |
变更详情 | 功能模块 | 变动前方法 | 变动后方法 | 说明 |
|---|---|---|---|---|
将混音相关的类和接口按音效和音乐进行拆分,具体变动情况请参看混音相关的新旧接口对应表 | 混音 |
| 一般来说,对于短时间的音效(比如小于 20s),可以使用音效类;对于较长的音频或 PCM 数据,可以使用音乐类。 | |
行为变更 | 音频管理 | 等待超时后返回空列表,超时时间默认为 10 s | ||
行为变更 | 视频管理 | 等待超时后返回空列表,超时时间默认为 10 s | ||
变更详情 | 类型 | 变更前 | 变更后 | 说明 |
|---|---|---|---|---|
参数变更 |
|
|
附:混音相关的新旧接口对应表
接口分类 | 接口用途 | 废弃类/接口 | 新类/接口(音效) | 新类/接口(音乐) | 备注 |
|---|---|---|---|---|---|
获取实例 | 获取播放器实例 |
|
|
| |
混音类 |
|
|
| ||
混音主调接口 | 将音效文件加载至内存 |
|
|
| |
播放/停止/暂停/恢复 |
|
|
| ||
获取/指定位置/时长 |
|
|
| ||
获取/指定音量 |
|
|
| ||
调整音调 |
| NA |
| ||
设置声道模式 |
| NA |
| ||
获取/设置音轨数 |
| NA |
|
| |
设置播放速度 |
| NA |
| ||
设置播放进度回调间隔 |
| NA |
| ||
设置响度 |
| NA |
| ||
播放外部音频源 |
| NA |
| ||
混音回调接口 | 播放状态回调 |
|
|
| |
音频数据回调 |
| NA |
| ||
变更详情 | 功能模块 | 变动前方法 | 变动后方法 | 说明 |
|---|---|---|---|---|
参数变更 | 引擎管理 | 参数数据类型变更 | ||
废弃 | CDN 推流 |
|
| 合流转推直播接口/参数类型重命名,行为逻辑无变化,新旧版本类名对应关系参看该版本中“类型变更” |
|
| |||
|
| |||
合并 | 高级功能 |
| -(int)updateSelfPosition:(ByteRTCPositionInfo* _Nonnull)positionInfo; | 新接口支持本地用户同时设置本地用户的发声位置和发声朝向。 |
| 新接口支持本地用户设置远端用户的发声位置和发声朝向。 | |||
变更详情 | 方法 | 说明 |
|---|---|---|
参数变更 |
| 参数
|
变更详情 | 类型 | 变更前 | 变更后 | 说明 |
|---|---|---|---|---|
重命名 | 转推直播一级结构体 |
| 结构体中变量名称/方法名称均有变更,请至对应的类型详情中查看 | |
转推直播 Observer |
|
| ||
转推直播二级结构体 |
| 结构体中变量名称/方法名称均有变更,请至对应的类型详情中查看 | ||
| ||||
| ||||
|
| |||
| ||||
|
| |||
转推直播相关枚举类型 |
|
| 各枚举类中的枚举值名称均有变更,请至对应的类型详情中查看 | |
| ||||
| ||||
| ||||
| ||||
| ||||
| ||||
|
|
变更详情 | 错误码 | 说明 |
|---|---|---|
枚举值变更 | 新增枚举值:
名称变更:
| |
新增枚举值 | ||
废弃枚举值 |
该版本 SDK 产物新增 libAGFX.dylib 和 libbytenn.dylib 依赖库,需手动导入项目。
原 ByteRTCCommonDefines.h 文件拆分为 ByteRTCMediaDefines.h 及 ByteRTCRtsDefines.h
变更详情 | 功能模块 | 变动前方法 | 变动后方法 | 备注 |
|---|---|---|---|---|
返回值变更 | 房间管理 |
|
| 返回值为 |
网络管理 |
| stopEchoTest 返回 | ||
引擎管理 |
| setBusinessId: 返回值含义如下:
| ||
拆分 | 视频管理 |
| 解除人脸识别与视频特效之间的耦合,提升接口易用性。 | |
参数变更 | 消息 |
|
| 返回参数类型由 |
|
| |||
| (NSInteger)sendRoomMessage:(NSString *Nonnull)message NS_SWIFT_NAME(sendRoomMessage(:)); | |||
| (NSInteger)sendRoomBinaryMessage:(NSData * Nonnull)message NS_SWIFT_NAME(sendRoomBinaryMessage(:)); | |||
|
| |||
|
| |||
|
| |||
|
| |||
参数类型变更 | 屏幕共享 |
|
| 参数类型变更为新增的 |
行为变更、名称变更 | 屏幕共享 |
|
| 优化屏幕共享接口的行为 |
所属类型变更、名称变更、参数变更 | 音视频处理 |
|
| |
| ||||
| (int) setEffectNodes:(NSArray<NSString*>*_Nonnull)effect_nodes; | |||
| (int) updateEffectNode:(NSString* _Nonnull)node key:(NSString* _Nonnull)key value:(float) value; | |||
| ||||
| ||||
| ||||
参数变更 | 消息 |
|
| 支持 SEI 多发模式,即在 1 帧间隔内多次发送 SEI 数据时,多个 SEI 随下个视频帧同时发送。 |
多个模块 | 返回值类型变化,例如:
以下接口返回值类型由 void 变为 int,具体 int 值含义参考新增数据结构 ByteRTCReturnStatus: | |||
视频管理 |
|
|
| |
|
|
| ||
名称和参数变更 | 音视频传输 |
|
|
|
|
|
| ||
屏幕分享 |
|
|
| |
自定义流处理 |
|
|
| |
|
|
| ||
名称变更 | 高级功能 |
| 大驼峰变为小驼峰。 | |
| ||||
音视频处理 |
| |||
| ||||
视频管理 |
| |||
|
| |||
屏幕分享 |
| |||
房间管理 |
| |||
| ||||
| 修正大小写。 | |||
引擎管理 |
| 修正大小写。 | ||
安全与加密 |
| |||
屏幕分享 |
|
| ||
音频管理 |
| |||
| ||||
删除 | 自定义流处理 | 删除:
| 由以下接口替代: | |
变更详情 | 功能模块 | 变动前回调 | 变动后回调 | 备注 |
|---|---|---|---|---|
参数变更 | 消息 |
|
| |
| ||||
|
| |||
CDN 推流 |
|
| 新增参数 | |
消息 |
|
| ||
名称变更 | 房间管理 |
| ||
音视频传输 |
|
| ||
|
| |||
|
| |||
网络管理 |
|
| ||
|
| 大驼峰变为小驼峰。 | ||
安全与加密 |
| |||
| ||||
视频管理 |
| |||
删除 | 音视频传输 | 删除: | / | |
删除回调类 | 范围语音 |
| 此前,在手动订阅的场景下,如果你希望使用范围语音功能,你必须根据此回调获取的衰减系数,设定音量。 |
变更详情 | 数据类型 | 备注 |
|---|---|---|
取值范围拓展 |
| 取值范围由 |
枚举值增删 | 新增枚举值: | |
成员变量变更 | 新增成员变量: | |
删除变量: | ||
| ||
| 新增成员变量: | |
变量类型变更 | 空间音频功能中表示空间坐标的 position 的 变量 | 提升球面立体声渲染效果。 |
配置变更 | 房间属性的默认值 |
变更详情 | 错误码 | 备注 |
|---|---|---|
枚举值增删 | 新增枚举值: | |
新增枚举值: | ||
新增枚举值: | ||
新增 |
|
以下表格中的类型发生了变化,你需要在工程文件中找到该类型,并根据变化调整相关处理逻辑:
变更详情 | 数据类型 | 备注 |
|---|---|---|
枚举值增删 | 新增屏幕共享音频的枚举值: |
以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:
变更详情 | 功能模块 | 方法 | 备注 |
|---|---|---|---|
参数数据结构改动 | 音频管理 |
|
以下表格中的方法发生了变化。你需要在工程文件中找到该方法,并进行相关修改:
变更详情 | 功能模块 | 变动前方法 | 变动后方法 | 备注 |
|---|---|---|---|---|
废弃原方法 | 音频处理 |
|
| 设置远端用户音量为 0 即可停止播放本地收到的音频流 |