diff --git a/Gruntfile.js b/Gruntfile.js index 89a9142..a0435f8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -81,4 +81,8 @@ module.exports = function(grunt) { 'qunit', 'concat', 'uglify']); + + grunt.registerTask('test', [ + 'jshint' + ]); }; diff --git a/lib/videojs-resolution-switcher.js b/lib/videojs-resolution-switcher.js index e2f356e..cb4f767 100644 --- a/lib/videojs-resolution-switcher.js +++ b/lib/videojs-resolution-switcher.js @@ -80,7 +80,7 @@ // Probably because of https://github.com/videojs/video-js-swf/issues/124 // If player preload is 'none' and then loadeddata not fired. So, we need timeupdate event for seek handle (timeupdate doesn't work properly with flash) var handleSeekEvent = 'loadeddata'; - if(this.player_.preload() == 'none' && this.player_.techName_ != 'Flash') { + if(this.player_.preload() === 'none' && this.player_.techName_ !== 'Flash') { handleSeekEvent = 'timeupdate'; } setSourcesSanitized(this.player_, this.src, this.options_.label, customSourcePicker).one(handleSeekEvent, function() { @@ -201,7 +201,7 @@ */ player.getGroupedSrc = function(){ return groupedSrc; - } + }; /** * Method used for sorting list of sources diff --git a/package.json b/package.json index 61d3c92..ffb197a 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,12 @@ "source", "videojs-plugin" ], - "dependencies": {}, + "scripts": { + "test": "grunt test" + }, + "dependencies": { + "grunt": "^0.4.5" + }, "devDependencies": { "grunt-contrib-clean": "^0.7", "grunt-contrib-concat": "^0.5",