【发布时间】:2015-10-10 08:31:09
【问题描述】:
请帮助我如何在科尔多瓦的 android 和 iOS 的图库中仅选择视频 我尝试使用此 click Here 从媒体中选择视频,但它对我不起作用...
var pictureSource;
var destinationType;
var mediaType;
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
pictureSource = navigator.camera.PictureSourceType;
destinationType = navigator.camera.DestinationType;
mediaType = navigator.camera.MediaType;
}
navigator.camera.getPicture(onPhotoURISuccess, onFail, {
destinationType: destinationType.FILE_URI,
mediaType: mediaType.VIDEO,
sourceType: source
});
function onPhotoURISuccess(imageURI) {
console.log(imageURI);
}
function onFail(message) {
console.log(message);
}
我在我的应用程序中使用了相同的代码来实现,但它不能来......
【问题讨论】:
标签: android ios cordova video phonegap-plugins