CallCoreView is the main container for the call interface, providing the following core capabilities:Function | Description |
Default placeholder avatar. | |
Call waiting animation. | |
Volume status icon collection. | |
Network signal icon collection. | |
Participant avatar collection. | |
Multi-layout switching. | |
Configure waiting animation. | |
Configure volume icons. | |
Configure network icons. | |
Configure participant avatars. |
fun setLayoutTemplate(template: CallLayoutTemplate) {setLayoutTemplateInternal(template)}
Parameter | Type | Description |
template | Target layout template. |
fun setWaitingAnimation(path: String) {setWaitingAnimationInternal(path)}
Parameter | Type | Description |
path | String | Resource path of the animation file. |
fun setVolumeLevelIcons(icons: Map<VolumeLevel, String>) {setVolumeLevelIconsInternal(icons)}
Parameter | Type | Description |
icons | Mapping between volume levels and icon paths. |
fun setNetworkQualityIcons(icons: Map<NetworkQuality, String>) {setNetworkQualityIconsInternal(icons)}
Parameter | Type | Description |
icons | Map<NetworkQuality, String> | Mapping between network quality states and icon paths. |
fun setParticipantAvatars(avatars: Map<String, String>) {setParticipantAvatarsInternal(avatars)}
Parameter | Type | Description |
avatars | Map<String, String> | Mapping between User IDs and avatar resource paths. |
Enum Value | Description |
float | Single-person call layout. |
grid | Multi-person call layout. |
pip | Picture-in-picture layout. |
Enum Value | Value | Description |
Mute | 0 | Muted. |
Low | 1 | Low volume. |
Medium | 2 | Medium volume. |
High | 3 | High volume. |
Peak | 4 | Peak volume. |
import io.trtc.tuikit.atomicxcore.api.view.*// Create call viewval callCoreView = CallCoreView(context)addView(callCoreView)// Set layout modecallCoreView.setLayoutTemplate(CallLayoutTemplate.GRID)// Set waiting animationcallCoreView.setWaitingAnimation("waiting_animation.json")// Set volume iconscallCoreView.setVolumeLevelIcons(mapOf(VolumeLevel.MUTE to "volume_mute",VolumeLevel.LOW to "volume_low",VolumeLevel.MEDIUM to "volume_medium",VolumeLevel.HIGH to "volume_high",VolumeLevel.PEAK to "volume_peak"))// Set network quality iconscallCoreView.setNetworkQualityIcons(mapOf(NetworkQuality.UNKNOWN to "network_unknown",NetworkQuality.EXCELLENT to "network_excellent",NetworkQuality.GOOD to "network_good",NetworkQuality.POOR to "network_poor",NetworkQuality.BAD to "network_bad",NetworkQuality.VERY_BAD to "network_very_bad",NetworkQuality.DOWN to "network_down"))// Set participant avatarscallCoreView.setParticipantAvatars(mapOf("user_123" to "avatar_user_123","user_456" to "avatar_user_456"))
フィードバック