You need to enable JavaScript to run this app.
文档中心
机器翻译

机器翻译

复制全文
下载 pdf
视频工具
VideoEditorUpdateGlobalStyle - 更新全局字幕样式
复制全文
下载 pdf
VideoEditorUpdateGlobalStyle - 更新全局字幕样式

更新全局字幕样,需要注意的是已经被修改样式的单条字幕会优先与全局样式。(当设置了全局有字幕不生效时,需要查看这条字幕是否已经被设置了样式,可通过 ListSubtitle 接口中查看字幕的targetStyle、sourceStyle是否有值,有值表示被设置过)

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

参数
类型
是否必填
示例值
描述
Action
String

VideoEditorUpdateGlobalStyle

要执行的操作,取值:VideoEditorUpdateGlobalStyle。

Version
String

2021-05-21

API的版本,取值:2021-05-21。

subtaskId
String

12345

子任务ID

styleConfig
Object

{
"source" :{
"fontSize": 16,
"fontFamily": "fz_lantingzhonghei_jianti",
"x": 0,
"y": -0.9,
"alignment": 2,
"show": true
},
"target": {
"fontSize": 13,
"fontFamily": "loki://9893366",
"x": 0,
"y": -0.3,
"alignment": 2,
"show": true,
"textColor": "#e7eb4d",
"textAlpha": 0.5
}
}

样式配置,可传 fontSize、fontFamily、x、y、alignment、show,建议除需要修改的属性,其他的可以传现有的值,若不传会被修改成系统默认样式

返回参数

本接口无特有的返回参数。更多信息请见返回结构

请求示例

POST /?Action=VideoEditorUpdateGlobalStyle&Version=2021-05-21 HTTP/1.1
Host: open.volcengineapi.com
Content-Type: application/json; charset=UTF-8
X-Date: 20260323T091125Z
X-Content-Sha256: 287e874e******d653b44d21e
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20260323/cn-beijing/i18n_openapi/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f

{"subtaskId":"12345","style":"{\"fontSize\":16,\"color\":\"#ffffff\"}"}

返回示例

{"ResponseMetadata":{"RequestId":"2026032317112912311503601596D968","Action":"VideoEditorUpdateGlobalStyle","Version":"2021-05-21","Service":"i18n_openapi","Region":"cn-beijing"},"Result":{}}

错误码

您可访问公共错误码,获取更多错误码信息。

最近更新时间:2026.07.24 17:24:18
这个页面对您有帮助吗?
有用
有用
无用
无用