Skip to content
This repository has been archived by the owner on Aug 21, 2019. It is now read-only.

Commit

Permalink
We're a real project now
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Feb 24, 2016
1 parent d3f58a4 commit 08163e3
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .jscsrc
Expand Up @@ -11,6 +11,6 @@
"requireSpacesInConditionalExpression": true,
"requireSpaceAfterLineComment": true,
"requirePaddingNewLinesInObjects": true,
"requireNewlineBeforeBlockStatements": true,
"requireNewlineBeforeBlockStatements": false,
"requireBlocksOnNewline": true
}
3 changes: 1 addition & 2 deletions .jshintrc
Expand Up @@ -13,8 +13,7 @@
"require" : false,
"module" : false,
"console" : false,
"File" : false,
"FrameByFrame": false
"File" : false
}
}

5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
# 2016-02-24

- made this into an actual project now, bower, npm support
- we'll call this 1.0

# 2016-02-24

- @miguelgrinberg added support for VideoJS 5.X
68 changes: 68 additions & 0 deletions Gruntfile.js
@@ -0,0 +1,68 @@
/*global module:false*/
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.title || pkg.name %> v<%= pkg.version %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) Eric Rasche 2015-<%= grunt.template.today("yyyy") %>' +
' - Licensed <%= pkg.license %> */\n',
// Task configuration.
concat: {
options: {
banner: '<%= banner %>',
stripBanners: true
},
dist: {
src: ['<%= pkg.main %>'],
dest: 'dist/<%= pkg.main %>'
}
},
uglify: {
options: {
banner: '<%= banner %>'
},
dist: {
src: '<%= concat.dist.dest %>',
dest: 'dist/videojs.framebyframe.min.js'
}
},
jshint: {
src: {
options: {
jshintrc: '.jshintrc'
},
src: ['<%= pkg.main %>']
},
},
jscs: {
src: ['<%= concat.dist.src %>'],
options: {
config: '.jscsrc',
esnext: false, // If you use ES6 http://jscs.info/overview.html#esnext
verbose: true, // If you need output with rule names http://jscs.info/overview.html#verbose
fix: false, // Autofix code style violations when possible.
requireCurlyBraces: [ "if" ]
}
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
}
}
});

// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jscs');

// Default task.
grunt.registerTask('default', ['jshint', 'jscs', 'concat', 'uglify']);

};
24 changes: 24 additions & 0 deletions bower.json
@@ -0,0 +1,24 @@
{
"name": "videojs-framebyframe",
"version": "1.0.0",
"homepage": "https://github.com/erasche/videojs-framebyframe",
"description": "video.js plugin that allows users to step frame-by-frame through a video.",
"main": "videojs.framebyframe.js",
"keywords": [
"video",
"videojs",
"videojs-plugin"
],
"license": "GPL3",
"ignore": [
".gitignore",
"node_modules",
"bower_components",
"README.md",
"CHANGELOG.md",
"examples"
],
"dependencies": {
"video.js": ">=5.3.0",
}
}
4 changes: 4 additions & 0 deletions dist/videojs.framebyframe.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions package.json
@@ -0,0 +1,36 @@
{
"name": "videojs-framebyframe",
"version": "1.0.0",
"description": "video.js plugin that allows users to step frame-by-frame through a video.",
"main": "videojs.framebyframe.js",
"repository": {
"type": "git",
"url": "https://github.com/erasche/videojs-framebyframe.git"
},
"scripts": {
"test": "echo No tests yet!"
},
"keywords": [
"video",
"videojs",
"videojs-plugin"
],
"dependencies": {
"video.js": ">=5.3.0"
},
"devDependencies": {
"grunt": ">=0.4.5",
"grunt-contrib-concat": ">=0.4.0",
"grunt-contrib-jshint": ">=0.10.0",
"grunt-contrib-uglify": ">=0.5.0",
"grunt-contrib-watch": ">=0.6.1",
"grunt-jscs": "^2.7.0"
},
"author": "Eric Rasche",
"license": "GPL3",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/erasche/videojs-framebyframe/issues"
},
"homepage": "https://github.com/erasche/videojs-framebyframe"
}
4 changes: 2 additions & 2 deletions video-framebyframe.js → videojs.framebyframe.js
Expand Up @@ -11,7 +11,7 @@ var FBFButton = videojs.extend(VjsButton, {
},

onClick: function() {
//Start by pausing the player
// Start by pausing the player
this.player.pause();
// Calculate movement distance
var dist = this.frameTime * this.step_size;
Expand Down Expand Up @@ -43,5 +43,5 @@ function framebyframe(options) {
{}, opt.index);
});
});
};
}
videojs.plugin('framebyframe', framebyframe);

0 comments on commit 08163e3

Please sign in to comment.