diff --git a/app/js/controllers/PlayerCtrl.js b/app/js/controllers/PlayerCtrl.js index 2fff4b6..ce15772 100644 --- a/app/js/controllers/PlayerCtrl.js +++ b/app/js/controllers/PlayerCtrl.js @@ -4,7 +4,7 @@ angular.module('storm.controllers') // Player -.controller('PlayerCtrl', ['$scope', '$rootScope', '$timeout', '$sce', 'Player', 'Settings', 'Navigation', 'Remote', +.controller('PlayerCtrl', ['$scope', '$rootScope', '$timeout', '$sce', 'Player', 'Settings', 'Navigation', 'Remote', function($scope, $rootScope, $timeout, $sce, Player, Settings, Navigation, Remote) { $scope.playerLayer = true; @@ -52,6 +52,13 @@ angular.module('storm.controllers') Player.closePlayer(); }; + $scope.save = function() { + var pom = win.window.document.createElement('a'); + pom.setAttribute('href', $scope.videoUrl); + pom.setAttribute('download', $scope.item.name + '.mp4'); + pom.click(); + } + // Wait for player scope var watchPlayer = $scope.$watch(function() { return angular.element(document.querySelector('video')).scope(); @@ -90,7 +97,7 @@ angular.module('storm.controllers') // // REMOTE EVENTS - // + // // Listen to track change to notify Remote $scope.$watch('tracks', function(value) { diff --git a/app/locales/en.json b/app/locales/en.json index efb6c66..98559bd 100644 --- a/app/locales/en.json +++ b/app/locales/en.json @@ -27,6 +27,7 @@ "PLAY": "Play", "CANCEL": "Cancel", "CLOSE": "Close", + "SAVE": "Save", "CAST": "Cast", "DIRECTOR": "Director", "AUDIO_LANGUAGE": "Audio language", @@ -146,4 +147,4 @@ "ADD_SUBTITLE_FROM_FILE": "Add subtitle from local file", "NEWS_MSG": "While this application supports navigation with mouse, is optimized to be navigated with the keyboard or by connecting your smartphone as a remote control. To configure it, you can go to the Remote section of the upper left menu.", "UI_MSG": "If you notice navigation is not smooth enough, go to Settings (top menu to the right) and disable UI animations and blur effect." -} \ No newline at end of file +} diff --git a/app/locales/es.json b/app/locales/es.json index 8637591..d734a82 100644 --- a/app/locales/es.json +++ b/app/locales/es.json @@ -27,6 +27,7 @@ "PLAY": "Reproducir", "CANCEL": "Cancelar", "CLOSE": "Cerrar", + "SAVE": "Guardar", "CAST": "Reparto", "DIRECTOR": "Director", "AUDIO_LANGUAGE": "Idioma de audio", @@ -146,4 +147,4 @@ "ADD_SUBTITLE_FROM_FILE": "Agregar subtítulo desde archivo local", "NEWS_MSG": "Si bien esta aplicación soporta la navegación con mouse, está optimizada para ser navegada con el teclado o conectando tu smartphone como control remoto. Para configurarlo, puedes ir a la sección Remoto a la izquierda del menu superior.", "UI_MSG": "Si notas que la navegación no es tan fluida, ve a Ajustes (a la derecha del menú principal) y desactiva las animaciones y efecto blur." -} \ No newline at end of file +} diff --git a/app/views/player.html b/app/views/player.html index 00c8f90..d845385 100644 --- a/app/views/player.html +++ b/app/views/player.html @@ -5,6 +5,7 @@
EXIT_VIDEO + SAVE
@@ -91,4 +92,4 @@

EXIT_VIDEO

  • CANCEL
  • -
    \ No newline at end of file +