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 ポリシー
プライバシーポリシー
データ処理とセキュリティ契約
用語集

Flutter

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-07-30 12:02:50

Overview

Unlike the ubiquitous vertical screen experience of mobile live streaming, Tencent Real-Time Communication (TRTC) must accommodate both landscape and portrait viewing modes, thereby requiring extensive handling of screen orientation. This article primarily discusses:
The implementation of the portrait mode pattern, for instance: WeChat's video calling is a typical example of the portrait experience pattern.
The execution of the landscape mode pattern, for example: Multi-person audio-video room applications (like Little Fish Easy Connection) typically adopt the landscape mode pattern.
How to customize the control of the rotation direction and fill pattern for both local and remote images.




Supported Platforms

iOS
Android
macOS
Windows
Electron
Flutter
Web
×

Portrait pattern

To realize a WeChat-like video call experience pattern, two tasks must be performed:

1. Configure the App's UI to display in portrait mode

iOS platform
Android platform
You can directly set this in Xcode's General > Deployment Info > Device Orientation:


By setting the screenOrientation attribute of the activity to portrait, one can specify that this interface is in portrait pattern
<activity android:name=".trtc.TRTCMainActivity" android:launchMode="singleTask" android:windowSoftInputMode="adjustPan"
android:screenOrientation="portrait" />

2. Configuration SDK utilizing vertical screen resolution

Whilst utilizing the TRTCCloud's setVideoEncoderParam setting for video coding parameters, specifying videoResolutionMode as TRTCVideoResolutionMode.portrait will suffice. Below is the exemplar code:
_trtcCloud.setVideoEncoderParam(
TRTCVideoEncParam(
videoFps: 15,
videoResolution: TRTCVideoResolution.res_640_360,
videoBitrate: 600,
videoResolutionMode: TRTCVideoResolutionMode.portrait,
)
);

Landscape mode

If you wish for the App to have a landscape orientation experience, the work you need to carry out is similar to that of the portrait pattern. You simply need to adjust the parameters in the first and second steps accordingly.
Specifically in the second step, the value of videoResolutionMode in TRTCVideoEncParam should be: TRTCVideoResolutionMode.landscape.

Tailored Control

The TRTC SDK provides interface functions to manipulate both the local and remote screen's rotation direction and fill pattern:
Interface Function
Functionality
Annotation Note
Establishing the clockwise rotation angle of the encoder output display
Supports rotation in two directions: 0 and 180 degrees clockwise

GSensorMode

Given the various compatibility issues involved in screen rotation, recording, and CDN live streaming, TRTC SDK only provides a simple gravity-sensing adaptive function. You can enable this via the setGravitySensorAdaptiveMode interface of TRTCCloud.
This function supports 90-degree, 180-degree and 270-degree rotation adaptation. That is, when the user's own phone rotates, the orientation of the image seen by others remains unchanged. Furthermore, this adaptation is based on adjustments to the encoder's direction. Therefore, recorded videos, as well as images viewed on mini-programs and H5 end, can maintain the original orientation.
Note:
Another implementation of gravity-sensing adaptation involves encoding the gravity direction of each video frame, and then adaptively adjusting the rendering direction at the end of the remote user. However, this embodiment requires the introduction of additional transcoding resources to solve the problem of keeping the direction of the recorded video consistent with the expected video direction. Therefore, it is not recommended.



ヘルプとサポート

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

フィードバック