花了一个多礼拜,终于开发出来了。使用FFmpeg自主研发,不需要依赖第三方SDK。
给大家看看效果
使用说明:
// 获取 module
var getModel = uni.requireNativePlugin("YGVEModule");
const modal = uni.requireNativePlugin('modal');
export default {
onLoad() {
},
data() {
return {
title: '',
}
},
methods: {
callNativeVideoCropUI() {
const _this = this;
getModel.callNativeVideoCropUI({
'outFilePath': '1',
},
(ret) => {
_this.title = JSON.stringify(ret);
})
},
callNativeVideoBgMusicUI() {
const _this = this;
var ret = getModel.callNativeVideoBgMusicUI({
'outFilePath': '1',
},
(ret) => {
_this.title = JSON.stringify(ret);
})
},
callNativeVideoCompressUI() {
const _this = this;
var ret = getModel.callNativeVideoCompressUI({
'outFilePath': '1',
},
(ret) => {
_this.title = JSON.stringify(ret);
})
},
callNativeRecodeVideo() {
const _this = this;
var ret = getModel.callNativeRecodeVideo({
'outFilePath': '1',
},
(ret) => {
_this.title = JSON.stringify(ret);
})
},
callNativeVideoPlayer() {
var ret = getModel.callNativeVideoPlayer({
'url': 'http://vfx.mtime.cn/Video/2019/03/18/mp4/190318231014076505.mp4',
})
},
callNativeSelectLocalVideo() {
const _this = this;
var ret = getModel.callNativeSelectLocalVideo({
'url': '1',
},
(ret) => {
_this.title = JSON.stringify(ret);
})
}
}
}
App Demo下载链接:https://wwa.lanzous.com/i5Tcwfhpnlg
分享博主的网站:http://yuange.828707.cn/
QQ 2729404527