PostVodPlaylist接口用于为指定的LiveChannel生成一个点播用的播放列表。OSS会查询指定时间范围内由该LiveChannel推流生成的ts文件,并将其拼装为一个m3u8播放列表。

请求语法

POST /ChannelName/PlaylistName?vod&endTime=EndTime&startTime=StartTime HTTP/1.1
Date: GMT date
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Authorization: SignatureValue

请求参数

名称类型是否必选示例值描述
ChannelName字符串test-channel指定LiveChannel名称,该LiveChannel必须存在。
PlaylistName字符串vod.m3u8指定生成的点播播放列表的名称,必须以“.m3u8”结尾。
StartTime整数1472020031指定查询ts文件的起始时间,格式为Unix时间戳,单位为秒。
重要 仅当ts文件的开始时间(即GetVodPlaylist返回的ts文件时间戳)在StartTime与EndTime指定的时间范围内,生成的.m3u8播放列表才会包含ts文件。
EndTime整数1472020226指定查询ts文件的终止时间,格式为Unix时间戳,单位为秒。
说明 EndTime必须大于StartTime,且时间跨度不能大于1天。

此接口还需要包含Host、Date等公共请求头。更多信息,请参见公共请求头(Common Request Headers)

响应头

此接口仅涉及公共响应头。更多信息,请参见公共响应头(Common Response Headers)

示例

请求示例

POST /test-channel/vod.m3u8?vod&endTime=1543895706266&startTime=1543895706263 HTTP/1.1
Date: Thu, 25 Aug 2016 07:13:26 GMT
Host: examplebucket.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS YJjHKOKWDWINLKXv:ABIigvnLtCHK+7fMHLeRlOUn****

返回示例

HTTP/1.1 200
content-length: 0
server: AliyunOSS
connection: close
etag: "9C6104DD9CF1A0C4D0CFD21F4390****"
x-oss-request-id: 57BE9A96B92475920B002359
date: Thu, 25 Aug 2016 07:13:26 GMT