tencent cloud

Video on Demand

動向とお知らせ
製品アップデート情報
製品紹介
製品概要
Product Features
製品の機能
製品の強み
ユースケース
ソリューション
購入ガイド
課金概要
課金方式
購入ガイドライン
請求書の照会
支払い更新の説明
支払い延滞の説明
返金説明
クイックスタート
コンソールガイド
コンソールの説明
サービスの概要
アプリケーション管理
メディア管理
リソースパック管理
License Management
プラクティスチュートリアル
メディアのアップロード
オンデマンドメディアファイルのインテリジェントコールド化方法
ビデオ処理
配信と再生
イベント通知の受信方法
オリジンサーバーのマイグレーションツール
Live Recording
カスタムオリジンサーバーback-to-originの方法
ライブストリーミングハイライトクリップを VOD に永続化するためのガイド
EdgeOne を使用して VOD コンテンツを配信する方法
開発ガイド
メディアアップロード
メディア加工処理
ビデオAI
イベント通知
ビデオ再生
メディアファイルのダウンロード
サブアプリケーションシステム
エラーコード
Player+ドキュメント
Overview
Basic Concepts
Features
Free Demo
Free Trial License
Purchase Guide
SDK Download
Licenses
Player Guide
Integration (UI Included)
Integration (No UI)
Advanced Features
API Documentation
Player Adapter
Player SDK Policy
よくあるご質問
モバイル端末再生に関するご質問
料金
ビデオのアップロード
ビデオの公開
ビデオの再生
Web側の再生
全画面表示再生
データ統計
CAM関連
メディア資産冷却に関する質問
Agreements
Service Level Agreement
VOD ポリシー
プライバシーポリシー
データ処理とセキュリティ契約
お問い合わせ
用語集

TXSubtitleRenderModel

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-09-19 10:14:42

TXSubtitleRenderModel Overview

VOD player subtitle style rendering parameters.

Field Details

fontColor

Text color, in ARGB format. If not set, defaults to opaque white (0xFFFFFFFF).
public int fontColor

fontSize

Font size. If fontSize is set, canvasWidth and canvasHeight must be set; otherwise, the internal system does not know what size to reference for font rendering. If fontSize is not set, the internal system will use the default font size.
public float fontSize

fontScale

Font scaling, specifically for VTT. After setting fontScale, the final font size will be multiplied by fontScale to fit the video width. The default value of fontScale is 1.0.
public float fontScale;

familyName

Font family name. On Android, the default is "Roboto". If the string is not null, it is considered set; if it is null, it is considered not set.
public String familyName

canvasWidth

canvasWidth and canvasHeight are the dimensions of the subtitle render canvas. The aspect ratio of canvasWidth and canvasHeight must match the aspect ratio of the video; otherwise, the rendered text will be deformed. If not set, the player will use the size of the current video as the render canvas size.
public int canvasWidth

canvasHeight

canvasWidth and canvasHeight define the size of the subtitle render canvas. Their aspect ratio must match the video's aspect ratio; otherwise, rendered text will be distorted. If not specified, the player will use the current video's dimensions as the render canvas size.
public int canvasHeight

isBondFontStyle

Whether it is bold text, with the default value being normal font.
public boolean isBondFontStyle

outlineWidth

stroke width, if not set, the internal will use the default stroke width.
public float outlineWidth

outlineColor

Stroke color, in ARGB format. If not set, defaults to opaque black (0xFF000000).
public int outlineColor

lineSpace

Line spacing: if lineSpace is set, canvasWidth and canvasHeight must be set; if not set, the internal will use the default line spacing.
public float lineSpace

startMargin

startMargin, endMargin, and verticalMargin define the drawing area for subtitles. If not set, use the settings in the subtitle file; if the subtitle file does not define them, use the default.
Once startMargin, endMargin, and yMargin are set, and the subtitle file defines one or more of these parameters, they will override the corresponding parameters in the subtitle file. The following diagram illustrates the meaning of these parameters in horizontal writing direction. Use the notes for each parameter to understand.

The margin along the direction of subtitle text content varies in meaning based on different writing orientations. startMargin is a proportional value with a range of [0, 1], representing the proportion relative to the video image size.
For horizontal writing direction, startMargin represents the distance from the left side of the subtitle to the left side of the video image. For example, startMargin=0.05 means the margin is 0.05 times the video width (5%).
For vertical writing direction (regardless of right-to-left or left-to-right), startMargin represents the distance from the top of the subtitle to the top of the video image. For example, startMargin=0.05 means the margin is 0.05 times the video height (5%).
public float startMargin

endMargin

Margin along the direction of subtitle text content
public float endMargin

verticalMargin

Margin in the vertical subtitle text direction
public float verticalMargin

ヘルプとサポート

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

フィードバック