频道直播录制打点功能
接口描述
1、设置直播录制打点
2、接口支持https协议接口URL
https://api.polyv.net/live/v3/channel/record/add-breakpoint请求方式
POST接口约束
请求参数描述
参数名
必选
类型
说明
示例
响应参数描述
参数名
类型
说明
Java请求示例
响应示例
Last updated
1、设置直播录制打点
2、接口支持https协议https://api.polyv.net/live/v3/channel/record/add-breakpointPOSTLast updated
https://api.polyv.net/live/v3/channel/record/add-breakpointappId=frlr1zazn3&origin=playback&sign=01556AABE64ED5C285FF5378392FCD8C&channelId=10003&type=pauseprivate static final Logger log = LoggerFactory.getLogger(ChannelRecordTest.class);
/**
* 频道直播录制打点
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void testAddBreakPoint() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String userId = super.userId;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "https://api.polyv.net/live/v3/channel/record/add-breakpoint";
String channelId = "2139283";
String type = "pause";
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("channelId", channelId);
requestMap.put("type", type);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.postFormBody(url, requestMap);
log.info("测试修直播录制打点,返回值:{}", response);
//do somethings
}{
"code":200,
"status":"success",
"message":"",
"data":true
}{
"code": 400,
"status": "error",
"message": "invalid signature.",
"data": ""
}{
"code": 400,
"status": "error",
"message": "channel in no live",//频道在直播中才能设置
"data": ""
}