更新时间:2025-07-03 GMT+08:00
分享

设置头像风格

setParticipantAvatarStyle

接口描述

该接口用于设置头像风格。

注意事项

方法定义

1
setParticipantAvatarStyle(avatarStyle?: HWMAvatarStyle): void;

参数描述

参数

是否必须

类型

描述

avatarStyle

HWMAvatarStyle

头像信息。

表1 HWMAvatarStyle参数说明

参数

是否必须

类型

描述

backgroundColor

string

背景色。

textColor

string

文字颜色。

nameShowType

HWMNameShowType

姓名显示风格。

avatarShape

HWMAvatarShape

头像形状。

boardIconPath

PixelMap | ResourceStr | DrawableDescriptor | ImageContent | number

大屏图标路径。

phoneIconPath

PixelMap | ResourceStr | DrawableDescriptor | ImageContent | number

手机图标路径。

示例代码
1
2
3
4
5
6
7
8
9
const avatarStyle: HWMAvatarStyle = {
      backgroundColor: this.getBackgroundColor(),
      textColor: this.getTextColor(),
      nameShowType: this.getNameShowType(),
      avatarShape: this.getAvatarShape(),
      boardIconPath: this.getBoardIconPath(),
      phoneIconPath: this.getPhoneIconPath()
    }
UISDK.getUIOpenApi().setParticipantAvatarStyle(avatarStyle);

相关文档