Skip to content

Commit

Permalink
aws prototyped
Browse files Browse the repository at this point in the history
  • Loading branch information
SmokyDesperado committed Jun 8, 2018
1 parent d9c34ff commit adc2f8b
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"undef": true,
"unused": true,
"globals": {
"angular": false
"angular": false,
"AWS" : false
}
}
4 changes: 3 additions & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!-- build:css(.) styles/vendor.css -->
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css"/>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<!-- endbower -->
<!-- endbuild -->
<!-- build:css(.tmp) styles/main.css -->
Expand Down Expand Up @@ -56,6 +56,7 @@
<script src="bower_components/angular-touch/angular-touch.js"></script>
<script src="bower_components/hammerjs/hammer.js"></script>
<script src="bower_components/AngularHammer/angular.hammer.js"></script>
<script src="bower_components/aws-sdk/dist/aws-sdk.js"></script>
<!-- endbower -->
<!-- endbuild -->

Expand Down Expand Up @@ -86,6 +87,7 @@
<script src="scripts/services/timeline.js"></script>
<script src="scripts/services/mvHelper.js"></script>
<script src="scripts/services/dragAndDrop.js"></script>
<script src="scripts/services/aws.js"></script>

<!-- endbuild -->
</body>
Expand Down
10 changes: 5 additions & 5 deletions app/scripts/controllers/mvContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ angular.module('moveditorApp')
this.init = function () {
this.contentObjects = ContentService.getContentList();
this.initDummyObject();
console.log('content list initialized:', this.contentObjects, this.dummyObjects);
// console.log('content list initialized:', this.contentObjects, this.dummyObjects);
};

this.addContentMaterial = function () {
Expand All @@ -32,11 +32,11 @@ angular.module('moveditorApp')
ContentService.addContentObjectToList(this.dummyObjects[this.dummyIndex]);
this.dummyIndex++;

console.log('object added');
}
else {
console.warn('all dummy objects added');
// console.log('object added');
}
// else {
// console.warn('all dummy objects added');
// }
};

this.loadContentMaterial = function () {
Expand Down
4 changes: 3 additions & 1 deletion app/scripts/directives/mvContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
* # navigator
*/
angular.module('moveditorApp')
.directive('mvContent', [function () {
.directive('mvContent', [
'AWSService',
function (AWSService) {
return {
templateUrl: '/views/directives/mv_content.html',
replace: true,
Expand Down
11 changes: 10 additions & 1 deletion app/scripts/models/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ angular.module('moveditorApp')
this.length = length;
this.url = url;
this.active = 0;
this.mpd = '';
}

// =========================================================================================================
Expand All @@ -39,10 +40,14 @@ angular.module('moveditorApp')
return this.url;
};

Content.prototype.getActive = function (active) {
Content.prototype.getActive = function () {
return this.active;
};

Content.prototype.getMpd = function () {
return this.mpd;
};

// =========================================================================================================
// setter
// =========================================================================================================
Expand All @@ -67,6 +72,10 @@ angular.module('moveditorApp')
this.active = active;
};

Content.prototype.setMdp = function (mdp) {
this.mdp = mdp;
};

// =========================================================================================================
// functions
// =========================================================================================================
Expand Down
32 changes: 32 additions & 0 deletions app/scripts/services/aws.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
'use strict';

/**
* @ngdoc service
* @name moveditorApp.mvNav
* @description
* # mvNav
* Service in the moveditorApp.
*/
angular.module('moveditorApp')
.service('AWSService', [
'MvHelperService',
'ContentService',
function (MvHelperService, ContentService) {
var self = this;

this.aws = null;

this.init = function () {
this.aws = new AWS.SQS();
console.log('init:', this.aws);
};

this.requestSegmentation = function (contetnMaterialIndex, url) {
// ToDo: do stuff

var mpd = ''; // ToDo: set mpd url
ContentService.addMpdForContentObject(contetnMaterialIndex, mpd);
};

this.init();
}]);
5 changes: 5 additions & 0 deletions app/scripts/services/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ angular.module('moveditorApp')
this.getContentUrlList = function () {
return this.contentUrlList;
};

// ToDo: check functionality and correctness
this.addMpdForContentObject = function (contetnMaterialIndex, mpd) {
this.contentList[contetnMaterialIndex].setMdp(mpd);
};
}]);
8 changes: 4 additions & 4 deletions app/scripts/services/dragAndDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ angular.module('moveditorApp')
this.dropableElement = null;

this.init = function () {
console.log('drag and drop service');
// console.log('drag and drop service');
};

this.panMoveStarted = function (id) {

};

this.panMove = function () {
console.log('pan move');
// console.log('pan move');
};

this.panMoveEnd = function ($event, contentObjectKey) {
Expand All @@ -35,7 +35,7 @@ angular.module('moveditorApp')
TimelineService.addTimelineObjectToList(contentObjectKey);
}

console.log('timelineList:', TimelineService.timelineList);
// console.log('timelineList:', TimelineService.timelineList);
};

this.setDropableElement = function (elemment) {
Expand All @@ -53,7 +53,7 @@ angular.module('moveditorApp')
timelineAttributes.height = elemment[0].offsetHeight;

this.dropableElement = timelineAttributes;
console.log(this.dropableElement);
// console.log(this.dropableElement);
};

this.hitTest = function (draggableElement) {
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"angular-route": "^1.4.0",
"angular-sanitize": "^1.4.0",
"angular-touch": "^1.4.0",
"AngularHammer": "ryanmullins-angular-hammer#^2.2.0"
"AngularHammer": "ryanmullins-angular-hammer#^2.2.0",
"aws-sdk": "aws-sdk-js#^2.253.1"
},
"devDependencies": {
"angular-mocks": "^1.4.0"
Expand Down
1 change: 1 addition & 0 deletions test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = function (config) {
'bower_components/angular-touch/angular-touch.js',
'bower_components/hammerjs/hammer.js',
'bower_components/AngularHammer/angular.hammer.js',
'bower_components/aws-sdk/dist/aws-sdk.js',
'bower_components/angular-mocks/angular-mocks.js',
// endbower
'app/scripts/**/*.js',
Expand Down

0 comments on commit adc2f8b

Please sign in to comment.