Get specified position thumbnail of video resource
1. API Description
This API is used to get the thumbnail of the video resource at the specified position.
Request mode:
- V2.6.0 and above: POST [ip]/mwapi/V2.0/scene/get-source-thumbnail
- V2.5.0 and below: POST [ip]/mwapi/get-source-thumbnail
Administrator Rights |
Logged-in |
No |
Yes |
Name |
Required |
Type |
Description |
sourceId |
Yes |
Int |
Resource ID, the unique identifier of the audio file in the device, which can obtained via Get resource list |
mediaProgress |
Yes |
Int |
Video playback progress, ranging from 1 to 1,000,000 |
3. Output Parameters
Name |
Type |
Description |
info |
InfoData |
Thumbnail information |
Name |
Type |
Description |
sourceId |
Int |
Resource ID |
thumbnail |
ThumbnailDetail |
Thumbnail details |
Name |
Type |
Description |
encoding |
String |
Encryption method |
data |
String |
Encrypted data |
format |
String |
Thumbnail format |
4. Example
Getting the thumbnail of the video resource with ID 2001 at a playback progress of 50%.
{
"sourceId": 2001,
"mediaProgress": 500000
}
Output Example
{
"info": {
"sourceId": 2001,
"thumbnail": {
"data": "",
"encoding": "base64",
"format": "jpeg"
}
}
}
5. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Status |
Definition |
Description |
7 |
MW_STATUS_INVALID_ARG |
Missing required parameters |
HTTP Access to Thumbnails