I'm using $cordovaCamera to select a video from a user's device:
document.addEventListener("deviceready", function() {
var options = {
sourceType : Camera.PictureSourceType.PHOTOLIBRARY,
mediaType: 1,
};
$cordovaCamera.getPicture(options).then(function(videoData) {
$scope.moment.features.video = {videoSrc : videoData, hasNewVideo: true};
window.resolveLocalFileSystemURL(videoData, function(fileEntry) {
console.dir(fileEntry);
});
}, function(err) {
// error
console.log(err);
});
}, false);
After getPicture(), the videoData arg contains a URI to the selected video. Ex:
file:///private/var/mobile/Containers/Data/Application/58C540CC-4568-477F-9A8A-6C7E80E26265/tmp/trim.03779440-3D8C-4B33-8EC5-A4198B6E43B5.MOV
If I resolveLocalFileSystemURL(videoData), then I get a non-private URI for the video:
file:///var/mobile/Containers/Data/Application/58C540CC-4568-477F-9A8A-6C7E80E26265/tmp/trim.03779440-3D8C-4B33-8EC5-A4198B6E43B5.MOV
Here's my problem. Neither of these work as a src for a element in my Ionic app.
<video ng-src="{{moment.features.video.videoSrc}}" controls="controls"></video>
The play icon simply shows a line through it. Is this a permissions issue? What am I missing?