tencent cloud

Tencent Real-Time Communication

CallCoreView

Download
フォーカスモード
フォントサイズ
最終更新日: 2026-07-30 16:30:45

Introduction

CallCoreView is the main container for the call interface, providing the following core capabilities:
Multi-Layout Switching: Supports switching between single-person float, multi-person grid, and picture-in-picture layouts.
Call Waiting Interaction: Supports custom waiting animations before call connection.
Status Visualization: Supports custom icons for different volume levels and network quality states.
User Personalization: Supports setting participant avatars through User ID mapping.
Note:
This view component must be used together with CallStore to properly display call screens and receive call state updates.

Features

Multi-Layout Switching: Supports switching between single-person float, multi-person grid, and picture-in-picture layouts.
Call Waiting Interaction: Supports custom waiting animations before call connection.
Status Visualization: Supports custom icons for different volume levels and network quality states.
User Personalization: Supports setting participant avatars through User ID mapping.

API List

Function
Description
Default placeholder avatar.
Call waiting animation.
Volume status icon collection.
Network signal icon collection.
Multi-layout switching.

Static Properties

defaultAvatarImage

Default placeholder avatar.

waitingAnimationImage

Call waiting animation.

volumeImages

Volume status icon collection.

networkQualityImages

Network signal icon collection.

Configuration Methods

setLayoutTemplate(_:)

Multi-layout switching.

Data Structures

CallLayoutTemplate

Call layout mode enum, used to define the display form of the call screen.
Enum Value
Description
float
Single-person call layout.
grid
Multi-person call layout.
pip
Picture-in-picture layout.

VolumeLevel

Volume level enum, used to identify the current volume intensity of participants.
Enum Value
Value
Description
mute
0
Muted.
low
1
Low volume.
medium
2
Medium volume.
high
3
High volume.
peak
4
Peak volume.

CallCoreController

Controller for managing CallCoreView layout and state.
Property
Type
Description
_currentTemplate

Current layout template notifier.
_zoomEnabled

Video zoom gesture enabled state.
currentLayoutTemplate
Current layout template. Modifiable via setLayoutTemplate.
waitingAnimationSource
ResourceStr
Call waiting animation source. Accepts $rawfile(...), $r(...), network URL, local file path (file:///...) or Base64 data URI.
volumeLevelIconSources
Map<VolumeLevel, ResourceStr>
Mapping between volume levels and icon sources. Each value accepts $rawfile(...), $r(...), network URL, local file path (file:///...) or Base64 data URI.
networkQualityIconSources
Map<NetworkQuality, ResourceStr>
Mapping between network quality states and icon sources. Each value accepts $rawfile(...), $r(...), network URL, local file path (file:///...) or Base64 data URI.
defaultAvatarSource
ResourceStr
Default placeholder avatar source. Accepts $rawfile(...), $r(...), network URL, local file path (file:///...) or Base64 data URI.

Usage Example

import AtomicXCore
// Create call view
let callCoreView = CallCoreView(frame: view.bounds)
view.addSubview(callCoreView)
// Set layout mode
callCoreView.setLayoutTemplate(.grid)
// Set waiting animation
callCoreView.setWaitingAnimation(path: "waiting_animation.json")
// Set volume icons
callCoreView.setVolumeLevelIcons(icons: [
.mute: "volume_mute",
.low: "volume_low",
.medium: "volume_medium",
.high: "volume_high",
.peak: "volume_peak"
])
// Set network quality icons
callCoreView.setNetworkQualityIcons(icons: [
.unknown: "network_unknown",
.excellent: "network_excellent",
.good: "network_good",
.poor: "network_poor",
.bad: "network_bad",
.veryBad: "network_very_bad",
.down: "network_down"
])
// Set participant avatars
callCoreView.setParticipantAvatars(avatars: [
"user_123": "avatar_user_123",
"user_456": "avatar_user_456"
])


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック