Release Notes
Announcements
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. |
public TXPlayInfoParams(int appId, String fileId, String pSign)
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 |
public TXPlayInfoParams(String url)
Parameter Name | Type | Description |
url | String | Play the resource address. |
public void setMediaType(int mediaType)
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). |
public void setHeaders(Map<String, String> headers)
Parameter Name | Type | Description |
headers | Map<String, String> | Custom Http header content. |
public void setEncryptedMp4Level(int level)
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. |
public void setPreferredAudioTrack(String audioTrackName)
Parameter Name | Type | Description |
audioTrackName | String | audio track name. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback