tencent cloud

最終更新日:2025-05-30 15:01:58
TXPlayerGlobalSetting
最終更新日: 2025-05-30 15:01:58

TXPlayerGlobalSetting API Introduction

Global configuration for on-demand player.

API Overview

API
Description
Set the Cache directory for the playback engine.
Set the maximum cache size for the playback engine.
Set the Drm certificate provider environment.
Set the list of domain addresses for Tencent Cloud PlayCGI hosts.

API Detail

setCacheFolderPath

Set the Cache directory for the playback engine. After configuration, the player and preloading will preferentially read from and store in this directory.
public static void setCacheFolderPath(String path)
Parameter Description
Parameter Name
Type
Description
path
String
Cache directory, Sdcard absolute path, null means caching is disabled.

setMaxCacheSize

Set the maximum cache size of the playback engine. After configuration, it will automatically clean up files in the Cache directory based on the specified value. Unit: MB.
public static void setMaxCacheSize(int sizeMB)
Parameter Description
Parameter Name
Type
Description
sizeMB
int
Maximum cache size, unit: MB.

setDrmProvisionEnv

Set the Drm certificate provider environment (Note: Supported starting from version 11.2).
public static void setDrmProvisionEnv(DrmProvisionEnv env)
Parameter Description
Parameter Name
Type
Description
env
DrmProvisionEnv
Set the Drm certificate provider environment (Note: Supported starting from version 11.2). Optional values:
TXPlayerGlobalSetting.DrmProvisionEnv#DRM_PROVISION_ENV_COM, representing the use of google COM domain name certificate provider.
TXPlayerGlobalSetting.DrmProvisionEnv#DRM_PROVISION_ENV_CN, representing the use of google CN domain name certificate provider.

setPlayCGIHosts

Set the list of domain addresses for Tencent Cloud PlayCGI hosts. When the request to the built-in domain fails, the set backup domain name will be enabled.
public static void setPlayCGIHosts(List<String> hosts)
Parameter Description
Parameter Name
Type
Description
hosts
List<String>
Domain address list, domain name format: playvideo.qcloud.com.
この記事はお役に立ちましたか?
営業担当者に お問い合わせ いただくか チケットを提出 してサポートを求めることができます。
はい
いいえ

フィードバック