How to upload a cordova capture video to Firebase?

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.