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 정책
개인 정보 보호 정책
데이터 처리 및 보안 계약
용어집

Android&iOS&Windows&Mac

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2024-07-24 14:29:06
본 문서는 TRTC 방 퇴장 방법과 어떤 경우에 사용자가 강제 퇴장 당할 수 있는지 설명합니다.



호출 가이드

1단계: 필수 단계 수행

빠른 통합(iOS)에 설명된 대로 SDK를 가져오고 애플리케이션 권한을 구성합니다. 방 입장의 안내에 따라 방 입장 절차를 진행합니다.

2단계: 현재 방에서 퇴장

exitRoom API를 호출하여 현재 방을 나가면 SDK는 onExitRoom(int reason) 콜백 이벤트를 통해 방 퇴장 이유를 알려줍니다.
Android
iOS&Mac
Windows
// 현재 방 퇴장
mCloud.exitRoom();

self.trtcCloud = [TRTCCloud sharedInstance];
// 현재 방 퇴장
[self.trtcCloud exitRoom];

trtc_cloud_ = getTRTCShareInstance();
// 현재 방 퇴장
trtc_cloud_->exitRoom();

exitRoom API가 호출된 후 SDK는 두 가지 주요 작업을 완료해야 하는 방 퇴장 프로세스에 들어갑니다.
핵심 과제1: 현재 사용자 퇴장 알림 방의 다른 사용자에게 다가오는 방 퇴장을 알리면 현재 사용자로부터 onRemoteUserLeaveRoom 콜백을 받게 됩니다. 그렇지 않으면 다른 사용자가 현재 사용자의 비디오 이미지가 ‘정지’된 것으로 간주할 수 있습니다.
핵심 과제2: 디바이스 권한 철회 현재 사용자가 방을 나가기 전에 오디오/비디오 스트림을 게시하는 경우 사용자는 방을 나가는 동안 카메라와 마이크를 끄고 장치 권한을 해제해야 합니다.
따라서 onExitRoom 콜백을 수신한 후 TRTCCloud 인스턴스를 해제하는 것이 좋습니다.

3단계: 강제로 현재 방 퇴장

onExitRoom(int reason) 콜백은 활성 방 퇴장 외에 다른 두 가지 경우에도 수신됩니다.
사례1: 사용자가 방에서 퇴장 당한 경우RemoveUser | RemoveUserByStrRoomId를 사용할 수 있습니다. 사용자를 TRTC 방에서 퇴장시키는 API입니다. 퇴장 당한 사용자는 onExitRoom(1) 콜백을 받게 됩니다.
사례2: 현재 방이 해산됨DismissRoom | DismissRoomByStrRoomId API를 호출하여 TRTC 방을 해산할 수 있습니다. 방이 해산되면 방에 있는 모든 사용자가 onExitRoom(2) 콜백을 받습니다.
Android
iOS&Mac
Windows
// 방 퇴장 이유를 얻기 위해 onExitRoom 콜백 수신
@Override
public void onExitRoom(int reason) {
if (reason == 0) {
Log.d(TAG, "Exit current room by calling the 'exitRoom' api of sdk ...");
} else if (reason == 1) {
Log.d(TAG, "Kicked out of the current room by server through the restful api...");
} else if (reason == 2) {
Log.d(TAG, "Current room is dissolved by server through the restful api...");
}
}

// 방 퇴장 이유를 얻기 위해 onExitRoom 콜백 수신
- (void)onExitRoom:(NSInteger)reason {
if (reason == 0) {
NSLog(@"Exit current room by calling the 'exitRoom' api of sdk ...");
} else if (reason == 1) {
NSLog(@"Kicked out of the current room by server through the restful api...");
} else if (reason == 2) {
NSLog(@"Current room is dissolved by server through the restful api...");
}
}

// 방 퇴장 이유를 얻기 위해 onExitRoom 콜백 수신
void onExitRoom(int reason) {
if (reason == 0) {
printf("Exit current room by calling the 'exitRoom' api of sdk ...");
} else if (reason == 1) {
printf("Kicked out of the current room by server through the restful api...");
} else if (reason == 2) {
printf("Current room is dissolved by server through the restful api...");
}
}


도움말 및 지원

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

피드백