封装IOS原生视频多选插件,实现基本多选功能。至此,module类型插件双端都已开发完毕,但交互没有component类型插件自由,且后续上传、断点续传需要继续封装进插件,否则该功能仅能多选,无法上传发送
This commit is contained in:
parent
22c254fffd
commit
680dc77917
@ -157,7 +157,7 @@
|
|||||||
"__plugin_info__" : {
|
"__plugin_info__" : {
|
||||||
"name" : "视频多选原生SDK",
|
"name" : "视频多选原生SDK",
|
||||||
"description" : "封装到js端使用",
|
"description" : "封装到js端使用",
|
||||||
"platforms" : "Android",
|
"platforms" : "Android,iOS",
|
||||||
"url" : "",
|
"url" : "",
|
||||||
"android_package_name" : "",
|
"android_package_name" : "",
|
||||||
"ios_bundle_id" : "",
|
"ios_bundle_id" : "",
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -30,6 +30,16 @@
|
|||||||
"armeabi-v7a","arm64-v8a","x86"
|
"armeabi-v7a","arm64-v8a","x86"
|
||||||
],
|
],
|
||||||
"minSdkVersion": "21"
|
"minSdkVersion": "21"
|
||||||
|
},
|
||||||
|
"ios": {
|
||||||
|
"plugins": [{
|
||||||
|
"type": "module",
|
||||||
|
"name": "VideoPickerUniPlugin-VideoPickerModule",
|
||||||
|
"class": "VideoPickerModule"
|
||||||
|
}],
|
||||||
|
"frameworks": ["VideoPickerUniPlugin.framework"],
|
||||||
|
"integrateType": "framework",
|
||||||
|
"deploymentTarget": "11.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -138,7 +138,35 @@ commun.registerHandler('operateSQLite', async (data) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
commun.registerHandler('VideoPicker', async () => {
|
commun.registerHandler('VideoPicker', async () => {
|
||||||
console.error("=======BASE==VideoPicker")
|
console.error('=======BASE==VideoPicker')
|
||||||
|
console.error(uni.getSystemInfoSync().osName)
|
||||||
|
if (uni.getSystemInfoSync().osName === 'ios') {
|
||||||
|
//调用IOS原生视频多选插件
|
||||||
|
uni
|
||||||
|
.requireNativePlugin('VideoPickerUniPlugin-VideoPickerModule')
|
||||||
|
.pickVideos(
|
||||||
|
{ maxCount: 9 },
|
||||||
|
(res) => {
|
||||||
|
console.log('选中的视频列表:', res.videoList)
|
||||||
|
let allWebview = plus.webview.all()
|
||||||
|
allWebview.forEach((webview) => {
|
||||||
|
if (webview.id === 'chat') {
|
||||||
|
//找到聊天的webview
|
||||||
|
console.log('找到聊天的webview', webview)
|
||||||
|
webview.evalJS(
|
||||||
|
`getBaseMulVideo('${encodeURIComponent(
|
||||||
|
JSON.stringify(res.videoList),
|
||||||
|
)}')`,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
(ret) => {
|
||||||
|
console.error('调用异步方法 ' + ret)
|
||||||
|
},
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
//调用安卓原生视频多选插件
|
||||||
uni.requireNativePlugin('VideoPicker').pickVideos(
|
uni.requireNativePlugin('VideoPicker').pickVideos(
|
||||||
{ maxCount: 9 },
|
{ maxCount: 9 },
|
||||||
(res) => {
|
(res) => {
|
||||||
@ -160,6 +188,7 @@ commun.registerHandler('VideoPicker', async () => {
|
|||||||
console.error('选择失败:', err)
|
console.error('选择失败:', err)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// 获取电子名片
|
// 获取电子名片
|
||||||
|
Loading…
Reference in New Issue
Block a user