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

TXPlayInfoParams

PDF
Focus Mode
Font Size
Last updated: 2025-05-30 15:08:59

TXPlayInfoParams API Introduction

VOD player plays media parameters, and you can configure Tencent Cloud fileId and url playback through TXPlayInfoParams.

API Overview

API
Description
Create a media instance that plays via Tencent Cloud VOD fileId.
Create a media instance that plays through URL.
Set the media asset type for player playback.
Set the Http header.
Set MP4 encrypted playback.
Set the preferred audio track for playback startup.

API Details

TXPlayInfoParams:fileId

Create a media instance that plays via Tencent Cloud VOD fileId.
public TXPlayInfoParams(int appId, String fileId, String pSign)
Parameter Description
Parameter Name
Type
Description
appId
int
Tencent Cloud Video on Demand (VOD) application appId.
fileId
String
Tencent Cloud Video on Demand (VOD) resource fileId.
pSign
String
Playback signature

TXPlayInfoParams:url

Create a media instance that plays through url.
public TXPlayInfoParams(String url)
Parameter Description
Parameter Name
Type
Description
url
String
Play the resource address.

setMediaType

Set the media type.
public void setMediaType(int mediaType)
Parameter Description
Parameter Name
Type
Description
mediaType
int
Set the media asset type. The default is AUTO type. Optional values:
TXVodConstants#MEDIA_TYPE_AUTO, AUTO type (default value, adaptive bit rate playback not supported).
TXVodConstants#MEDIA_TYPE_HLS_VOD, HLS VOD media.
TXVodConstants#MEDIA_TYPE_HLS_LIVE, HLS live media.
TXVodConstants#MEDIA_TYPE_FILE_VOD, common file VOD media such as MP4 (supported starting from version 11.2).
TXVodConstants#MEDIA_TYPE_DASH_VOD, DASH VOD media (supported starting from version 11.2).

setHeaders

Customize the player configuration to play the Http header carried during the online process.
public void setHeaders(Map<String, String> headers)
Parameter Description
Parameter Name
Type
Description
headers
Map<String, String>
Custom Http header content.

setEncryptedMp4Level

Set MP4 encrypted playback, not encrypted (default).
public void setEncryptedMp4Level(int level)
Parameter Description
Parameter Name
Type
Description
level
int
Set MP4 playback and storage encryption levels, supported starting from Player Premium 12.2, currently supports:
TXVodConstants#MP4_ENCRYPTION_LEVEL_NONE: No encryption playback, supported by default.
TXVodConstants#MP4_ENCRYPTION_LEVEL_L2: MP4 local encryption playback.

setPreferredAudioTrack

Set the preferred audio track for playback startup. Supported starting from Player Premium version 12.3.
In the pre-download scenario, configure to preferentially download the audio track.
public void setPreferredAudioTrack(String audioTrackName)
Parameter Description
Parameter Name
Type
Description
audioTrackName
String
audio track name.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback