更新记录
1.1.4(2024-06-25)
修复安卓合成字幕时不显示字幕的bug。
1.1.3(2024-06-07)
更新安卓依赖版本。
1.1.2(2024-06-06)
更新SDK插件版本
查看更多平台兼容性
HbuilderX/cli最低兼容版本 |
---|
3.6.8 |
uni-app
Vue2 | Vue3 |
---|---|
√ | ? |
app-vue | app-nvue | app-android | app-ios |
---|---|---|---|
? | ? | ? | ? |
H5-Safari | Android Browser | 微信浏览器(Android) | QQ浏览器(Android) | Chrome | IE | Edge | Firefox | PC-Safari |
---|---|---|---|---|---|---|---|---|
? | ? | ? | ? | ? | ? | ? | ? | ? |
微信小程序 | 支付宝小程序 | 百度小程序 | 字节小程序 | QQ小程序 | 钉钉小程序 | 快手小程序 | 飞书小程序 | 京东小程序 |
---|---|---|---|---|---|---|---|---|
? | ? | ? | ? | ? | ? | ? | ? | ? |
快应用-华为 | 快应用-联盟 |
---|---|
? | ? |
uni-app x
app-android | app-ios |
---|---|
? | ? |
H5-Safari | Android Browser | 微信浏览器(Android) | QQ浏览器(Android) | Chrome | IE | Edge | Firefox | PC-Safari |
---|---|---|---|---|---|---|---|---|
? | ? | ? | ? | ? | ? | ? | ? | ? |
概述
XF-ffmpegPlusUTS封装了在Android和iOS中执行ffmpeg的命令对进行音视频处理的逻辑
插件接口
executeCommand
执行ffmpeg命令
uni-app项目中(vue/nvue)调用示例:
import { executeCommand } from "@/uni_modules/XF-ffmpegPlusUTS"
executeCommand({
cmd: "",
complete: (res) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { executeCommand } from "@/uni_modules/XF-ffmpegPlusUTS";
import { CommandOptions } from "@/uni_modules/XF-ffmpegPlusUTS/utssdk/interface.uts";
let options = {
cmd: "",
complete: (res : any) => {
console.log(res)
}
} as CommandOptions;
executeCommand(options);
可用性
iOS、Android系统
可提供的1.0.0及更高版本
executeCommandSync
执行ffmpeg命令
uni-app项目中(vue/nvue)调用示例:
import { executeCommandSync } from "@/uni_modules/XF-ffmpegPlusUTS"
executeCommandSync("");
uni-app x项目(uvue)中调用示例:
import { executeCommandSync } from "@/uni_modules/XF-ffmpegPlusUTS";
executeCommandSync("");
可用性
iOS、Android系统
可提供的1.0.0及更高版本
stopCommand
停止执行ffmpeg命令
uni-app项目中(vue/nvue)调用示例:
import { stopCommand } from "@/uni_modules/XF-ffmpegPlusUTS"
stopCommand({
sessionId : 1,
complete: (res) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { stopCommand } from "@/uni_modules/XF-ffmpegPlusUTS";
import { StopCommandOptions } from "@/uni_modules/XF-ffmpegPlusUTS/utssdk/interface.uts";
let options = {
sessionId : 1,
complete: (res : any) => {
console.log(res)
}
} as StopCommandOptions;
stopCommand(options);
可用性
iOS、Android系统
可提供的1.0.0及更高版本
start
音乐合成
uni-app项目中(vue/nvue)调用示例:
import { audioMerge } from "@/uni_modules/XF-ffmpegPlusUTS"
audioMerge({
onePath : "",
twoPath : "",
targetPath : "",
complete: (res) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { audioMerge } from "@/uni_modules/XF-ffmpegPlusUTS";
import { AudioMergeOptions } from "@/uni_modules/XF-ffmpegPlusUTS/utssdk/interface.uts";
let options = {
onePath : "",
twoPath : "",
targetPath : "",
complete: (res : any) => {
console.log(res)
}
} as AudioMergeOptions;
audioMerge(options);
可用性
iOS、Android系统
可提供的1.0.0及更高版本
videoMerge
视频合成
uni-app项目中(vue/nvue)调用示例:
import { videoMerge } from "@/uni_modules/XF-ffmpegPlusUTS"
videoMerge({
videoPath : "",
audioPath : "",
argetPath : "",
complete: (res) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { videoMerge } from "@/uni_modules/XF-ffmpegPlusUTS";
import { VideoMergeOptions } from "@/uni_modules/XF-ffmpegPlusUTS/utssdk/interface.uts";
let options = {
videoPath : "",
audioPath : "",
argetPath : "",
complete: (res : any) => {
console.log(res)
}
} as VideoMergeOptions;
videoMerge(options);
可用性
iOS、Android系统
可提供的1.0.0及更高版本
getMediaFileInfo
获取文件信息
uni-app项目中(vue/nvue)调用示例:
import { getMediaFileInfo } from "@/uni_modules/XF-ffmpegPlusUTS"
getMediaFileInfo({
path : "",
complete: (res) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { getMediaFileInfo } from "@/uni_modules/XF-ffmpegPlusUTS";
import { FileOptions } from "@/uni_modules/XF-ffmpegPlusUTS/utssdk/interface.uts";
let options = {
path : "",
complete: (res : any) => {
console.log(res)
}
} as FileOptions;
getMediaFileInfo(options);
可用性
iOS、Android系统
可提供的1.0.0及更高版本
getMediaFileInfoSync
获取文件信息
uni-app项目中(vue/nvue)调用示例:
import { getMediaFileInfoSync } from "@/uni_modules/XF-ffmpegPlusUTS"
getMediaFileInfoSync("");
uni-app x项目(uvue)中调用示例:
import { getMediaFileInfoSync } from "@/uni_modules/XF-ffmpegPlusUTS";
getMediaFileInfoSync("");
可用性
iOS、Android系统
可提供的1.0.0及更高版本