更新时间:2023-10-26 GMT+08:00
分享

辅流管理

startRemoteAuxiliaryStreamView

- (int)startRemoteAuxiliaryStreamView:(HWRtcVideoCanvas *)view;

功能说明

开启辅流渲染视图(发起辅流选看)

请求参数

view: 具体请参见HWRtcVideoCanvas

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HWRtcErrorCode
    • 收到onUserAuxiliaryStreamAvailable消息后,获取对应的userId。
    • 多辅流场景,一个用户同时只能订阅一条辅流;当前正在订阅用户A的辅流,需要订阅另一个用户B的辅流时,需要先停止订阅用户A的辅流,再订阅用户B的辅流。

stopRemoteAuxiliaryStreamView

- (int)stopRemoteAuxiliaryStreamView:(NSString *)userid;

功能说明

停止选看辅流视图。

请求参数

userid:远端用户的唯一标识。

返回参数

  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HWRtcErrorCode

收到connection:onUserAuxiliaryStreamAvailable消息后,如果选看的远端屏幕辅流不可用,则必须调用stopRemoteAuxiliaryStreamView关闭。

updateRemoteAuxiliaryStreamRenderMode

- (int)updateRemoteAuxiliaryStreamRenderMode:(NSString *)userId displayMode(HWRtcVideoDisplayMode)displayModemirrorMode:(HWRtcVideoMirrorType)mirrorMode;

功能说明

设置辅流视图显示模式,镜像模式。

请求参数
  • displayMode:显示模式,默认模式为HWRtcVideoDisplayModeFit,具体请参见HWRtcVideoDisplayMode
  • userId:远端用户的唯一标识。
  • mirrorMode:镜像模式,默认模式为HWRtcVideoMirrorTypeDisable,具体请参见HWRtcVideoMirrorType
返回参数
  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HWRtcErrorCode

setRemoteAuxiliaryStreamViewRotation

- (int)setRemoteAuxiliaryStreamViewRotation:(NSString *)userId rotation:(HWRtcVideoRotation)rotation;

功能说明

设置辅流视图角度

请求参数
  • rotation:视图角度,默认角度为HWRtcVideoRotation0,具体请参见HWRtcVideoRotation
  • userId:远端用户的唯一标识。
返回参数
  • 0:方法调用成功。
  • > 0:方法调用失败。具体请参见HWRtcErrorCode

setRemoteAuxiliaryStreamViewOrientation

- (int)setRemoteAuxiliaryStreamViewOrientation:(NSString *)userId orientation:(HWRtcVideoOrientaion)orientation;

功能说明

设置远端辅流视图方向(横竖屏)。

请求参数

返回参数
  • 0:方法调用成功。
  • >0:方法调用失败。具体请参见HWRtcErrorCode
分享:

    相关文档

    相关产品