c5e63b38 by Gary Katsevman

Merge branch 'master' into withcredentials

Conflicts:
	package.json
	test/.jshintrc
2 parents fb85d65a 07c7021e
language: node_js
node_js:
- '0.10'
before_script:
- npm install -g grunt-cli
notifications:
hipchat:
rooms:
secure: l5TTd5JuPAW883PtcyaIBcJI9Chr9JpsZPQAEUBKAgIEwzuS6y7t5arlkS1PwH6gi1FADzYDf+OXSIou4GkTSrIetnBcT/SAgF0gBKgIhj+eRkuCfZ4VaC7BPhfZ0hgYRE+5Ejf5BM2MJafRm0pj7OlqG4xKrQZwtuV1te5r3JY=
irc: chat.freenode.net#videojs
#addons:
#sauce_connect:
#username:
#secure: "Y++AtTlMXkcPAx+K0cL6uzn4FlmfiIki5bkGCkowoYSCxq1X9tNta39JONSVSeZKBlP58GJwNJdB4Wq1CpJL4NriGc3UvpcgNcrILGOWLczX0zFvXkOIaLn0bUuierf4wzUjk3i6XOh83NrMaX+gBHXb8RVUEBf2z0/WM3zHrEM="
#access_key:
#secure: "bCan88WIWqm6jP4ZtDbLVrrGXe1a33otfQhi7SYp95wHFLemUHS1JyXv+HbbbsW5dNjatfdhzvc47bpw4LbccL6evVR9sb2Tld15TxW2a2WQtMPzvOfj55aP1YQtIxYwy14swifWGK/Lj/A0ZUCUNolCf7DjCK6hZGaWaDRtdIE="
......
......@@ -32,7 +32,7 @@ module.exports = function(grunt) {
'src/segment-parser.js',
'src/stream.js',
'src/m3u8/m3u8-parser.js'
],
],
dest: 'dist/videojs.hls.js'
}
},
......@@ -107,10 +107,90 @@ module.exports = function(grunt) {
logConcurrentOutput: true
}
}
}
},
karma: {
options: {
frameworks: ['qunit']
},
saucelabs: {
configFile: 'test/karma.conf.js',
autoWatch: true
},
dev: {
browsers: ['Chrome', 'Safari', 'Firefox',
'Opera', 'IE', 'PhantomJS', 'ChromeCanary'],
configFile: 'test/localkarma.conf.js',
autoWatch: true
},
chromecanary: {
options: {
browsers: ['ChromeCanary'],
configFile: 'test/localkarma.conf.js',
autoWatch: true
}
},
phantomjs: {
options: {
browsers: ['PhantomJS'],
configFile: 'test/localkarma.conf.js',
autoWatch: true
}
},
opera: {
options: {
browsers: ['Opera'],
configFile: 'test/localkarma.conf.js',
autoWatch: true
}
},
chrome: {
options: {
browsers: ['Chrome'],
configFile: 'test/localkarma.conf.js',
autoWatch: true
}
},
safari: {
options: {
browsers: ['Safari'],
configFile: 'test/localkarma.conf.js',
autoWatch: true
}
},
firefox: {
options: {
browsers: ['Firefox'],
configFile: 'test/localkarma.conf.js',
autoWatch: true
}
},
ie: {
options: {
browsers: ['IE'],
configFile: 'test/localkarma.conf.js',
autoWatch: true
}
},
ci: {
configFile: 'test/karma.conf.js',
autoWatch: false
}
},
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
......@@ -120,6 +200,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('manifests-to-js', 'Wrap the test fixtures and output' +
' so they can be loaded in a browser',
......@@ -177,4 +259,10 @@ module.exports = function(grunt) {
'concat',
'uglify']);
grunt.registerTask('test', ['jshint', 'manifests-to-js', 'karma:saucelabs']);
// travis build task
grunt.registerTask('test-local', ['jshint', 'manifests-to-js', 'qunit']);
};
......
......@@ -61,7 +61,7 @@
type="application/x-mpegURL">
</video>
<script>
videojs.options.flash.swf = 'node_modules/videojs-swf/dist/video-js.swf';
videojs.options.flash.swf = 'node_modules/video.js/dist/video-js/video-js.swf';
// initialize the player
var player = videojs('video');
......
{
"name": "videojs-contrib-hls",
"version": "0.3.1",
"version": "0.3.2",
"engines": {
"node": ">= 0.10.12"
},
......@@ -10,7 +10,7 @@
},
"license": "Apache 2",
"scripts": {
"test": "grunt"
"test": "grunt test-local"
},
"devDependencies": {
"grunt-contrib-jshint": "~0.6.0",
......@@ -24,11 +24,23 @@
"grunt-open": "0.2.3",
"grunt-shell": "0.6.1",
"grunt": "~0.4.1",
"sinon": "~1.9.0"
"sinon": "~1.9.0",
"grunt-karma": "~0.6.2",
"karma": "~0.10.0",
"karma-sauce-launcher": "~0.1.8",
"karma-chrome-launcher": "~0.1.2",
"karma-firefox-launcher": "~0.1.3",
"karma-ie-launcher": "~0.1.1",
"karma-opera-launcher": "~0.1.0",
"karma-phantomjs-launcher": "~0.1.1",
"karma-safari-launcher": "~0.1.1",
"karma-qunit": "~0.1.1",
"video.js": "^4.5"
},
"peerDependencies": {
"video.js": "^4.5"
},
"dependencies": {
"video.js": "git+https://github.com/videojs/video.js.git#v4.4.1",
"videojs-swf": "git+https://github.com/videojs/video-js-swf.git#v4.4.0",
"videojs-contrib-media-sources": "git+https://github.com/videojs/videojs-contrib-media-sources.git"
}
}
......
......@@ -11,6 +11,7 @@
"boss": true,
"eqnull": true,
"browser": true,
"node": true,
"predef": [
"QUnit",
"module",
......@@ -27,6 +28,7 @@
"strictEqual",
"notStrictEqual",
"throws",
"sinon"
"sinon",
"process"
]
}
......
var fixture = document.createElement('div');
fixture.id = 'qunit-fixture';
document.body.appendChild(fixture);
// Karma example configuration file
// NOTE: To configure Karma tests, do the following:
// 1. Copy this file and rename the copy with a .conf.js extension, for example: karma.conf.js
// 2. Configure the properties below in your conf.js copy
// 3. Run your tests
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
frameworks: ['qunit'],
// Set autoWatch to true if you plan to run `grunt karma` continuously, to automatically test changes as you make them.
autoWatch: false,
// Setting singleRun to true here will start up your specified browsers, run tests, and then shut down the browsers. Helpful to have in a CI environment, where you don't want to leave browsers running continuously.
singleRun: true,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
// Example usage:
browsers: ['chrome_test'],
//'firefox_test',
//'safari_test',
//'ipad_test',
//'android_test'
// List of files / patterns to load in the browser
// Add any new src files to this list.
// If you add new unit tests, they will be picked up automatically by Karma,
// unless you've added them to a nested directory, in which case you should
// add their paths to this list.
files: [
'../node_modules/video.js/dist/video-js/video.js',
'../node_modules/videojs-contrib-media-sources/videojs-media-sources.js',
'../test/karma-qunit-shim.js',
"../src/videojs-hls.js",
"../src/flv-tag.js",
"../src/exp-golomb.js",
"../src/h264-stream.js",
"../src/aac-stream.js",
"../src/segment-parser.js",
"../src/stream.js",
"../src/m3u8/m3u8-parser.js",
"../tmp/manifests.js",
"../tmp/expected.js",
"tsSegment-bc.js",
"../src/bin-utils.js",
"../src/async-queue.js",
'../test/*.js'
],
plugins: [
'karma-qunit',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-ie-launcher',
'karma-opera-launcher',
'karma-phantomjs-launcher',
'karma-safari-launcher',
'karma-sauce-launcher'
],
// list of files to exclude
exclude: [
],
// test results reporter to use
// possible values: 'dots', 'progress', 'junit'
reporters: ['progress'],
// web server port
port: 9876,
// cli runner port
runnerPort: 9100,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
//logLevel: config.LOG_INFO,
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000,
// global config for SauceLabs
sauceLabs: {
startConnect: true,
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
build: process.env.TRAVIS_BUILD_NUMBER,
testName: process.env.TRAVIS_BUILD_NUMBER + process.env.TRAVIS_BRANCH,
recordScreenshots: false
},
//define SL browsers
customLaunchers: {
chrome_test: {
singleRun: true,
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows XP'
},
firefox_test: {
singleRun: true,
base: 'SauceLabs',
browserName: 'firefox',
platform: 'Windows 8'
},
safari_test: {
singleRun: true,
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.8'
},
ipad_test: {
singleRun: true,
base: 'SauceLabs',
browserName: 'ipad',
platform:'OS X 10.8'
},
android_test: {
singleRun: true,
base: 'SauceLabs',
browserName: 'android',
platform:'Linux'
}
}
});
};
// Karma example configuration file
// NOTE: To configure Karma tests, do the following:
// 1. Copy this file and rename the copy with a .conf.js extension, for example: karma.conf.js
// 2. Configure the properties below in your conf.js copy
// 3. Run your tests
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
frameworks: ['qunit'],
// Set autoWatch to true if you plan to run `grunt karma` continuously, to automatically test changes as you make them.
autoWatch: false,
// Setting singleRun to true here will start up your specified browsers, run tests, and then shut down the browsers. Helpful to have in a CI environment, where you don't want to leave browsers running continuously.
singleRun: true,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
// Example usage:
// browsers: [],
// List of files / patterns to load in the browser
// Add any new src files to this list.
// If you add new unit tests, they will be picked up automatically by Karma,
// unless you've added them to a nested directory, in which case you should
// add their paths to this list.
files: [
'../node_modules/video.js/dist/video-js/video.js',
'../node_modules/videojs-contrib-media-sources/videojs-media-sources.js',
'../test/karma-qunit-shim.js',
"../src/videojs-hls.js",
"../src/flv-tag.js",
"../src/exp-golomb.js",
"../src/h264-stream.js",
"../src/aac-stream.js",
"../src/segment-parser.js",
"../src/stream.js",
"../src/m3u8/m3u8-parser.js",
"../tmp/manifests.js",
"../tmp/expected.js",
"tsSegment-bc.js",
"../src/bin-utils.js",
"../src/async-queue.js",
'../test/*.js'
],
plugins: [
'karma-qunit',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-ie-launcher',
'karma-opera-launcher',
'karma-phantomjs-launcher',
'karma-safari-launcher'
],
// list of files to exclude
exclude: [
],
// test results reporter to use
// possible values: 'dots', 'progress', 'junit'
reporters: ['progress'],
// web server port
port: 9876,
// cli runner port
runnerPort: 9100,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
//logLevel: config.LOG_INFO,
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000
});
};
\ No newline at end of file