var progressAux = 0;
var currenTimeAux = 0;
var onProgress = scope.$on('progress', function (event, data) {
scope.playerCtrl.play = true;
var currentTime = data.currentClip.currentTime;
var duration = data.currentClip.duration;
var currenTimeInt = Math.floor(currentTime);
scope.playerCtrl.setDurationVideo(currentTime, 'progress');
After User or Session instance
let session_id: String
let userStatusDatabaseRef = Database.database().reference(withPath: "/status/" + session_id)
// We'll create two constants which we will write to
// the Realtime database when this device is offline
// or online.
let isOfflineForDatabase = {