Call
  • 개요
  • Web
    • Demo 실행
    • 통합
      • Web&H5 (React)
      • Web&H5(Vue3)
    • AI 노이즈 캔슬링
    • 가상 배경
    • UI 맞춤화
    • 클라우드 녹화
    • 더 많은 기능
      • 닉네임 및 아바타 설정
      • 해상도 및 채우기 모드 설정
      • 그룹 통화
      • 플로팅 윈도우
      • 사용자 정의 벨소리
      • 통화 상태 모니터링
    • 인터페이스 문서
      • 인터페이스 개요
      • TUICallKit
      • TUICallEngine
      • TUICallEvent
    • 서버 API
      • 통화 상태 콜백
        • 통화 상태 콜백
        • 통화 이벤트 콜백
        • 콜백 구성
          • 콜백 구성 인터페이스 목록
          • 콜백 구성 생성
          • 콜백 구성 조회
          • 콜백 구성 업데이트
          • 콜백 구성 삭제
      • REST 인터페이스
        • REST 인터페이스 소개
        • callId를 통한 기록 획득
        • 조건에 따른 기록 획득
    • 배포 설명
  • Android
    • Demo 실행
    • 통합
    • AI 노이즈 캔슬링
    • 가상 배경
    • UI 맞춤화
    • 오프라인 통화 푸시
    • 클라우드 녹화
    • 더 많은 기능
      • 닉네임 및 아바타 설정
      • 그룹 통화
      • 플로팅 윈도우
      • 사용자 정의 벨소리
      • 통화 상태 모니터링
    • 인터페이스 문서
      • 인터페이스 개요
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • 유형 정의
    • 서버 API
      • 통화 상태 콜백
        • 통화 상태 콜백
        • 통화 이벤트 콜백
        • 콜백 구성
          • 콜백 구성 인터페이스 목록
          • 콜백 구성 생성
          • 콜백 구성 조회
          • 콜백 구성 업데이트
          • 콜백 구성 삭제
      • REST 인터페이스
        • REST 인터페이스 소개
        • callId를 통한 기록 획득
        • 조건에 따른 기록 획득
    • 배포 설명
  • iOS
    • Demo 실행
    • 통합
    • AI 노이즈 캔슬링
    • 가상 배경
    • UI 맞춤화
    • 오프라인 통화 푸시
      • VoIP
      • APN
    • 클라우드 녹화
    • 더 많은 기능
      • 닉네임 및 아바타 설정
      • 그룹 통화
      • 플로팅 윈도우
      • 사용자 정의 벨소리
      • 통화 상태 모니터링
    • 인터페이스 문서
      • 인터페이스 개요
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • 유형 정의
    • 서버 API
      • 통화 상태 콜백
        • 통화 상태 콜백
        • 통화 이벤트 콜백
        • 콜백 구성
          • 콜백 구성 인터페이스 목록
          • 콜백 구성 생성
          • 콜백 구성 조회
          • 콜백 구성 업데이트
          • 콜백 구성 삭제
      • REST 인터페이스
        • REST 인터페이스 소개
        • callId를 통한 기록 획득
        • 조건에 따른 기록 획득
    • 배포 설명
  • Flutter
    • Demo 실행
    • 통합
    • AI 노이즈 캔슬링
    • 가상 배경
    • UI 맞춤화
    • 오프라인 통화 푸시
      • 알림
      • VoIP(옵션)
    • 클라우드 녹화
    • 더 많은 기능
      • 닉네임 및 아바타 설정
      • 그룹 통화
      • 플로팅 윈도우
      • 뷰티 특수효과
      • 사용자 정의 벨소리
      • 통화 상태 모니터링
    • 인터페이스 문서
      • 인터페이스 개요
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • 유형 정의
    • 서버 API
      • 통화 상태 콜백
        • 통화 상태 콜백
        • 통화 이벤트 콜백
        • 콜백 구성
          • 콜백 구성 인터페이스 목록
          • 콜백 구성 생성
          • 콜백 구성 조회
          • 콜백 구성 업데이트
          • 콜백 구성 삭제
      • REST 인터페이스
        • REST 인터페이스 소개
        • callId를 통한 기록 획득
        • 조건에 따른 기록 획득
    • 업그레이드
    • 배포 설명
  • 개요
    • 개요
  • 서비스 활성화
  • 가격
    • 무료시간
    • 오디오/비디오 통화 Call 월정액 패키지
    • Billing Explanation for Subscription Package Duration
    • Pay-as-you-go
      • Billing of Audio and Video Duration
      • Billing of On-Cloud Recording and Recording Delivery
      • Billing of MixTranscoding and Relay to CDN
  • ErrorCode
  • 자주 받는 질문들
    • All Platform
      • FAQs
      • UserSig
    • Web
    • Flutter
    • iOS
    • Android
Call
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

TUICallObserver

TUICallObserver API

TUICallObserver is the callback class of TUICallEngine. You can use it to listen for events.

Overview

API
Description
onError
A call occurred during the call.
A call invitation was received.
The call was canceled.
The call was connected.
onCallEnd
The call ended.
The call type changed.
A user declined the call.
A user didn't respond.
A user was busy.
A user joined the call.
A user left the call.
Whether a user had a video stream.
Whether a user had an audio stream.
The volume levels of all users.
The network quality of all users.
The current user was kicked offline.
The user sig is expired.

Details

Listen to the events thrown by the Flutter plugin through addObserver.
TUICallEngine.instance.addObserver(TUICallObserver(
onError: (int code, String message) {
},onCallCancelled: (String callerId) {
}, onCallBegin: (TUIRoomId roomId, TUICallMediaType callMediaType, TUICallRole callRole) {
}, onCallEnd: (TUIRoomId roomId, TUICallMediaType callMediaType, TUICallRole callRole, double totalTime) {
}, onCallMediaTypeChanged: (TUICallMediaType oldCallMediaType, TUICallMediaType newCallMediaType) {
}, onUserReject: (String userId) {
}, onUserNoResponse: (String userId) {
}, onUserLineBusy: (String onUserLineBusy) {
}, onUserJoin: (String userId) {
}, onUserLeave: (String userId) {
}, onUserVideoAvailable: (String userId, bool isVideoAvailable) {
}, onUserAudioAvailable: (String userId, bool isAudioAvailable) {
}, onUserNetworkQualityChanged: (List<TUINetworkQualityInfo> networkQualityList) {
}, onCallReceived: (String callerId, List<String> calleeIdList, String groupId, TUICallMediaType callMediaType) {
}, onUserVoiceVolumeChanged: (Map<String, int> volumeMap) {
}, onKickedOffline: () {
}, onUserSigExpired: () {
}
));

onError

An error occurred.
Note
This callback indicates that the SDK encountered an unrecoverable error. Such errors must be listened for, and UI reminders should be sent to users if necessary.
TUICallEngine.instance.addObserver(TUICallObserver(
onError: (int code, String message) {
}
));
The parameters are described below:
Parameter
Type
Description
code
int
The error code.
message
String
The error message.

onCallReceived

A call invitation was received. This callback is received by an invitee. You can listen for this event to determine whether to display the incoming call view.
TUICallEngine.instance.addObserver(TUICallObserver(
onCallReceived: (String callerId, List<String> calleeIdList, String groupId, TUICallMediaType callMediaType) {
}
));
The parameters are described below:
Parameter
Type
Description
callerId
String
The user ID of the inviter.
calleeIdList
List<String>
The invitee list.
groupId
String
The group ID.
callMediaType
The call type, which can be video or audio.

onCallCancelled

The call was canceled by the inviter or timed out. This callback is received by an invitee. You can listen for this event to determine whether to show a missed call message.
This indicates that the call was canceled by the caller, timed out by the callee, rejected by the callee, or the callee was busy. There are multiple scenarios involved. You can listen to this event to achieve UI logic such as missed calls and resetting UI status.
Call cancellation by the caller: The caller receives the callback (userId is himself); the callee receives the callback (userId is the ID of the caller) .
Callee timeout: the caller will simultaneously receive the onUserNoResponse and onCallCancelled callbacks (userId is his own ID); the callee receives the onCallCancelled callback (userId is his own ID) .
Callee rejection: The caller will simultaneously receive the onUserReject and onCallCancelled callbacks (userId is his own ID); the callee receives the onCallCancelled callback (userId is his own ID) .
Callee busy: The caller will simultaneously receive the onUserLineBusy and onCallCancelled callbacks (userId is his own ID);
Abnormal interruption: The callee failed to receive the call ,he receives this callback (userId is his own ID).
TUICallEngine.instance.addObserver(TUICallObserver(
onCallCancelled: (String userId) {
}
));
The parameters are described below:
Parameter
Type
Description
userId
String
The user ID of the inviter.

onCallBegin

The call was connected. This callback is received by both the inviter and invitees. You can listen for this event to determine whether to start on-cloud recording, content moderation, or other tasks.
TUICallEngine.instance.addObserver(TUICallObserver(
onCallBegin: (TUIRoomId roomId, TUICallMediaType callMediaType, TUICallRole callRole) {
}
));
The parameters are described below:
Parameter
Type
Description
roomId
TUIRoomId
The room ID.
callMediaType
The call type, which can be video or audio.
callRole
The role, which can be caller or callee.

onCallEnd

The call ended. This callback is received by both the inviter and invitees. You can listen for this event to determine when to display call information such as call duration and call type, or stop on-cloud recording.
TUICallEngine.instance.addObserver(TUICallObserver(
onCallEnd: (TUIRoomId roomId, TUICallMediaType callMediaType, TUICallRole callRole, double totalTime) {
}
));
The parameters are described below:
Parameter
Type
Description
roomId
TUIRoomId
The room ID.
callMediaType
The call type, which can be video or audio.
callRole
Number
The role, which can be caller or callee.
totalTime
double
The call duration.
Note
Client-side callbacks are often lost when errors occur, for example, when the process is closed. If you need to measure the duration of a call for billing or other purposes, we recommend you use the RESTful API.

onCallMediaTypeChanged

The call type changed.
TUICallEngine.instance.addObserver(TUICallObserver(
onCallMediaTypeChanged: (TUICallMediaType oldCallMediaType, TUICallMediaType newCallMediaType) {
}
));
The parameters are described below:
Parameter
Type
Description
oldCallMediaType
The call type before the change.
newCallMediaType
The call type after the change.

onUserReject

The call was rejected. In a one-to-one call, only the inviter will receive this callback. In a group call, all invitees will receive this callback.
TUICallEngine.instance.addObserver(TUICallObserver(
onUserReject: (String userId) {
}
));
The parameters are described below:
Parameter
Type
Description
res.userId
String
The user ID of the invitee who rejected the call.

onUserNoResponse

A user did not respond.
TUICallEngine.instance.addObserver(TUICallObserver(
onUserNoResponse: (String userId) {
}
));
The parameters are described below:
Parameter
Type
Description
userId
String
The user ID of the invitee who did not answer.

onUserLineBusy

A user is busy.
TUICallEngine.instance.addObserver(TUICallObserver(
onUserLineBusy: (String onUserLineBusy) {
},
));
The parameters are described below:
Parameter
Type
Description
userId
String
The user ID of the invitee who is busy.

onUserJoin

A user joined the call.
TUICallEngine.instance.addObserver(TUICallObserver(
onUserJoin: (String userId) {
}
));
The parameters are described below:
Parameter
Type
Description
userId
String
The ID of the user who joined the call.

onUserLeave

A user left the call.
TUICallEngine.instance.addObserver(TUICallObserver(
onUserLeave: (String userId) {
}
));
The parameters are described below:
Parameter
Type
Description
userId
String
The ID of the user who left the call.

onUserVideoAvailable

Whether a user is sending video.
TUICallEngine.instance.addObserver(TUICallObserver(
onUserVideoAvailable: (String userId, bool isVideoAvailable) {
}
));
The parameters are described below:
Parameter
Type
Description
userId
String
The user ID.
isVideoAvailable
bool
Whether the user has video.

onUserAudioAvailable

Whether a user is sending audio.
TUICallEngine.instance.addObserver(TUICallObserver(
onUserAudioAvailable: (String userId, bool isAudioAvailable) {
}
));
The parameters are described below:
Parameter
Type
Description
userId
String
The user ID.
isAudioAvailable
bool
Whether the user has audio.

onUserVoiceVolumeChanged

The volumes of all users.
TUICallEngine.instance.addObserver(TUICallObserver(
onUserVoiceVolumeChanged: (Map<String, int> volumeMap) {
}
));
The parameters are described below:
Parameter
Type
Description
volumeMap
Map<String, int>
The volume table, which includes the volume of each user (userId). Value range: 0-100.

onUserNetworkQualityChanged

The network quality of all users.
TUICallEngine.instance.addObserver(TUICallObserver(
onUserNetworkQualityChanged: (List<TUINetworkQualityInfo> networkQualityList) {
}
));

class TUINetworkQualityInfo {
String userId;
TUINetworkQuality quality;
TUINetworkQualityInfo({required this.userId, required this.quality});
}

enum TUINetworkQuality {
unknown,
excellent,
good,
poor,
bad,
vBad,
down
}
The parameters are described below:
Parameter
Type
Description
networkQualityList
The current network conditions for all users (userId).

onKickedOffline

The current user was kicked offline:At this time, you can prompt the user with a UI message and then invoke initagain.
TUICallEngine.instance.addObserver(TUICallObserver(
onKickedOffline: () {
}
));

onUserSigExpired

The user sig is expired:At this time, you need to generate a new userSig, and then invoke initagain.
TUICallEngine.instance.addObserver(TUICallObserver(
onUserSigExpired: () {
}
));