Subtitle Callback Notification
Updated: 2023-12-29 00:20:31
Purpose
When users utilize the real-time subtitle or smart subtitle feature, after the subtitles are generated, the subtitle information is sent back to the specified address.
Callback Failure Retry
- If the interface does not return an HTTP status code of 200, it is considered that the user failed to process this callback. In the event of a failure, the callback will be retried 3 times.
Callback Parameter Description
Subtitle Generation Callback
- Request Method: POST
BODY Parameters:
| Parameter Name | Type and Range | Description |
|---|---|---|
| id | int | Subtitle ID |
| fileId | string | Recording video ID |
| userId | string | User ID |
| channelId | string | Channel ID |
| fileUrl | string | Video URL |
| srtUrl | string | Subtitle URL |
| language | string | Subtitle language: Chinese-中文, English-英语, Tagalog-他加禄语, Thai-泰语, Malay-马来语, Indonesian-印尼语, Lao-老挝语, Burmese-缅甸语, Vietnamese-越南语 |
| isOriginal | string | Whether it is the original audio subtitle: Y-Yes, N-No |
| source | String | Subtitle source: chatRealtimeSrt-Real-time subtitle, vodSmartSrt-Smart subtitle |
Callback Data Example
Example Request URL: https://www.example.com/xxx/callback?sign=d5079f2e8ba19e49bfd3d9575866d80f×tamp=1701964858687
Example Request Body (body parameter: application/json)
{
"id":751,
"fileId":"d188c39879d09bb39048e8dd8b5451bc",
"userId":"cc167950af",
"channelId":4422756,
"srtUrl":"https://polyv-chat.polyv.net/live/channel/srt/cc167950af/4422756/grva0uzdy8/English.srt",
"language":"English",
"isOriginal":"N",
"source":"chatRealtimeSrt"
}
How to Configure
Configure via the backend:
Log in to your account - Go to [Cloud Live] - Click [Developer Settings] - Click [Callback Settings] - Subtitle Generation Callback
Note: The submitted interface address must start with http:// or https://
