You need to enable JavaScript to run this app.
导航

更新认真度检测配置信息

最近更新时间2023.12.13 11:38:43

首次发布时间2023.12.13 11:38:43

更新认真度检测配置信息。

注意事项

请求频率:单用户请求频率限制为 5 次/秒

请求说明

  • 请求方式:POST
  • 请求地址:https://livesaas.volcengineapi.com/?Action=UpdateAttentionDetectionConfig&Version=2023-08-01

请求参数

以下请求参数列表仅列出了该接口的部分公共参数,完整公共参数列表见公共请求参数

Query

参数类型是否必选示例值描述
ActionStringUpdateAttentionDetectionConfig接口名称。当前 API 的名称为 UpdateAttentionDetectionConfig
VersionString2023-08-01接口版本。当前 API 的版本为 2023-08-01

Body

参数类型是否必选示例值描述
ActivityIdLong1783308668443直播间 ID。您可以通过 ListActivityAPI 接口查询 ID。
AttentionDetectionConfigArrayArray of AttentionDetectionConfigArray-认真度检测配置信息列表。

AttentionDetectionConfigArray

参数类型是否必选示例值描述

IsOpen

Integer

1

是否开启检测开关。支持以下取值:

  • 1:开启
  • 2:关闭

ReminderCopy

String

保持专注学习,多多参与学习互动哦

提醒弹窗的提醒文案。

说明

当 AttentionDetectionType 取值为 1 时,最多支持输入 100 个字符,否则最多支持输入 50 个字符。若您配置了多语言,则每种语言最多支持输入的字符数和上述要求保存一致。有关如何配置多语言,详见认真度检测

AttentionDetectionType

Integer

4

认真度检测类型。支持以下取值:

  • 1:观看前提示
  • 2:切屏检测提醒
  • 3:静音停播提醒
  • 4:无互动检测提醒

DetectionRule

Object of DetectionRule

-

认真度检测规则。

说明

仅当 AttentionDetectionType 取值为 34 时,该参数必填,否则无需传入该参数。

DetectionRule

参数类型是否必选示例值描述
MinTimeInteger600认真度检测提醒弹窗的弹出时间。例如观众与观看页面无互动(如移动鼠标等)达到该时间后,弹出提醒弹窗。单位为秒。

返回参数

参数类型示例值描述
AttentionDetectionConfigArrayArray of AttentionDetectionConfigArrayResponse-认真度检测配置信息列表。

AttentionDetectionConfigArrayResponse

参数类型示例值描述

AttentionDetectionType

Integer

4

认真度检测类型。支持以下取值:

  • 1:观看前提示
  • 2:切屏检测提醒
  • 3:静音停播提醒
  • 4:无互动检测提醒

IsOpen

Integer

1

是否开启检测开关。支持以下取值:

  • 1:开启
  • 2:关闭
ReminderCopyString保持专注学习,多多参与学习互动哦提醒弹窗的提醒文案。
DetectionRuleObject of DetectionRuleResponse-认真度检测规则。

DetectionRuleResponse

参数类型示例值描述
MinTimeInteger600认真度检测提醒弹窗的弹出时间。例如观众与观看页面无互动(如移动鼠标等)达到该时间后,弹出提醒弹窗。单位为秒。

示例

请求示例

POST https://livesaas.volcengineapi.com/?Action=UpdateAttentionDetectionConfig&Version=2023-08-01

{
    "ActivityId":1783308668443,
    "AttentionDetectionConfigArray":[
        {
            "IsOpen":1,
            "ReminderCopy":"观看学习过程中保持专注认真,请不要在学习过程中持续切屏、静音播放、挂机学习哦",
            "AttentionDetectionType":1
        },
        {
            "IsOpen":1,
            "ReminderCopy":"保持专注学习,请不要在学习过程中离开当前页面哦",
            "AttentionDetectionType":2
        },
        {
            "IsOpen":1,
            "DetectionRule":{
                "MinTime":30
            },
            "ReminderCopy":"保持专注学习,请开启声音并持续收看哦",
            "AttentionDetectionType":3
        },
        {
            "IsOpen":1,
            "DetectionRule":{
                "MinTime":600
            },
            "ReminderCopy":"保持专注学习,多多参与学习互动哦",
            "AttentionDetectionType":4
        }
    ]
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20231127163926C6740782B6D034339B73",
        "Action": "UpdateAttentionDetectionConfig",
        "Version": "2019-10-10",
        "Service": "livesaas",
        "Region": "cn-north-1",
        "SystemTime": 1701074367
    },
    "Result": {
        "AttentionDetectionConfigArray": [
            {
                "AttentionDetectionType": 1,
                "IsOpen": 1,
                "ReminderCopy": "观看学习过程中保持专注认真,请不要在学习过程中持续切屏、静音播放、挂机学习哦",
                "DetectionRule": {
                    "MinTime": 0
                }
            },
            {
                "AttentionDetectionType": 2,
                "IsOpen": 1,
                "ReminderCopy": "保持专注学习,请不要在学习过程中离开当前页面哦",
                "DetectionRule": {
                    "MinTime": 0
                }
            },
            {
                "AttentionDetectionType": 3,
                "IsOpen": 1,
                "ReminderCopy": "保持专注学习,请开启声音并持续收看哦",
                "DetectionRule": {
                    "MinTime": 30
                }
            },
            {
                "AttentionDetectionType": 4,
                "IsOpen": 1,
                "ReminderCopy": "保持专注学习,多多参与学习互动哦",
                "DetectionRule": {
                    "MinTime": 600
                }
            }
        ]
    }
}

错误码

下表提供了该接口特有的错误码,公共错误码请参见公共错误码错误码文档。

状态码错误码错误信息说明
400InvalidParameter.AttentionDetectionTypeInvalidThe specified parameter AttentionDetectionType is invalid.AttentionDetectionType 参数错误。请修改后重试。
400InvalidParameter.DetectionRuleInvalidThe specified parameter DetectionRule is invalid.DetectionRule 参数错误。请修改后重试。
400InvalidParameter.ReminderCopyInvalidThe specified parameter ReminderCopy is invalid.ReminderCopy 参数错误。请修改后重试。
400InvalidParameter.AttentionDetectionConfigArrayInvalidThe specified parameter AttentionDetectionConfigArray is invalid.AttentionDetectionConfigArray 参数错误。请修改后重试。