Skip to content

Commit

Permalink
Merge pull request #140 from nus-mtp/develop
Browse files Browse the repository at this point in the history
Merge develop to master for Final Release
  • Loading branch information
kphua committed Apr 22, 2016
2 parents ffce8cd + e6b93f0 commit e8e272f
Show file tree
Hide file tree
Showing 84 changed files with 1,841 additions and 2,978 deletions.
200 changes: 200 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
{
"env": {
"browser": true
},
"globals": {
"angular": 1,
"$": 1,
"Whammy": 1,
"h337": 1
},
"extends": "eslint:recommended",
"rules": {
"accessor-pairs": "error",
"array-bracket-spacing": [
"error",
"never"
],
"array-callback-return": "error",
"arrow-body-style": "error",
"arrow-parens": "error",
"arrow-spacing": "error",
"block-scoped-var": "off",
"block-spacing": "off",
"brace-style": "off",
"callback-return": "off",
"camelcase": "off",
"comma-spacing": "off",
"comma-style": "off",
"complexity": "off",
"computed-property-spacing": [
"error",
"never"
],
"consistent-return": "off",
"consistent-this": "off",
"curly": "off",
"default-case": "off",
"dot-location": [
"error",
"property"
],
"dot-notation": "off",
"eol-last": "off",
"eqeqeq": "off",
"func-names": "off",
"func-style": "off",
"generator-star-spacing": "error",
"global-require": "off",
"guard-for-in": "off",
"handle-callback-err": "off",
"id-blacklist": "error",
"id-length": "off",
"id-match": "error",
"indent": "off",
"init-declarations": "off",
"jsx-quotes": "error",
"key-spacing": "off",
"keyword-spacing": "off",
"linebreak-style": [
"error",
"unix"
],
"lines-around-comment": "off",
"max-depth": "off",
"max-len": "off",
"max-nested-callbacks": "error",
"max-params": "off",
"max-statements": "off",
"new-parens": "off",
"newline-after-var": "off",
"newline-before-return": "off",
"newline-per-chained-call": "off",
"no-alert": "error",
"no-array-constructor": "error",
"no-bitwise": "off",
"no-caller": "error",
"no-catch-shadow": "error",
"no-confusing-arrow": "error",
"no-continue": "off",
"no-div-regex": "error",
"no-else-return": "off",
"no-empty-function": "off",
"no-eq-null": "off",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-extra-parens": "off",
"no-floating-decimal": "off",
"no-implicit-coercion": [
"error",
{
"boolean": false,
"number": false,
"string": false
}
],
"no-implicit-globals": "off",
"no-implied-eval": "error",
"no-inline-comments": "off",
"no-invalid-this": "off",
"no-iterator": "error",
"no-label-var": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-lonely-if": "off",
"no-loop-func": "off",
"no-magic-numbers": "off",
"no-mixed-requires": "error",
"no-multi-spaces": "off",
"no-multi-str": "error",
"no-multiple-empty-lines": "off",
"no-native-reassign": "error",
"no-negated-condition": "off",
"no-nested-ternary": "off",
"no-new": "error",
"no-new-func": "off",
"no-new-object": "error",
"no-new-require": "error",
"no-new-wrappers": "off",
"no-octal-escape": "error",
"no-param-reassign": "off",
"no-path-concat": "error",
"no-plusplus": "off",
"no-process-env": "error",
"no-process-exit": "error",
"no-proto": "off",
"no-restricted-globals": "error",
"no-restricted-imports": "error",
"no-restricted-modules": "error",
"no-restricted-syntax": "error",
"no-return-assign": "off",
"no-script-url": "off",
"no-self-compare": "error",
"no-sequences": "off",
"no-shadow": "off",
"no-shadow-restricted-names": "error",
"no-spaced-func": "error",
"no-sync": "error",
"no-ternary": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "off",
"no-undef-init": "error",
"no-undefined": "off",
"no-underscore-dangle": "off",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": [
"error",
{
"defaultAssignment": true
}
],
"no-unused-expressions": "off",
"no-use-before-define": "off",
"no-useless-call": "error",
"no-useless-concat": "off",
"no-useless-constructor": "error",
"no-var": "off",
"no-void": "off",
"no-warning-comments": "off",
"no-whitespace-before-property": "error",
"no-with": "error",
"object-curly-spacing": "off",
"object-shorthand": "off",
"one-var": "off",
"one-var-declaration-per-line": "off",
"operator-assignment": "off",
"operator-linebreak": "off",
"padded-blocks": "off",
"prefer-arrow-callback": "off",
"prefer-const": "error",
"prefer-reflect": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
"prefer-template": "off",
"quote-props": "off",
"quotes": ["error", "single"],
"radix": "off",
"require-jsdoc": "off",
"require-yield": "error",
"semi": "off",
"semi-spacing": "off",
"sort-imports": "error",
"sort-vars": "off",
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-in-parens": "off",
"space-infix-ops": "off",
"space-unary-ops": "off",
"spaced-comment": "off",
"strict": "off",
"template-curly-spacing": "error",
"valid-jsdoc": "off",
"vars-on-top": "off",
"wrap-iife": "off",
"wrap-regex": "off",
"yield-star-spacing": "error",
"yoda": "off"
}
}
124 changes: 10 additions & 114 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,117 +27,13 @@ libs/

# User-defined
.tmp
testvids/squirrel_video.mp3
testvids/squirrel_video.png
testvids/squirrel_video_1080p.mp4
testvids/squirrel_video_1080p_R1C1.mp4
testvids/squirrel_video_1080p_R1C1_track1_dashinit.mp4
testvids/squirrel_video_1080p_R1C2.mp4
testvids/squirrel_video_1080p_R1C2_track1_dashinit.mp4
testvids/squirrel_video_1080p_R1C3.mp4
testvids/squirrel_video_1080p_R1C3_track1_dashinit.mp4
testvids/squirrel_video_1080p_R1C4.mp4
testvids/squirrel_video_1080p_R1C4_track1_dashinit.mp4
testvids/squirrel_video_1080p_R2C1.mp4
testvids/squirrel_video_1080p_R2C1_track1_dashinit.mp4
testvids/squirrel_video_1080p_R2C2.mp4
testvids/squirrel_video_1080p_R2C2_track1_dashinit.mp4
testvids/squirrel_video_1080p_R2C3.mp4
testvids/squirrel_video_1080p_R2C3_track1_dashinit.mp4
testvids/squirrel_video_1080p_R2C4.mp4
testvids/squirrel_video_1080p_R2C4_track1_dashinit.mp4
testvids/squirrel_video_1080p_R3C1.mp4
testvids/squirrel_video_1080p_R3C1_track1_dashinit.mp4
testvids/squirrel_video_1080p_R3C2.mp4
testvids/squirrel_video_1080p_R3C2_track1_dashinit.mp4
testvids/squirrel_video_1080p_R3C3.mp4
testvids/squirrel_video_1080p_R3C3_track1_dashinit.mp4
testvids/squirrel_video_1080p_R3C4.mp4
testvids/squirrel_video_1080p_R3C4_track1_dashinit.mp4
testvids/squirrel_video_360p.mp4
testvids/squirrel_video_360p_R1C1.mp4
testvids/squirrel_video_360p_R1C1_track1_dashinit.mp4
testvids/squirrel_video_360p_R1C2.mp4
testvids/squirrel_video_360p_R1C2_track1_dashinit.mp4
testvids/squirrel_video_360p_R1C3.mp4
testvids/squirrel_video_360p_R1C3_track1_dashinit.mp4
testvids/squirrel_video_360p_R1C4.mp4
testvids/squirrel_video_360p_R1C4_track1_dashinit.mp4
testvids/squirrel_video_360p_R2C1.mp4
testvids/squirrel_video_360p_R2C1_track1_dashinit.mp4
testvids/squirrel_video_360p_R2C2.mp4
testvids/squirrel_video_360p_R2C2_track1_dashinit.mp4
testvids/squirrel_video_360p_R2C3.mp4
testvids/squirrel_video_360p_R2C3_track1_dashinit.mp4
testvids/squirrel_video_360p_R2C4.mp4
testvids/squirrel_video_360p_R2C4_track1_dashinit.mp4
testvids/squirrel_video_360p_R3C1.mp4
testvids/squirrel_video_360p_R3C1_track1_dashinit.mp4
testvids/squirrel_video_360p_R3C2.mp4
testvids/squirrel_video_360p_R3C2_track1_dashinit.mp4
testvids/squirrel_video_360p_R3C3.mp4
testvids/squirrel_video_360p_R3C3_track1_dashinit.mp4
testvids/squirrel_video_360p_R3C4.mp4
testvids/squirrel_video_360p_R3C4_track1_dashinit.mp4
testvids/squirrel_video_480p.mp4
testvids/squirrel_video_480p_R1C1.mp4
testvids/squirrel_video_480p_R1C1_track1_dashinit.mp4
testvids/squirrel_video_480p_R1C2.mp4
testvids/squirrel_video_480p_R1C2_track1_dashinit.mp4
testvids/squirrel_video_480p_R1C3.mp4
testvids/squirrel_video_480p_R1C3_track1_dashinit.mp4
testvids/squirrel_video_480p_R1C4.mp4
testvids/squirrel_video_480p_R1C4_track1_dashinit.mp4
testvids/squirrel_video_480p_R2C1.mp4
testvids/squirrel_video_480p_R2C1_track1_dashinit.mp4
testvids/squirrel_video_480p_R2C2.mp4
testvids/squirrel_video_480p_R2C2_track1_dashinit.mp4
testvids/squirrel_video_480p_R2C3.mp4
testvids/squirrel_video_480p_R2C3_track1_dashinit.mp4
testvids/squirrel_video_480p_R2C4.mp4
testvids/squirrel_video_480p_R2C4_track1_dashinit.mp4
testvids/squirrel_video_480p_R3C1.mp4
testvids/squirrel_video_480p_R3C1_track1_dashinit.mp4
testvids/squirrel_video_480p_R3C2.mp4
testvids/squirrel_video_480p_R3C2_track1_dashinit.mp4
testvids/squirrel_video_480p_R3C3.mp4
testvids/squirrel_video_480p_R3C3_track1_dashinit.mp4
testvids/squirrel_video_480p_R3C4.mp4
testvids/squirrel_video_480p_R3C4_track1_dashinit.mp4
testvids/squirrel_video_720p.mp4
testvids/squirrel_video_720p_R1C1.mp4
testvids/squirrel_video_720p_R1C1_track1_dashinit.mp4
testvids/squirrel_video_720p_R1C2.mp4
testvids/squirrel_video_720p_R1C2_track1_dashinit.mp4
testvids/squirrel_video_720p_R1C3.mp4
testvids/squirrel_video_720p_R1C3_track1_dashinit.mp4
testvids/squirrel_video_720p_R1C4.mp4
testvids/squirrel_video_720p_R1C4_track1_dashinit.mp4
testvids/squirrel_video_720p_R2C1.mp4
testvids/squirrel_video_720p_R2C1_track1_dashinit.mp4
testvids/squirrel_video_720p_R2C2.mp4
testvids/squirrel_video_720p_R2C2_track1_dashinit.mp4
testvids/squirrel_video_720p_R2C3.mp4
testvids/squirrel_video_720p_R2C3_track1_dashinit.mp4
testvids/squirrel_video_720p_R2C4.mp4
testvids/squirrel_video_720p_R2C4_track1_dashinit.mp4
testvids/squirrel_video_720p_R3C1.mp4
testvids/squirrel_video_720p_R3C1_track1_dashinit.mp4
testvids/squirrel_video_720p_R3C2.mp4
testvids/squirrel_video_720p_R3C2_track1_dashinit.mp4
testvids/squirrel_video_720p_R3C3.mp4
testvids/squirrel_video_720p_R3C3_track1_dashinit.mp4
testvids/squirrel_video_720p_R3C4.mp4
testvids/squirrel_video_720p_R3C4_track1_dashinit.mp4
testvids/squirrel_video_mpd_R1C1.mpd
testvids/squirrel_video_mpd_R1C2.mpd
testvids/squirrel_video_mpd_R1C3.mpd
testvids/squirrel_video_mpd_R1C4.mpd
testvids/squirrel_video_mpd_R2C1.mpd
testvids/squirrel_video_mpd_R2C2.mpd
testvids/squirrel_video_mpd_R2C3.mpd
testvids/squirrel_video_mpd_R2C4.mpd
testvids/squirrel_video_mpd_R3C1.mpd
testvids/squirrel_video_mpd_R3C2.mpd
testvids/squirrel_video_mpd_R3C3.mpd
testvids/squirrel_video_mpd_R3C4.mpd

# local config
config/local.js
config/env/ssl

# Coverage results
coverage

# Automatically generated views
views/layout.ejs
3 changes: 3 additions & 0 deletions .istanbul.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
instrumentation:
root: ./api
excludes: ['**/responses/**', '**/services/**']
20 changes: 13 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# Pre-existing docker image with ffmpeg preloaded (Centos)
# To build: sudo docker build -t <your-username>/<repository-name> .
# To run: sudo docker run -it -p 1337:1337 --entrypoint='bash' <yout-username>/<repository-name>
# To run: sudo docker run -it -p 1337:1337 --entrypoint='bash' <your-username>/<repository-name>
FROM jrottenberg/ffmpeg

# install utilities
RUN yum -y update && yum -y install curl make gcc gcc-c++ git
RUN yum -y update && yum -y install curl make gcc gcc-c++ git bzip2

# install MP4Box (GPAC)
RUN yum -y install \
freetype-devel \
SDL-devel \
freeglut-devel

RUN curl -fsSL https://github.com/gpac/gpac/archive/v0.5.2.tar.gz -o gpac.tar.gz && \
tar -xzf gpac.tar.gz && cd gpac-0.5.2/ && \
ENV MP4Box_Version 0.6.0
RUN curl -fsSL https://github.com/gpac/gpac/archive/v${MP4Box_Version}.tar.gz -o gpac.tar.gz && \
tar -xzf gpac.tar.gz && cd gpac-${MP4Box_Version}/ && \
./configure --static-mp4box --use-zlib=no && \
make -j4 && make install && \
ln -s /usr/local/bin/MP4Box /usr/bin/MP4Box && \
cd .. && rm -rf gpac && rm gpac.tar.gz && rm -rf gpac-0.5.2
cd .. && rm -rf gpac && rm gpac.tar.gz && rm -rf gpac-${MP4Box_Version}

# install nodejs (version 0.11.0)
RUN curl -sL https://rpm.nodesource.com/setup | bash - && \
Expand All @@ -29,13 +30,18 @@ RUN npm --quiet -g install [email protected]
# install prerequisites
RUN npm install --quiet -g install grunt-cli bower

# Set /zoomable as pwd and copy all files to this container's directory
# Just add package.json to get the npm install cache
WORKDIR /zoomable
ADD . /zoomable
ADD package.json /zoomable
ADD bower.json /zoomable
ADD .bowerrc /zoomable

# install npm packages
RUN npm install && \
bower install --quiet --allow-root --config.interactive=false

# Set /zoomable as pwd and copy all files to this container's directory
ADD . /zoomable

# cleanup
RUN npm cache clean
Loading

0 comments on commit e8e272f

Please sign in to comment.