Appearance
设置绿幕背景视频
说明
该接口仅在 企业版 SDK(旧版已下线,新版本SDK如需使用高级美颜功能请参见腾讯美颜特效SDK)中生效。此接口所开启的绿幕功能不具备智能去除背景的能力,需要被拍摄者的背后有一块绿色的幕布来辅助产生特效。
方法名
setGreenScreenFile
用法
- 用法如下:
js
module.setGreenScreenFile({
params:{
},
//成功执行的函数
success: (res) => {
let data = res.data;
console.log(data)
},
//失败执行的函数
fail: (res) => {
console.log(res)
},
//接口调用完成返回函数,不管成功还是失败都会返回
complete: (res) => {
// console.log(res)
}
})js
module.setGreenScreenFile({
params:{
},
//成功执行的函数
success: (res) => {
const data = res.data;
console.log(data)
},
//失败执行的函数
fail: (res) => {
console.log(res)
},
//接口调用完成返回函数,不管成功还是失败都会返回
// complete: (res) => {
// console.log(res)
// }
} as LevenOptions)- 参数说明
参数名 参数类型 是否必填 默认值 参数描述 params Object 是 无 参数配置 params.path String 是 无 MP4格式的视频文件路径; 设置空值表示关闭特效 success Function 否 无 执行成功的函数 fail Function 否 无 执行失败的函数 complete Function 否 无 执行完成的函数,不管成功还是失败都会执行
回调
- 示例
json
{
"data": {
"result": 0
},
"message": "",
"code": 0
}- 回调说明:
参数名 参数类型 参数描述 message String 消息提示 data Object 数据对象 data.result Integer 0:成功;-5:当前 License 对应 feature 不支持。 code Integer 返回类型,0.成功,其他:失败
