Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

How to upload a cordova capture video to Firebase?

$
0
0

I still don't get it how to transfer my video file to firebase?

The idea is to trigger my 'record function' and after end the recording, upload that file to firebase automatically.

Or I need to use a cordova file transfer for this? (and how?)

Sorry if I make a lot of questions, I'm new with firebase and ionic.

Here my code:

Video Controller

'use strict';

app.controller('VideoCtrl', function($scope, $cordovaCapture, $state, Videos) {

$scope.videos = Videos;

$scope.record = function(){
var options = { limit: 1, duration: 8 };
$cordovaCapture.captureVideo(options).then(
function(videoData) {
var i, path, len;
var pathtogo;
var pathtogostring;
for (i = 0, len = videoData.length; i < len; i += 1) {
path = videoData[i].fullPath;
pathtogo = path.toString();
return videos.$add({
videosrc: pathtogo
});
}
},
$state.go('tab.photo-detail'),
function(err) {
}
);
}

});

Video Service

'use strict';

app.factory('Videos', function(FURL, $firebaseArray) {
var fb = new Firebase(FURL);
return $firebaseArray(fb);
})

Thanks.


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>