tencent cloud

Tencent Real-Time Communication

소식 및 공지 사항
제품 업데이트
Tencent Cloud 오디오/비디오 단말 SDK 재생 업그레이드 및 권한 부여 인증 추가
TRTC 월간 구독 패키지 출시 관련 안내
제품 소개
제품 개요
기본 개념
제품 기능
제품 장점
응용 시나리오
성능 데이터
구매 가이드
Billing Overview
무료 시간 안내
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
과금 FAQ
Refund Instructions
신규 사용자 가이드
Demo 체험
Call
개요(TUICallKit)
Activate the Service
Run Demo
빠른 통합(TUICallKit)
오프라인 푸시
Conversational Chat
온클라우드 녹화(TUICallKit)
AI Noise Reduction
UI 사용자 정의
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
릴리스 노트
FAQs
라이브 스트리밍
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 클라이언트 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
FAQs
과금 개요
기능 관련
UserSig 관련
방화벽 제한 처리
설치 패키지 용량 축소 관련 질문
Andriod 및 iOS 관련
Web 관련
Flutter 관련
Electron 관련
TRTCCalling Web 관련
멀티미디어 품질 관련
기타 질문
Protocols and Policies
컴플라이언스 인증
보안 백서
정보 보안에 관한 참고 사항
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC 정책
개인 정보 보호 정책
데이터 처리 및 보안 계약
용어집

Upgrade Guide

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2024-12-06 11:45:09
This documentation is intended to guide participants to upgrade tencent_trtc_cloud to the new version tencent_rtc_sdk. During the upgrade process, we will detail the necessary procedures, precautions, and potential issues and solutions to ensure a smooth transition to the new version.

Upgrade Guide

Note:
Before performing the upgrade, make sure to back up your current project.
tencent_rtc_sdk currently does not support tencent_trtc_cloud's tx_beauty_manager.
tencent_rtc_sdk temporarily has no plans to support the web end. If your project involves the web end of tencent_trtc_cloud, we do not recommend upgrading.

1. Introduce new SDK

Enter the project directory in the console:
cd <path to your flutter project>
Remove old version tencent_trtc_cloud
flutter pub remove tencent_trtc_cloud
Introduce new version tencent_rtc_sdk
flutter pub add tencent_rtc_sdk

2. Replace import package

You can use the replace/batch replace feature provided by the IDE to replace tencent_trtc_cloud imports in your current project with tencent_rtc_sdk.
Note:
If you use the GenerateTestUserSig from our tencent_trtc_cloud example to generate your project's userSig, please remove the JsGenerateTestUserSig related logic.

3. Replace TRTCCloudDef enumerated values

tencent_rtc_sdk removed the TRTCCloudDef class provided in tencent_trtc_cloud. Various static variables in the class have been split into numerous Dart enums for your convenience in using some parameters.
For the TRTCCloudDef class used in your existing project, you can refer to the comparison table below to replace static variables with corresponding enums:
tencent_trtc_cloud
tencent_rtc_sdk
TRTCCloudDef.TRTC_VIDEO_RESOLUTION_*
TRTCVideoResolution
TRTCCloudDef.TRTC_VIDEO_RESOLUTION_MODE_*
TRTCVideoResolutionMode
TRTCCloudDef.TRTC_VIDEO_STREAM_TYPE_*
TRTCVideoStreamType
TRTCCloudDef.TRTC_QUALITY_*
TRTCQuality
TRTCCloudDef.TRTC_VIDEO_RENDER_MODE_*
TRTCVideoFillMode
TRTCCloudDef.TRTC_VIDEO_ROTATION_*
TRTCVideoRotation
TRTCCloudDef.TRTC_BEAUTY_STYLE_*
TRTCBeautyStyle
TRTCCloudDef.TRTC_VIDEO_PIXEL_FORMAT_*
TRTCVideoPixelFormat
TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_*
TRTCVideoMirrorType
TRTCCloudDef.TRTC_APP_SCENE_*
TRTCAppScene
TRTCCloudDef.TRTCRole*
TRTCRoleType
TRTCCloudDef.VIDEO_QOS_CONTROL_*
TRTCQosControlMode
TRTCCloudDef.TRTC_VIDEO_QOS_PREFERENCE_*
TRTCVideoQosPreference
TRTCCloudDef.TRTC_AUDIO_QUALITY_*
TRTCAudioQuality
TRTCCloudDef.TRTC_AUDIO_ROUTE_*
TXAudioRoute
(speakerPhone & earpiece)
TRTCCloudDef.TRTC_REVERB_TYPE_
TXVoiceReverbType
TRTCCloudDef.TRTC_VOICE_CHANGER_TYPE_*
TXVoiceChangerType
TRTCCloudDef.TRTC_AUDIO_FRAME_FORMAT_*
TRTCAudioFrameFormat
TRTCCloudDef.TRTCSystemVolumeType*
(Not supported)
TRTCCloudDef.TRTC_DEBUG_VIEW_LEVEL_*
(Not supported)
TRTCCloudDef.TRTC_LOG_LEVEL_*
TRTCLogLevel
TRTCCloudDef.TRTC_GSENSOR_MODE_*
TRTCGSensorMode
TRTCCloudDef.TRTC_TranscodingConfigMode_*
(Deprecated)
TRTCCloudDef.TRTC_VideoView_*
(Not supported)
TRTCCloudDef.TXMediaDeviceType*
TXMediaDeviceType
TRTCCloudDef.TRTCRecordType*
TRTCLocalRecordType

4. Modify Callback Usage

In tencent_trtc_cloud, callbacks need to be captured by users using switch or if statements, and the JSON strings need to be manually parsed to obtain the relevant data. This usage method may cause inconvenience to users. Therefore, we optimized the callback mechanism in tencent_rtc_sdk to improve the user access experience, making it more convenient and efficient.

Example (TRTCCloudListener):

In the new callback mechanism, registerListener no longer requires a function as a parameter, but a TRTCCloudListener object. You can selectively assign values to the required callback functions when initializing this object:
TRTCCloudListener speedTestListener = TRTCCloudListener(
onSpeedTestResult: (result) {
// TODO
}
);

5. Invoke new method

In this upgrade, we have removed some interfaces marked as deprecated by native TRTC and optimized the calling methods of some interfaces.
You can find all the interfaces we currently support in the API overview.
Note:
Except for the TRTCCloud.sharedInstance() interface, all interfaces in tencent_rtc_sdk are synchronous calls.

6. Platform Configuration

Please configure as follows in your project's android/app/build.gradle:
android {
...
packagingOptions {
pickFirst 'lib/**/libliteavsdk.so'
}
...
}
Note:
tencent_rtc_sdk uses FFI to call most of the TRTC interfaces, so it has certain requirements for your Android environment. Please ensure your Android environment supports CMake 3.13 or higher.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백