| 12345678910111213141516171819202122232425262728293031323334353637 |
- app.controller('cutCtrl', function ($scope, $http,video,notify) {
- $scope.inicio=0;
- $scope.fin=0;
- $scope.curso="";
- $scope.desc="";
- $scope.video = video;
- $scope.post = function() {
- var data = {
- curso: $scope.curso,
- desc: $scope.desc,
- inicio: $scope.inicio,
- fin: $scope.fin,
- id: $scope.video._id
- };
- $http.post('/back/crop/', data)
- .success(function(data,state) {
- notify({message:data.status,classes:"alert"});
- })
- .error(function(data) {
- notify({message:data.status,classes:"alert alert-danger"});
- });
- };
- function getVideoTime(){
- var video = document.getElementById("video");
- return video.currentTime;
- }
- $scope.setEnd = function() {
- $scope.fin=getVideoTime();
- };
- $scope.setStart = function() {
- $scope.inicio=getVideoTime();
- };
- });
|