tencent cloud

TXVodConstants
Last updated: 2025-05-30 15:08:44
TXVodConstants
Last updated: 2025-05-30 15:08:44

TXVodConstants API Introduction

Constant class used in VOD player

Image Tiling Mode

Value
Parameter Name
Description
0
RENDER_MODE_FULL_FILL_SCREEN
Video footage fills the screen.
1
RENDER_MODE_ADJUST_RESOLUTION
Video footage adapts to the screen.

Image Rendering Angle

Value
Parameter Name
Description
0
RENDER_ROTATION_PORTRAIT
portrait.
270
RENDER_ROTATION_LANDSCAPE
Rotate 90 degrees clockwise.

Playing Event List

Value
Parameter Name
Description
2002
VOD_PLAY_EVT_HIT_CACHE
Play start cache hit
2003
VOD_PLAY_EVT_RCV_FIRST_I_FRAME
Network reception receives the first video packet (IDR).
2004
VOD_PLAY_EVT_PLAY_BEGIN
Video playback start.
2005
VOD_PLAY_EVT_PLAY_PROGRESS
Video playback progress.
2006
VOD_PLAY_EVT_PLAY_END
Video playback end.
6001
VOD_PLAY_EVT_LOOP_ONCE_COMPLETE
Loop one round playback ends.
2007
VOD_PLAY_EVT_PLAY_LOADING
Video playback Loading.
2008
VOD_PLAY_EVT_START_VIDEO_DECODER
Decoder starts up.
2009
VOD_PLAY_EVT_CHANGE_RESOLUTION
Video resolution changed.
2010
VOD_PLAY_EVT_GET_PLAYINFO_SUCC
Successfully retrieve VOD file information.
2011
VOD_PLAY_EVT_CHANGE_ROTATION
Video rotation information.
2013
VOD_PLAY_EVT_VOD_PLAY_PREPARED
Video loading complete.
2014
VOD_PLAY_EVT_VOD_LOADING_END
loading complete.
2017
VOD_PLAY_EVT_FIRST_VIDEO_PACKET
Received the first frame of data (supported starting from version 12.0).
2019
VOD_PLAY_EVT_SEEK_COMPLETE
Seek completed (supported starting from version 10.3).
2020
VOD_PLAY_EVT_SELECT_TRACK_COMPLETE
Track switch completed.
2026
VOD_PLAY_EVT_RCV_FIRST_AUDIO_FRAME
First audio playback.
2103
VOD_PLAY_WARNING_RECONNECT
Network disconnection, auto reconnection started.
2030
VOD_PLAY_EVT_VIDEO_SEI
Video sei information event.
2031
VOD_PLAY_EVT_HEVC_DOWNGRADE_PLAYBACK
HEVC downgrade playback.
-2301
VOD_PLAY_ERR_NET_DISCONNECT
Network disconnection, multiple reconnection attempts failed.
-2303
VOD_PLAY_ERR_FILE_NOT_FOUND
File does not exist.
-2304
VOD_PLAY_ERR_HEVC_DECODE_FAIL
HEVC decoding failed.
-2305
VOD_PLAY_ERR_HLS_KEY
HLS decryption key acquisition failed.
-2306
VOD_PLAY_ERR_GET_PLAYINFO_FAIL
Failed to retrieve VOD file information.
2106
VOD_PLAY_WARNING_HW_ACCELERATION_FAIL
Hardware decoding startup failed, use software decoding.
-5
VOD_PLAY_ERR_INVALID_LICENCE
Invalid license, playback failure.
Before calling startVodPlay, you must configure the license using TXLiveBase#setLicence for successful playback; otherwise, playback will fail (black screen). The license only needs to be set globally once. Live stream publishing license, Short Video License, and player license can all be used. If you haven't obtained the above licenses yet, you can click Player License to apply. An official license requires purchase.
-6004
VOD_PLAY_ERR_SYSTEM_PLAY_FAIL
System player playback error.
-6006
VOD_PLAY_ERR_DECODE_VIDEO_FAIL
Video decoding error, video format not supported.
-6007
VOD_PLAY_ERR_DECODE_AUDIO_FAIL
Audio decoding error, audio format not supported.
-6008
VOD_PLAY_ERR_DECODE_SUBTITLE_FAIL
Subtitle decoding error.
-6009
VOD_PLAY_ERR_RENDER_FAIL
Video rendering error.
-6010
VOD_PLAY_ERR_PROCESS_VIDEO_FAIL
Video post-processing error.
-6101
VOD_PLAY_ERR_DRM
DRM playback failure

Playing Event Parameters

Value
Parameter Name
Description
"CPU_USAGE"
NET_STATUS_CPU_USAGE
Current instantaneous CPU utilization.
"VIDEO_WIDTH"
NET_STATUS_VIDEO_WIDTH
Video resolution - Width.
"VIDEO_HEIGHT"
NET_STATUS_VIDEO_HEIGHT
Video resolution - Height.
"NET_SPEED"
NET_STATUS_NET_SPEED
Current network data reception speed, unit: KBps.
"VIDEO_FPS"
NET_STATUS_VIDEO_FPS
Current streaming media video frame rate.
"VIDEO_BITRATE"
NET_STATUS_VIDEO_BITRATE
Current streaming media video bitrate, unit: bps.
"AUDIO_BITRATE";
NET_STATUS_AUDIO_BITRATE
Current streaming media audio bitrate, unit: bps.
"VIDEO_CACHE"
NET_STATUS_VIDEO_CACHE
Buffer (jitterbuffer) size, current buffer length is 0, indicating buffering is imminent, unit: KBps.
"SERVER_IP"
NET_STATUS_SERVER_IP
Connected server IP.
"EVT_UTC_TIME"
EVT_UTC_TIME
UTC time.
"EVT_TIME"
EVT_TIME
Event occurrence time.
"EVT_MSG"
EVT_DESCRIPTION
Event description.
"EVT_PARAM1"
EVT_PARAM1
Event parameter 1.
"EVT_PARAM2"
EVT_PARAM2
Event parameter 2.
"EVT_PLAY_COVER_URL"
EVT_PLAY_COVER_URL
Video cover.
"EVT_PLAY_URL"
EVT_PLAY_URL
Video address.
"EVT_PLAY_NAME"
EVT_PLAY_NAME
Video name.
"EVT_PLAY_DESCRIPTION"
EVT_PLAY_DESCRIPTION
Video description.
"EVT_PLAY_PROGRESS_MS"
EVT_PLAY_PROGRESS_MS
Playback progress (ms).
"EVT_PLAY_DURATION_MS"
EVT_PLAY_DURATION_MS
Playable duration (ms).
"EVT_PLAY_PROGRESS"
EVT_PLAY_PROGRESS
Playback progress.
"EVT_PLAY_DURATION"
EVT_PLAY_DURATION
Playable duration.
"EVT_PLAYABLE_DURATION_MS"
EVT_PLAYABLE_DURATION_MS
On-demand playable duration (ms).
"EVT_PLAYABLE_RATE"
EVT_PLAYABLE_RATE
Playback speed.
"EVT_PLAYABLE_DURATION"
EVT_PLAYABLE_DURATION
On-demand playable duration.
"EVT_IMAGESPRIT_WEBVTTURL"
EVT_IMAGESPRIT_WEBVTTURL
sprite sheet web vtt description file download URL.
"EVT_IMAGESPRIT_IMAGEURL_LIST"
EVT_IMAGESPRIT_IMAGEURL_LIST
sprite sheet image download URL.
"EVT_DRM_TYPE"
EVT_DRM_TYPE
encryption type.
"EVT_CODEC_TYPE"
EVT_CODEC_TYPE
video codec type.
"EVT_KEY_FRAME_CONTENT_LIST"
EVT_KEY_FRAME_CONTENT_LIST
video keyframe description.
"EVT_KEY_FRAME_TIME_LIST"
EVT_KEY_FRAME_TIME_LIST
keyframe time.
"EVT_PLAY_PDT_TIME_MS"
EVT_PLAY_PDT_TIME_MS
Playback PDT time (ms).
"EVT_KEY_VIDEO_ROTATION"
EVT_KEY_VIDEO_ROTATION
MP4 video rotation angle.
"EVT_KEY_WATER_MARK_TEXT"
EVT_KEY_WATER_MARK_TEXT
ghost watermark text (supported starting from version 11.5).

Playing Media Asset Type

Value
Parameter Name
Description
0
MEDIA_TYPE_AUTO
AUTO type.
1
MEDIA_TYPE_HLS_VOD
Adaptive bitrate playback of HLS VOD media.
2
MEDIA_TYPE_HLS_LIVE
Adaptive bitrate playback of HLS live media.
3
MEDIA_TYPE_FILE_VOD
Playback of common file VOD media such as MP4.
4
MEDIA_TYPE_DASH_VOD
Adaptive bitrate playback of DASH VOD media.

MP4 Encryption Level

Value
Parameter Name
Description
0
MP4_ENCRYPTION_LEVEL_NONE
MP4 Unencrypted playback.
2
MP4_ENCRYPTION_LEVEL_L2
L2, MP4 Local encrypted playback.

Unclassified Variable

Value
Parameter Name
Description
0
PLAYER_SYSTEM_MEDIA_PLAYER
System player.
1
PLAYER_THUMB_PLAYER
Proprietary player, supports software decoding, with better compatibility.
-1
INDEX_AUTO
Adaptive bitrate index flag.
"450"
PLAYER_OPTION_KEY_SUBTITLE_OUTPUT_TYPE
External subtitle output type configuration Key
"backup_url"
VOD_KEY_BACKUP_URL
Downgrade playback alternate URL Key.
"mimetype"
VOD_KEY_MIMETYPE
Playback resource Mimetype Key.
"text/x-subrip"
VOD_PLAY_MIMETYPE_TEXT_SRT
External subtitle in SRT format.
"text/vtt"
VOD_PLAY_MIMETYPE_TEXT_VTT
External subtitle in VTT format.
"EVT_KEY_WATER_MARK_TEXT"
EVT_KEY_WATER_MARK_TEXT
ghost watermark text (supported starting from version 11.5).
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback