This API fetches the playback URL for a media file, such as video or audio, by its Media ID. Use this URL to play the media with the Alibaba Cloud Player SDK (for URL-based playback) or a third-party player.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:GetPlayInfo |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| MediaId |
string |
No |
The ID of the media asset. Note
Either |
86434e152b7d4f20be480574439fe*** |
| InputURL |
string |
No |
The input URL that you specified when registering the media asset. For more information, see RegisterMediaInfo. Note
Either |
http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 或 vod://****20b48fb04483915d4f2cd8ac**** |
| AuthTimeout |
integer |
No |
The validity period of the playback URL, in seconds. The value defaults to 3600, which is also the minimum. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| RequestId |
string |
A unique identifier for the request. |
******11-DB8D-4A9A-875B-275798****** |
| MediaBase |
object |
The media asset information. |
|
| CreationTime |
string |
The creation time of the media asset. |
2021-09-22T10:07:31+08:00 |
| Status |
string |
The status of the media asset. Valid values:
|
Normal |
| MediaId |
string |
A unique identifier for the media asset. |
2eea77a61c7b4ddd95bec34a6f65b*** |
| CoverURL |
string |
The URL of the cover image. |
https://***.oss-cn-shanghai.aliyuncs.com/cover/281c64d6-b5fb-4c57-97cd-84da56a8b151_large_cover_url.jpg |
| Title |
string |
The title of the media asset. |
testTitle |
| MediaType |
string |
The type of the media asset. Valid values: video and audio. |
video |
| MediaTags |
string |
The tags of the media asset.
|
test,ccc |
| CateId |
integer |
The ID of the category. You can obtain the category ID in one of the following ways:
|
4220 |
| Description |
string |
The description of the media asset. |
desc |
| PlayInfoList |
array<object> |
A list of playback information objects. |
|
|
object |
The details for a single audio or video stream. |
||
| CreationTime |
string |
The creation time of the media stream, in UTC and formatted as yyyy-MM-ddTHH:mm:ssZ. |
2022-05-10T02:28:49Z |
| Status |
string |
The status of the media stream. Valid values:
|
Normal |
| NarrowBandType |
string |
The Narrowband HD type. Valid values:
This parameter takes effect only when a definition is configured for a built-in Narrowband HD 1.0 transcoding template. For more information, see Transcoding template configurations - Definition. |
0 |
| Height |
integer |
The height of the media stream, in pixels. |
1080 |
| Bitrate |
string |
The bitrate of the media stream, in kbit/s. |
20 |
| ModificationTime |
string |
The last modification time of the media stream, in UTC and formatted as yyyy-MM-ddTHH:mm:ssZ. |
2022-05-13T11:39:41.714+08:00 |
| WatermarkId |
string |
The ID of the watermark associated with the media stream. |
5bed88672b1e2520ead228935ed51*** |
| Encrypt |
integer |
Indicates whether the media stream is encrypted. Valid values:
|
0 |
| Definition |
string |
The definition of the video stream. Valid values:
|
HD |
| EncryptType |
string |
The encryption type of the media stream. Valid values:
Note
If the encryption type is AliyunVoDEncryption, playback requires the Alibaba Cloud Player Software Development Kit (SDK). |
AliyunVoDEncryption |
| StreamType |
string |
The type of the media stream. Valid values are video and audio. |
video |
| Size |
integer |
The size of the media stream, in bytes. |
418112 |
| Width |
integer |
The width of the media stream, in pixels. |
1024 |
| Fps |
string |
The frame rate of the media stream, in frames per second. |
25 |
| Duration |
string |
The duration of the media stream, in seconds. |
9.0464 |
| PlayURL |
string |
The playback URL of the media stream. |
https://***.aliyuncdn.com/sv/756bee1-17f980f0945/756bee1-17f980f0945.mp4 |
| Format |
string |
The format of the media stream.
|
mp4 |
| HDRType |
string |
The HDR type of the media stream. Valid values:
|
HDR |
| BitDepth |
integer |
The color bit depth of the media stream. |
8 |
| FileURL |
string |
The OSS File URL. |
http://outin-***.oss-cn-shanghai.aliyuncs.com/sv/43a68ee9-181809b6aba/43a68ee9-181809b6aba.mpeg |
| TransTemplateType |
string |
The type of the transcoding template. Valid values:
|
Normal |
| StreamTags |
string |
Stream tags that identify the transcoding type. |
"{\"ims.audioServiceType\": \"AudioEnhancement\"}" |
| JobId |
string |
A unique identifier for the job. |
36c9d38e70bf43ed9f7f8f48d6356*** |
Examples
Success response
JSON format
{
"RequestId": "******11-DB8D-4A9A-875B-275798******",
"MediaBase": {
"CreationTime": "2021-09-22T10:07:31+08:00",
"Status": "Normal",
"MediaId": "2eea77a61c7b4ddd95bec34a6f65b***",
"CoverURL": "https://***.oss-cn-shanghai.aliyuncs.com/cover/281c64d6-b5fb-4c57-97cd-84da56a8b151_large_cover_url.jpg",
"Title": "testTitle",
"MediaType": "video",
"MediaTags": "test,ccc",
"CateId": 4220,
"Description": "desc"
},
"PlayInfoList": [
{
"CreationTime": "2022-05-10T02:28:49Z",
"Status": "Normal",
"NarrowBandType": "0",
"Height": 1080,
"Bitrate": "20",
"ModificationTime": "2022-05-13T11:39:41.714+08:00",
"WatermarkId": "5bed88672b1e2520ead228935ed51***",
"Encrypt": 0,
"Definition": "HD",
"EncryptType": "AliyunVoDEncryption",
"StreamType": "video",
"Size": 418112,
"Width": 1024,
"Fps": "25",
"Duration": "9.0464",
"PlayURL": "https://***.aliyuncdn.com/sv/756bee1-17f980f0945/756bee1-17f980f0945.mp4",
"Format": "mp4",
"HDRType": "HDR",
"BitDepth": 8,
"FileURL": "http://outin-***.oss-cn-shanghai.aliyuncs.com/sv/43a68ee9-181809b6aba/43a68ee9-181809b6aba.mpeg",
"TransTemplateType": "Normal",
"StreamTags": "\"{\\\"ims.audioServiceType\\\": \\\"AudioEnhancement\\\"}\"",
"JobId": "36c9d38e70bf43ed9f7f8f48d6356***"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.