|
@@ -5,6 +5,7 @@ app.controller('cutCtrl', function ($scope, $http,video,notify) {
|
|
|
$scope.desc="";
|
|
$scope.desc="";
|
|
|
$scope.video = video;
|
|
$scope.video = video;
|
|
|
$scope.censuras = [];
|
|
$scope.censuras = [];
|
|
|
|
|
+ $scope.timings = [];
|
|
|
|
|
|
|
|
document.getElementById("video").setAttribute("src", $scope.video.file);
|
|
document.getElementById("video").setAttribute("src", $scope.video.file);
|
|
|
|
|
|
|
@@ -26,6 +27,24 @@ app.controller('cutCtrl', function ($scope, $http,video,notify) {
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ $scope.obtenerTiempos = function() {
|
|
|
|
|
+ $http.get('/back/timings/' + $scope.video._id)
|
|
|
|
|
+ .success(function(data, state) {
|
|
|
|
|
+ $scope.timings = data["timings"];
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ $scope.formatearTiempo = function(t) {
|
|
|
|
|
+ var h = parseInt(t/3600);
|
|
|
|
|
+ var m = parseInt((t % 3600) / 60);
|
|
|
|
|
+ var s = parseInt(t % 60);
|
|
|
|
|
+ if (m < 10)
|
|
|
|
|
+ m = "0" + m;
|
|
|
|
|
+ if (s < 10)
|
|
|
|
|
+ s = "0" + s;
|
|
|
|
|
+ return `${h}:${m}:${s}`;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$scope.borrarCensura = function(c) {
|
|
$scope.borrarCensura = function(c) {
|
|
|
var i = 0;
|
|
var i = 0;
|
|
|
for ( i = 0; i < $scope.censuras.length; i++) {
|
|
for ( i = 0; i < $scope.censuras.length; i++) {
|
|
@@ -46,6 +65,12 @@ app.controller('cutCtrl', function ($scope, $http,video,notify) {
|
|
|
var video = document.getElementById("video");
|
|
var video = document.getElementById("video");
|
|
|
return video.currentTime;
|
|
return video.currentTime;
|
|
|
}
|
|
}
|
|
|
|
|
+ $scope.changeTimeAbs = function(t) {
|
|
|
|
|
+ if (t === undefined) return;
|
|
|
|
|
+ var video = document.getElementById("video");
|
|
|
|
|
+ video.currentTime=t;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$scope.changeTime = function(t) {
|
|
$scope.changeTime = function(t) {
|
|
|
if (t === undefined) return;
|
|
if (t === undefined) return;
|
|
|
var video = document.getElementById("video");
|
|
var video = document.getElementById("video");
|