tencent cloud

Tencent Real-Time Communication

お知らせ・リリースノート
製品アップデート情報
Tencent Cloudオーディオビデオ端末SDKの再生アップグレードおよび承認チェック追加に関するお知らせ
TRTCアプリケーションのサブスクリプションパッケージサービスのリリースに関する説明について
製品の説明
製品概要
基礎概念
製品の機能
製品の強み
ユースケース
性能データ
購入ガイド
Billing Overview
無料時間の説明
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
課金に関するよくあるご質問
Refund Instructions
初心者ガイド
Demo体験
Call
コンポーネントの説明(TUICallKit)
Activate the Service
Run Demo
クイック導入
オフライン通知
Conversational Chat
クラウドレコーディング(TUICallKit)
AI Noise Reduction
インターフェースのカスタマイズ
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
公開ログ
よくある質問
ライブ配信
Billing of Video Live Component
Overview
Activating the Service (TUILiveKit)
Demo のクイックスタート
No UI Integration
UI Customization
Live Broadcast Monitoring
Video Live Streaming
Voice Chat Room
Advanced Features
Client APIs
Server APIs
Error Codes
Release Notes
FAQs
RTC Engine
Activate Service
SDKのダウンロード
APIコードサンプル
Usage Guidelines
クライアント側 API
高度な機能
RTC RESTFUL API
History
Introduction
API Category
Room Management APIs
Stream mixing and relay APIs
On-cloud recording APIs
Data Monitoring APIs
Pull stream Relay Related interface
Web Record APIs
AI Service APIs
Cloud Slicing APIs
Cloud Moderation APIs
Making API Requests
Call Quality Monitoring APIs
Usage Statistics APIs
Data Types
Appendix
Error Codes
コンソールガイド
アプリケーション管理
使用統計
監視ダッシュボード
開発支援
Solution
Real-Time Chorus
よくあるご質問
課金関連問題
機能関連
UserSig関連
ファイアウォールの制限の対応関連
インストールパッケージの圧縮に関するご質問
AndriodおよびiOS関連
Web端末関連
Flutter関連
Electron関連
TRTCCalling Web関連
オーディオビデオ品質関連
その他のご質問
旧バージョンのドキュメント
TUIRoom(Web)の統合
TUIRoom (Android)の統合
TUIRoom (iOS)の統合
TUIRoom (Flutter)の統合
TUIRoom (Electron)の統合
TUIRoom APIのクエリー
クラウドレコーディングと再生の実現(旧)
Protocols and Policies
セキュリティコンプライアンス認証
セキュリティホワイトペーパー
情報セキュリティの説明
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC ポリシー
プライバシーポリシー
データ処理とセキュリティ契約
用語集

TUICallEngine

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-02-26 14:17:50

TUICallEngine APIs

TUICallEngine is an audio/video call component that does not include UI elements. If TUICallKit does not meet your requirements, you can use the APIs of TUICallEngine to customize your project.

Overview

API
Description
Creates a TUICallEngine instance (singleton mode).
Terminates a TUICallEngine instance (singleton mode).
login
Authenticates the basic audio/video call capabilities.
on
Registers an event listener.
off
Unregisters an event listener.
call
Makes a one-to-one call.
accept
Accepts a call.
reject
Rejects a call.
ignore
Ignores a call.
hangup
Ends a call.
Changes the call type, for example, from video call to audio call.
Subscribes to the video stream of a remote user.
Unsubscribes from the video stream of a remote user.
Turns the camera on.
Switches between the front and rear cameras.
Turns the camera off.
Turns the mic on.
Turns the mic off.
Selects the audio playback device (receiver or speaker).
Set the rendering mode of video image.
Set the encoding parameters of video encoder.
Set beauty level, support turning off default beauty.
Sets the alias and profile photo.
Sets whether to enable multi-device login for TUICallEngine

Details

CreateInstance

This API is used to create a TUICallEngine singleton.
TUICallKit.CreateInstance();

destroyInstance

This API is used to terminate a TUICallEngine singleton.
TUICallKit.destroyInstance();

login

This API is used to initialize TUICallEngine. Call it to authenticate the call service and perform other required actions before you call other APIs.
login(
sdkAppId: number;
userId: string;
userSig: string;
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}
Parameter
Type
Description
sdkAppId
Number
The unique identifier SDKAppID for the audio and video application created in Tencent RTC Console.
userId
String
Customers define their own User ID based on their business. You can only include letters (a-z, A-Z), digits (0-9), underscores, and hyphens.
userSig
String
SDKSecretKey for the audio and video application created in Tencent RTC Console.

on

This API is used to register an event listener to listen for TUICallEvents events.
on(type: TUICallEvent, listener: (params: any) => void): void {}
Parameter
Type
Description
type
TUICallEvent
Registers an event listener.

off

This API is used to unregister an event listener.
off(type: TUICallEvent): void {}
Parameter
Type
Description
type
TUICallEvent
Unregister an event listener.

call

This API is used to make a (one-to-one) call.
call(
userId: string;
mediaType: MediaType;
callParams?: CallParams;
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}
Parameter
Type
Description
userId
string
The target user ID.
mediaType
MediaType
which can be video or audio. For details, please refer to MediaType.
callParams
An additional parameter, such as roomID, call timeout, offline push info,etc.For details, please refer to callParams

accept

This API is used to accept a call. After receiving the onCallReceived() callback, you can call this API to accept the call.
accept(
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}

reject

This API is used to reject a call. After receiving the onCallReceived() callback, you can call this API to reject the call.
reject(
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}

ignore

This API is used to ignore a call. After receiving the onCallReceived(), you can call this API to ignore the call. The caller will receive the onUserLineBusy callback.
ignore(
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}

hangup

This API is used to end a call.
hangup(
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}

switchCallMediaType

This API is used to change the call type.
switchCallMediaType(mediaType: MediaType): void {}
Parameter
Type
Description
mediaType
MediaType
The call type, which can be video or audio. For details, For details, please refer to MediaType.

startRemoteView

This API is used to subscribe to the video stream of a remote user. For it to work, make sure you call it after setRenderView.
startRemoteView(
userId: string;
viewId: string;
onPlaying: (params: any) => void;
onLoading: (params: any) => void;
): void {}
Parameter
Type
Description
userId
string
The target user ID.
viewId
string
The target view ID.

stopRemoteView

This API is used to unsubscribe from the video stream of a remote user.
stopRemoteView(userId: string;): void {}
Parameter
Type
Description
userId
string
The target user ID.

openCamera

This API is used to turn the camera on.
openCamera(
camera?: Camera;
viewId: string;
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;): void {}
Parameter
Type
Description
camera
Camera
This parameter is used to set the front and back cameras.
Camera.Front: Front camera.
Camera.Back: Rear camera.
viewId
string
The target view ID. We recommend that you set the view ID to the user's user ID

switchCamera

This API is used to switch between the front and rear cameras.
switchCamera(camera: Camera): void {}
Parameter
Type
Description
camera
Camera
This parameter is used to set the front and back cameras.
Camera.Front: Front camera.
Camera.Back: Rear camera.

closeCamera

This API is used to turn the camera off.
closeCamera(): void {}

openMicrophone

This API is used to turn the mic on.
openMicrophone(
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}

closeMicrophone

This API is used to turn the mic off.
closeMicrophone(
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}

selectAudioPlaybackDevice

This API is used to select the audio playback device (receiver or speaker). In call scenarios, you can use this API to turn on/off hands-free mode.
selectAudioPlaybackDevice(
device: AudioPlaybackDevice;
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}
Parameter
Type
Description
device
This parameter is used to set the front and back cameras.
AudioPlaybackDevice.Earpiece
AudioPlaybackDevice.Speakerphone

setVideoRenderParams

Set the rendering mode of video image.
setVideoRenderParams(
userId: string;
videoRender?: {
fillMode?: FillMode;
rotation?: Rotation;
};
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}
Parameter
Type
Description
userId
string
The target user ID.
fillMode
FillMode
the video image will be centered and scaled to fill the entire display area, where parts that exceed the area will be cropped. The displayed image may be incomplete in this mode.

rotation
Rotation
Rotation.Rotation_0: No rotation
Rotation.Rotation_90: Clockwise rotation by 90 degrees
Rotation.Rotation_180: Clockwise rotation by 180 degrees
Rotation.Rotation_270: Clockwise rotation by 0 degrees

setVideoEncoderParams

Set the encoding parameters of video encoder.
This setting can determine the quality of image viewed by remote users, which is also the image quality of on-cloud recording files.
setVideoEncoderParams(
videoEncoder?: {
resolution?: Resolution;
resolutionMode?: ResolutionMode;
};
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}
Parameter
Type
Description
resolution
Video resolution
resolutionMode
Video aspect ratio mode

setBeautyLevel

Set beauty level, support turning off default beauty.
setBeautyLevel(
level: number;
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}
Parameter
Type
Description
level
number
Beauty level,range: 0 - 9, 0 means turning off the effect, 9 means the most obvious effect.

setSelfInfo

This API is used to set the alias and profile photo. The alias cannot exceed 500 bytes, and the profile photo is specified by a URL.
setSelfInfo(
nickname: string;
avatar?: string;
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}
Parameter
Type
Description
nickname
string
The alias.
avatar
string
The URL of the profile photo.

enableMultiDeviceAbility

This API is used to set whether to enable multi-device login for TUICallEngine (supported by the Group Call package).
enableMultiDeviceAbility(
enable: boolean;
onSuccess?: (data: String) => void;
onError?: (errCode: number, errMsg: string) => void;
): void {}
Parameter
Type
Description
enable
boolean
set whether to enable multi-device login for TUICallEngine

ヘルプとサポート

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

フィードバック