获取视频字幕列表
更新时间:2023-08-15
接口描述
该接口用于获取视频字幕列表。
请求地址
https://spark.bokecc.com/api/video/subtitle/list
请求方式
GET
请求参数
以下请求参数需要进行THQS权限认证, 权限认证方式请参考THQS认证方式。
| 名称 |
类型 |
必填 |
描述 |
| userid |
String |
是 |
用户ID。 |
| videoid |
String |
是 |
视频ID。 |
请求示例
https://spark.bokecc.com/api/video/subtitle/list?videoid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&time=1691490289713&userid=xxxxxx&hash=F833D49E3E429944A702A1DE9732932D
返回数据
| 名称 |
类型 |
说明 |
| subtitles |
Array |
字幕列表 |
subtitles说明
| 名称 |
类型 |
说明 |
| id |
Integer |
字幕ID。 |
| srtName |
String |
字幕名称。 |
| srtNum |
Integer |
在双语字幕中的位置(1:上, 2:下)。 |
| subtitleModel |
Integer |
字幕显示模式(0:固定字号,1:自适应模式)。 |
| fontFamily |
String |
字幕字体。 |
| fontSize |
Integer |
字幕字体大小。 |
| fontColor |
String |
字幕字体颜色。 |
| fontSurroundColor |
String |
字体环绕颜色。 |
| marginBottom |
String |
距离底部百分比。 |
| fileEncode |
String |
字幕文件编码。 |
返回示例
{
"subtitles": [
{
"fontSize": 23,
"fontColor": "#666666",
"fontSurroundColor": "#000000",
"marginBottom": "9%",
"fileEncode": "utf-8",
"fontFamily": "黑体, SimHei",
"srtName": "字幕1",
"srtNum": 1,
"id": 8888,
"subtitleModel": 1
},
{
"fontSize": 23,
"fontColor": "#666666",
"fontSurroundColor": "#000000",
"marginBottom": "1%",
"fileEncode": "utf-8",
"fontFamily": "黑体, SimHei",
"srtName": "字幕2",
"srtNum": 2,
"id": 9999,
"subtitleModel": 1
}
]
}