- API使用说明
- 1 鉴权
- 2 设备
- 3 接口
- 4 屏幕
- 5 图层
- 6. 场景
- 7 图库
6.3 单场景应用
开发中
POST
/v1/preset/apply
请求参数
Header 参数
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
presetId
string
场景guid
serial
integer
场景坑位
targetRegion
integer
要应用的区域
auxiliary
object
辅助信息
keyFrame
object
必需
effect
object
场景播放特效开关
switchEffect
object
全局切换特效设置
swapEnable
number
必需
screens
array [object {1}]
可选
示例
{
"presetId": "string",
"serial": 0,
"targetRegion": 0,
"auxiliary": {
"keyFrame": {
"enable": 0
},
"effect": {
"enable": 0
},
"switchEffect": {
"time": 0,
"type": 0,
"wipe": {
"image": 0,
"symmetry": 0,
"posX": 0,
"posY": 0,
"frameW": 0,
"frameS": 0,
"direction": 0,
"source": {
"general": {
"sourceId": 0,
"sourceType": 0
}
}
},
"dve": {
"type": 0,
"image": 0,
"brightness": 0,
"softness": 0,
"directionDev": 0,
"directionEffect": "string",
"keySource": {
"general": {
"sourceId": 0,
"sourceType": 0
}
},
"KeySourceReverse": 0,
"source": {
"general": {
"sourceId": 0,
"sourceType": 0
}
}
},
"stinger": {
"playStartTime": 0,
"mixtureTime": 0,
"mixtureStartTime": 0,
"matting": 0,
"brightness": 0,
"softness": 0,
"source": {
"general": {
"sourceId": 0,
"sourceType": 0
}
}
},
"dip": {
"source": {
"general": {
"sourceId": 0,
"sourceType": 0
}
}
}
},
"swapEnable": 0,
"screens": [
{
"guid": "string"
}
]
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://prod-cn.your-api-server.com/v1/preset/apply' \
--header 'Content-Type: application/json' \
--data-raw '{
"presetId": "string",
"serial": 0,
"targetRegion": 0,
"auxiliary": {
"keyFrame": {
"enable": 0
},
"effect": {
"enable": 0
},
"switchEffect": {
"time": 0,
"type": 0,
"wipe": {
"image": 0,
"symmetry": 0,
"posX": 0,
"posY": 0,
"frameW": 0,
"frameS": 0,
"direction": 0,
"source": {
"general": {
"sourceId": 0,
"sourceType": 0
}
}
},
"dve": {
"type": 0,
"image": 0,
"brightness": 0,
"softness": 0,
"directionDev": 0,
"directionEffect": "string",
"keySource": {
"general": {
"sourceId": 0,
"sourceType": 0
}
},
"KeySourceReverse": 0,
"source": {
"general": {
"sourceId": 0,
"sourceType": 0
}
}
},
"stinger": {
"playStartTime": 0,
"mixtureTime": 0,
"mixtureStartTime": 0,
"matting": 0,
"brightness": 0,
"softness": 0,
"source": {
"general": {
"sourceId": 0,
"sourceType": 0
}
}
},
"dip": {
"source": {
"general": {
"sourceId": 0,
"sourceType": 0
}
}
}
},
"swapEnable": 0,
"screens": [
{
"guid": "string"
}
]
}
}'
返回响应
🟢200成功
application/json
Body
code
number
响应码
message
string
响应消息内容
data
object
必需
示例
{
"code": 0,
"message": "string",
"data": {}
}
修改于 2025-04-22 02:49:34