tencent cloud

TXVodSDKEventDef
Last updated: 2025-07-01 14:44:51
TXVodSDKEventDef
Last updated: 2025-07-01 14:44:51

TXVodSDKEventDef API Introduction

Constant class used in the on-demand player.

Video Resolution

TX_Enum_Type_VideoResolution
Value
Parameter Name
Description
0
VIDEO_RESOLUTION_TYPE_360_640
Recommended bitrate 800kbps.
1
VIDEO_RESOLUTION_TYPE_540_960
Suggested bitrate 1200kbps.
2
VIDEO_RESOLUTION_TYPE_720_1280
Suggested bitrate 1800kbps.
30
VIDEO_RESOLUTION_TYPE_1080_1920
Suggested bitrate 3000kbps.

Picture Quality Tier

TX_Enum_Type_VideoQuality
Value
Parameter Name
Description
1
VIDEO_QUALITY_STANDARD_DEFINITION
Standard Definition: Use a resolution of 360 × 640.
2
VIDEO_QUALITY_HIGH_DEFINITION
High Definition: Use a resolution of 540 × 960.
3
VIDEO_QUALITY_SUPER_DEFINITION
Ultra HD: Use a resolution of 720 × 1280.
4
VIDEO_QUALITY_LINKMIC_MAIN_PUBLISHER
Microphone-connected scenario, used by the main host.
5
VIDEO_QUALITY_LINKMIC_SUB_PUBLISHER
Microphone-connected scenario, used by the co-host (audience in the connection).
7
VIDEO_QUALITY_ULTRA_DEFINITION
Blu-ray: Use a resolution of 1080 × 1920.

Image Rotation Direction

TX_Enum_Type_HomeOrientation
Value
Parameter Name
Description
0
HOME_ORIENTATION_RIGHT
HOME key is on the right, landscape mode.
1
HOME_ORIENTATION_DOWN
HOME key is at the bottom, the most common vertical screen live streaming mode in mobile live streaming.
2
HOME_ORIENTATION_LEFT
HOME key is on the left, landscape mode.
3
HOME_ORIENTATION_UP
HOME key is at the top, vertical screen live streaming.

Video Fill Mode

TX_Enum_Type_RenderMode
Value
Parameter Name
Description
0
RENDER_MODE_FILL_SCREEN
Video fills the screen.
1
RENDER_MODE_FILL_EDGE
Video adapts to the screen.

Playing Event List

Value
Parameter Name
Description
2002
VOD_PLAY_EVT_HIT_CACHE
Start playback cache hit.
2003
VOD_PLAY_EVT_RCV_FIRST_I_FRAME
Render the first frame of the video.
2004
VOD_PLAY_EVT_PLAY_BEGIN
Playback start.
2005
VOD_PLAY_EVT_PLAY_PROGRESS
Video playback progress.
2006
VOD_PLAY_EVT_PLAY_END
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 on-demand 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
Video buffer complete.
2017
VOD_PLAY_EVT_VOD_PLAY_FIRST_VIDEO_PACKET
Received the first frame of data (supported starting from version 12.0).
2019
VOD_PLAY_EVT_VOD_PLAY_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
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
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 on-demand file information.
2106
PLAY_WARNING_HW_ACCELERATION_FAIL
Hardware decoding startup failed, use software decoding.
-5
VOD_PLAY_ERR_LICENCE_CHECK_FAIL
Invalid License, playback failure.
Before calling startVodPlay, you must configure license using TXLiveBase#setLicence to achieve 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 have not obtained the above licenses, you can click Player License to apply. An official license requires purchase.
-6004
VOD_PLAY_ERR_SYSTEM_PLAY_FAIL
System player playback error.
-6005
VOD_PLAY_ERR_DEMUXER_TIMEOUT
Decapsulation timeout.
-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
Rendering error in video.
-6010
VOD_PLAY_ERR_PROCESS_VIDEO_FAIL
Video post-processing error.
-6011
VOD_PLAY_ERR_DOWNLOAD_FAIL
Download error in video.
-6101
VOD_PLAY_ERR_DRM
DRM playback failure

Picture-In-Picture Controller Status

Value
Parameter Name
Description
0
TX_VOD_PLAYER_PIP_STATE_UNDEFINED
Invalid state.
1
TX_VOD_PLAYER_PIP_STATE_WILL_START
Picture-in-Picture will start soon.
2
TX_VOD_PLAYER_PIP_STATE_DID_START
Picture-in-Picture has already started.
3
TX_VOD_PLAYER_PIP_STATE_WILL_STOP
Picture-in-Picture will end soon.
4
TX_VOD_PLAYER_PIP_STATE_RESTORE_UI
Reset the UI.

Picture-In-Picture Error Type

Value
Parameter Name
Description
0
TX_VOD_PLAYER_PIP_ERROR_TYPE_NONE
No error.
1
TX_VOD_PLAYER_PIP_ERROR_TYPE_DEVICE_NOT_SUPPORT
Device or system version is not supported (PIP is only supported on iPad iOS9+).
2
TX_VOD_PLAYER_PIP_ERROR_TYPE_PLAYER_NOT_SUPPORT
Player is not supported.
3
TX_VOD_PLAYER_PIP_ERROR_TYPE_VIDEO_NOT_SUPPORT
Video is not supported.
4
TX_VOD_PLAYER_PIP_ERROR_TYPE_PIP_IS_NOT_POSSIBLE
PIP controller is unavailable.
5
TX_VOD_PLAYER_PIP_ERROR_TYPE_ERROR_FROM_SYSTEM
PIP controller reports an error.
10
TX_VOD_PLAYER_PIP_ERROR_TYPE_PLAYER_NOT_EXIST
Player object does not exist.
11
TX_VOD_PLAYER_PIP_ERROR_TYPE_PIP_IS_RUNNING
PIP feature is running.
12
TX_VOD_PLAYER_PIP_ERROR_TYPE_PIP_NOT_RUNNING
PIP feature is not started.
13
TX_VOD_PLAYER_PIP_ERROR_TYPE_PIP_START_TIMEOUT
PIP startup timed out.
20
TX_VOD_PLAYER_PIP_ERROR_TYPE_SEAMLESS_PIP_ERROR
Seamless PIP feature failed to start.
21
TX_VOD_PLAYER_PIP_ERROR_TYPE_SEAMLESS_PIP_NOT_SUPPORT
Seamless switching of PIP is not supported.
22
TX_VOD_PLAYER_PIP_ERROR_TYPE_SEAMLESS_PIP_IS_RUNNING
Seamless PIP feature is running.

AirPlay Status (System Player Only)

Value
Parameter Name
Description
0
TX_VOD_PLAYER_AIRPLAY_STATE_NOT_RUNNING
Not running.
1
TX_VOD_PLAYER_AIRPLAY_STATE_DID_RUNNING
Running.

AirPlay Error Type (System Player Only)

Value
Parameter Name
Description
0
TX_VOD_PLAYER_AIRPLAY_ERROR_TYPE_NONE
No error.
1
TX_VOD_PLAYER_AIRPLAY_ERROR_TYPE_PLAYER_NOT_SUPPORT
Player is not supported.
2
TX_VOD_PLAYER_AIRPLAY_ERROR_TYPE_VIDEO_NOT_SUPPORT
Video is not supported.
10
TX_VOD_PLAYER_AIRPLAY_ERROR_TYPE_PLAYER_INVALID
Player object is unavailable.
11
TX_VOD_PLAYER_AIRPLAY_ERROR_TYPE_PLAYER_STATE
Player status error.

External Subtitle Type

TX_VOD_PLAYER_SUBTITLE_MIME_TYPE
Value
Parameter Name
Description
0
TX_VOD_PLAYER_MIMETYPE_TEXT_SRT
External subtitle in SRT format.
1
TX_VOD_PLAYER_MIMETYPE_TEXT_VTT
External subtitle in VTT format.

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"
VOD_PLAY_EVENT_UTC_TIME
UTC time.
"EVT_BLOCK_DURATION"
VOD_PLAY_EVENT_BLOCK_DURATION
Lag time (ms).
"EVT_ERROR_CODE"
VOD_PLAY_EVT_ERROR_CODE
Player error code.
"EVT_TIME"
VOD_PLAY_EVENT_TIME
Event occurrence time.
"EVT_MSG"
VOD_PLAY_EVENT_MSG
Event description.
"EVT_PARAM1"
VOD_PLAY_EVENT_PARAM1
Event parameter 1.
"EVT_PARAM2"
VOD_PLAY_EVENT_PARAM2
Event parameter 2.
"EVT_GET_MSG"
VOD_PLAY_EVENT_GET_MSG
message content. When receiving the PLAY_EVT_GET_MESSAGE event, retrieve the message content through this field.
"EVT_PLAY_COVER_URL"
VOD_PLAY_EVENT_PLAY_COVER_URL
video cover
"EVT_PLAY_URL"
VOD_PLAY_EVENT_PLAY_URL
video address.
"EVT_PLAY_NAME"
VOD_PLAY_EVENT_PLAY_NAME
video name.
"EVT_PLAY_DESCRIPTION"
VOD_PLAY_EVENT_PLAY_DESCRIPTION
video description
"EVT_PLAY_PROGRESS"
VOD_PLAY_EVENT_PLAY_PROGRESS
Playback progress.
"EVT_PLAY_DURATION"
VOD_PLAY_EVENT_PLAY_DURATION
Total video duration.
"EVT_PLAYABLE_DURATION"
VOD_PLAY_EVENT_PLAYABLE_DURATION
Playable duration of on-demand content.
"EVT_IMAGESPRIT_WEBVTTURL"
VOD_PLAY_EVENT_IMAGESPRIT_WEBVTTURL
sprite sheet web vtt description file download URL.
"EVT_IMAGESPRIT_IMAGEURL_LIST"
VOD_PLAY_EVENT_IMAGESPRIT_IMAGEURL_LIST
sprite sheet image download URL.
"VOD_KEY_VIDEO_CODEC_TYPE"
VOD_KEY_VIDEO_CODEC_TYPE
video codec type
"VOD_KEY_BACKUP_URL_MEDIA_TYPE"
VOD_KEY_BACKUP_URL_MEDIA_TYPE
alternate playback resource (VOD_KEY_BACKUP_URL) corresponding type (added in versions 12.0).
"PARAM_MODULE_TYPE"
PLAYER_OPTION_PARAM_MODULE_TYPE
module type parameter
"PARAM_MODULE_CONFIG"
PLAYER_OPTION_PARAM_MODULE_CONFIG
module configuration
"ENABLE_SENSOR"
PLAYER_OPTION_PARAM_MODULE_VR_ENABLE_SENSOR
Whether sensors are enabled, default true.
"FOV"
PLAYER_OPTION_PARAM_MODULE_VR_FOV
Field of view, default 65.0f degrees, limit range 30.0f to 110.0f degrees.
"ANGLE_X"
PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_X
Horizontal rotation angle, positive value turns right, negative value turns left. 0° indicates the front direction, value range -180° to 180°.
"ANGLE_Y"
PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_Y
Vertical rotation angle, positive value rotates upward, negative value rotates downward. 0° indicates horizontal view, value range -85° to 85°.
"ANGLE_RATE"
PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_RATE
Gesture swipe distance to angle ratio, higher ratio means higher sensitivity, default value is 1/3.0f.
"ANGLE_SLOPE_THRESHOLD"
PLAYER_OPTION_PARAM_MODULE_VR_ANGLE_SLOPE_THRESHOLD
Rotation XY angle slope threshold, default value is 0.5f, only the long side is selected for rotation within the threshold range.
"EVT_KEY_FRAME_CONTENT_LIST"
VOD_PLAY_EVENT_KEY_FRAME_CONTENT_LIST
Video keyframe description.
"EVT_KEY_FRAME_TIME_LIST"
VOD_PLAY_EVENT_KEY_FRAME_TIME_LIST
Key frame time.
"EVT_PLAY_PDT_TIME_MS"
VOD_PLAY_EVENT_PLAY_PDT_TIME_MS
Playback PDT time (ms).
"VOD_KEY_CUSTOM_DATA"
VOD_KEY_CUSTOM_DATA
Custom passthrough reporting field Key (added in version 11.7).
"EVT_KEY_VIDEO_ROTATION"
VOD_PLAY_EVENT_KEY_VIDEO_ROTATION
MP4 video rotation angle.
"EVT_KEY_SELECT_TRACK_INDEX"
EVT_KEY_SELECT_TRACK_INDEX
External subtitle Event parameter return: switched media track index.
"EVT_KEY_SELECT_TRACK_ERROR_CODE"
EVT_KEY_SELECT_TRACK_ERROR_CODE

External subtitle Event parameter return: error code for switched media track.
"VOD_PLAY_BUFFERING_LOADING_TYPE"
VOD_PLAY_BUFFERING_LOADING_TYPE
Player Loading Type.
"MONET_AC_DO_ROTATE"
PLAYER_OPTION_PARAM_MODULE_VR_DO_ROTATE
VR rotation angle
"EVT_KEY_WATER_MARK_TEXT"
EVT_KEY_WATER_MARK_TEXT
Ghost watermark text (supported starting from version 11.5).
"EVT_KEY_SEI_TYPE"
EVT_KEY_SEI_TYPE
Video SEI type
"EVT_KEY_SEI_SIZE"
EVT_KEY_SEI_SIZE
Video SEI data buffer size.
"EVT_KEY_SEI_DATA"
EVT_KEY_SEI_DATA
Video SEI data buffer.

Player Media Asset Type

Value
Parameter Name
Description
0
MEDIA_TYPE_AUTO
auto type.
1
MEDIA_TYPE_HLS_VOD
adaptive bit rate playback HLS VOD media.
2
MEDIA_TYPE_HLS_LIVE
adaptive bit rate playback HLS live media.
3
MEDIA_TYPE_FILE_VOD
common file VOD media such as MP4.
4
MEDIA_TYPE_DASH_VOD
adaptive bit rate playback DASH VOD media.

MP4 Encryption Level

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

Module Type

TX_VOD_PLAYER_OPTION_PARAM_MODULE_TYPE
Value
Parameter Name
Description
0
PLAYER_OPTION_PARAM_MODULE_TYPE_NONE
Empty type, which means disabling features such as supersampling and VR.
1
PLAYER_OPTION_PARAM_MODULE_TYPE_SR
Supersampling Type
11
PLAYER_OPTION_PARAM_MODULE_TYPE_VR_PANORAMA
VR panorama model, monocular.
12
PLAYER_OPTION_PARAM_MODULE_TYPE_VR_BINOCULAR
VR panorama model, binocular.

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.
"VOD_KEY_BACKUP_URL"
VOD_KEY_BACKUP_URL
Downgrade playback alternate URL 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.


Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback