# compressedVideo
压缩视频。(仅Android,iOS压缩视频方法参考:transcodeVideo)
# 输入
继承标准对象输入,扩展属性描述
| 名称 | 数据类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
| params | Object | 是 | 详情见params参数说明 |
params参数说明:
| 名称 | 数据类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
| inputFile | string | 是 | 设备上视频的路径 | |
| outputFile | string | 是 | 输出文件路径 |
# 输出
继承标准对象输出,无扩展属性
# 示例代码
var outputFile = window.filePath.substr(0, window.filePath.lastIndexOf('/')) + '/11.mp4';
app.link.compressedVideo((res) => {
bui.alert(res);
}, (error) => {
bui.alert('error' + error);
}, {
inputFile: window.filePath,
outputFile: outputFile
})