更新时间:2024-04-11 GMT+08:00
分享

修改频道录制信息

功能介绍

修改频道录制信息。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

PUT /v1/{project_id}/ott/channels/record-settings

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID,获取方法请参考获取项目ID

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token,使用Token鉴权方式时必选。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

Access-Control-Allow-Internal

String

服务鉴权Token,服务开启鉴权,必须携带Access-Control-Allow-Internal访问服务。

Access-Control-Allow-External

String

服务鉴权Token,服务开启鉴权,必须携带Access-Control-Allow-External访问服务。

表3 请求Body参数

参数

是否必选

参数类型

描述

domain

String

频道推流域名

app_name

String

组名或应用名

id

String

频道ID。频道唯一标识,为必填项

record_settings

record_settings object

最大回看录制时长。在此时间段内会连续不断的录制,为必选项

单位:秒。取值为“0”时,表示不支持录制;最大支持录制14天

表4 record_settings

参数

是否必选

参数类型

描述

rollingbuffer_duration

Integer

最大回看录制时长。在此时间段内会连续不断的录制,为必选项

单位:秒。取值为“0”时,表示不支持录制;最大支持录制14天。

响应参数

状态码: 200

表5 响应Body参数

参数

参数类型

描述

result_code

String

错误码

result_msg

String

错误描述

domain

String

推流域名

app_name

String

组名或应用名,为必填项

id

String

频道ID。频道唯一标识,为必填项

sources

Array of SourceRsp objects

推流URL列表。创建频道时,只有入流协议为RTMP_PUSH时,会返回推流URL列表

表6 SourceRsp

参数

参数类型

描述

url

String

RTMP推流地址

bitrate

Integer

码率。

单位:bps。取值范围:0 - 104,857,600(100Mbps)

width

Integer

分辨率对应宽的值。取值范围:0 - 4096(4K)

height

Integer

分辨率对应高的值。取值范围:0 - 2160(4K)

enable_snapshot

Boolean

描述是否使用该流做截图

状态码: 400

表7 响应Body参数

参数

参数类型

描述

result_code

String

错误码

result_msg

String

错误描述

domain

String

推流域名

app_name

String

组名或应用名,为必填项

id

String

频道ID。频道唯一标识,为必填项

请求示例

PUT https://{endpoint}/v1/{project_id}/ott/channels/record-settings

{
  "domain" : "push.testott.hls.com",
  "app_name" : "ott",
  "id" : "test",
  "record_settings" : {
    "rollingbuffer_duration" : 3600
  }
}

响应示例

状态码: 200

Demo Information

{
  "result_code" : "LIVE.100000000",
  "result_msg" : "SUCCESS",
  "domain" : "push.testott.hls.com",
  "app_name" : "ott",
  "id" : "test"
}

状态码: 400

Error response

{
  "result_code" : "LIVE.103011019",
  "result_msg" : "The resource to access is not exists",
  "domain" : "push.testott.hls.com",
  "app_name" : "ott",
  "id" : "test2"
}

状态码

状态码

描述

200

Demo Information

400

Error response

错误码

请参见错误码

分享:

    相关文档

    相关产品