Meeting SDK for iOS API Reference
Loading...
Searching...
No Matches
MobileRTCCustom3DAvatarElementSettingContext Class Reference

Context interface for configuring custom 3D avatar elements during avatar creation or editing. More...

#include <MobileRTCCustom3DAvatarElementSettingContext.h>

Inherits NSObject.

Instance Methods

(void) - setDelegate:
 Custom 3D avatar element setting callback handler.
(NSArray< MobileRTCCustom3DAvatarElementImageInfo * > *_Nullable) - getCustom3DAvatarElementImageList
 Get the list of available custom 3D avatar element images.
(MobileRTCSDKError- setCustom3DAvatarElementImage:
 Apply a custom 3D avatar element image to the avatar being created or edited.
(BOOL) - isCustom3DAvatarElementImageModelDataReady:
 Checks whether the model data for a specific custom 3D avatar element image has been fully downloaded and is ready for use. Before an avatar element image can be applied, its model data must be fully downloaded and ready.
(MobileRTCSDKError- downloadCustom3dAvatarElementImageModelData:
 Download the model data required for a specific custom 3D avatar element image. This should be called if isCustom3DAvatarElementImageModelDataReady returns NO for the specified image.
(NSArray< MobileRTCCustom3DAvatarElementColorInfo * > *_Nullable) - getCustom3DAvatarElementColorList
 Get the list of custom 3D avatar element colors.
(MobileRTCSDKError- setCustom3DAvatarElementColor:
 Apply a color to the avatar being created or edited.

Detailed Description

Context interface for configuring custom 3D avatar elements during avatar creation or editing.

These interfaces are provided after calling startCreateCustom3DAvatarWithPreviewView or startEditCustom3DAvatarWithPreviewView, and is used to configure the visual elements of a custom 3D avatar, such as:

  • Selecting a specific avatar element image (model)
  • Downloading and checking readiness of element model data
  • Applying a color to the selected avatar element

The context represents an active avatar creation or editing session. All settings applied through this interface affect the currently creating or editing custom 3D avatar.

Note
  • These interfaces are only valid during the custom 3D avatar creation or editing process.
  • Call setDelegate first before using any other method.
  • The returned image/color lists are managed by the SDK; do not delete them.
  • Model data must be downloaded and ready before applying an image.
  • These interfaces are only valid for the custom UI mode.

Definition at line 108 of file MobileRTCCustom3DAvatarElementSettingContext.h.

Method Documentation

◆ downloadCustom3dAvatarElementImageModelData:

- (MobileRTCSDKError) downloadCustom3dAvatarElementImageModelData: (MobileRTCCustom3DAvatarElementImageInfo *_Nullable) imageInfo

Download the model data required for a specific custom 3D avatar element image. This should be called if isCustom3DAvatarElementImageModelDataReady returns NO for the specified image.

Parameters
imageInfoThe custom 3D avatar element image info object.
Returns
If the function succeeds, the return value is MobileRTCSDKError_Success. Otherwise failed.
Note
This should be called before using the image if its model data is not yet ready.

◆ getCustom3DAvatarElementColorList

- (NSArray< MobileRTCCustom3DAvatarElementColorInfo * > *_Nullable) getCustom3DAvatarElementColorList

Get the list of custom 3D avatar element colors.

Returns
If there are colors in the list, the return value is an array of MobileRTCCustom3DAvatarElementColorInfo. Otherwise returns nil.

References getCustom3DAvatarElementColorList.

Referenced by getCustom3DAvatarElementColorList.

◆ getCustom3DAvatarElementImageList

- (NSArray< MobileRTCCustom3DAvatarElementImageInfo * > *_Nullable) getCustom3DAvatarElementImageList

Get the list of available custom 3D avatar element images.

Returns
If there are images in the list, the return value is an array of MobileRTCCustom3DAvatarElementImageInfo. Otherwise returns nil.

References getCustom3DAvatarElementImageList.

Referenced by getCustom3DAvatarElementImageList.

◆ isCustom3DAvatarElementImageModelDataReady:

- (BOOL) isCustom3DAvatarElementImageModelDataReady: (MobileRTCCustom3DAvatarElementImageInfo *_Nullable) imageInfo

Checks whether the model data for a specific custom 3D avatar element image has been fully downloaded and is ready for use. Before an avatar element image can be applied, its model data must be fully downloaded and ready.

Parameters
imageInfoThe custom 3D avatar element image info object.
Returns
YES means the model data is ready; otherwise NO.

◆ setCustom3DAvatarElementColor:

- (MobileRTCSDKError) setCustom3DAvatarElementColor: (MobileRTCCustom3DAvatarElementColorInfo *_Nullable) colorInfo

Apply a color to the avatar being created or edited.

Parameters
colorInfoThe custom 3D avatar element color info object to apply.
Returns
If the function succeeds, the return value is MobileRTCSDKError_Success. Otherwise failed.

◆ setCustom3DAvatarElementImage:

- (MobileRTCSDKError) setCustom3DAvatarElementImage: (MobileRTCCustom3DAvatarElementImageInfo *_Nullable) imageInfo

Apply a custom 3D avatar element image to the avatar being created or edited.

Parameters
imageInfoThe custom 3D avatar element image info object to apply.
Returns
If the function succeeds, the return value is MobileRTCSDKError_Success. Otherwise failed.
Note
The model data for the image must be ready before calling this method. Otherwise, this function returns an error.

◆ setDelegate:

- (void) setDelegate: (id< MobileRTCCustom3DAvatarElementSettingContextDelegate > _Nullable) delegate

Custom 3D avatar element setting callback handler.

Parameters
delegateThe delegate object that receives custom 3D avatar element setting events.
Note
Call the function before using any other interface of the same class.