Skip to content

Commit

Permalink
feat: drop v5 support (#119)
Browse files Browse the repository at this point in the history
Fix broken test and the build and drop v5 support.

BREAKING CHANGE: drop v5 support.
  • Loading branch information
gkatsev authored May 2, 2018
1 parent a8c5cfd commit f4440c1
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 53 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
18 changes: 1 addition & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,11 @@ sudo: false
dist: trusty
language: node_js
node_js:
- 'node'
- 'lts/argon'
- 'lts/*'
before_script:

# Check if the current version is equal to the major version for the env.
- 'export IS_INSTALLED="$(npm list video.js | grep "video.js@$VJS")"'

# We have to add semicolons to the end of each line in the if as Travis runs
# this all on one line.
- 'if [ -z "$IS_INSTALLED" ]; then
echo "INSTALLING video.js@>=$VJS.0.0-RC.0 <$(($VJS+1)).0.0";
npm i "video.js@>=$VJS.0.0-RC.0 <\$(($VJS+1)).0.0";
else
echo "video.js@$VJS ALREADY INSTALLED";
fi'
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
env:
- VJS=5
- VJS=6
addons:
firefox: latest
apt:
Expand Down
145 changes: 112 additions & 33 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
],
"dependencies": {
"global": "^4.3.2",
"video.js": "^5.19.2"
"video.js": "^6.8.0"
},
"devDependencies": {
"babel-plugin-external-helpers": "^6.22.0",
Expand All @@ -100,6 +100,7 @@
"karma-ie-launcher": "^1.0.0",
"karma-qunit": "^1.2.1",
"karma-safari-launcher": "^1.0.0",
"karma-safaritechpreview-launcher": "0.0.6",
"mkdirp": "^0.5.1",
"node-sass": "^4.5.3",
"node-static": "^0.7.9",
Expand Down
4 changes: 3 additions & 1 deletion src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ const errors = function(options) {

['extend', 'getAll', 'disableProgress'].forEach(k => {
errors[k] = function() {
videojs.log.warn(`The errors.${k}() method is not available until the plugin has been initialized!`);
videojs.log.warn(
`The errors.${k}() method is not available until the plugin has been initialized!`
);
};
});

Expand Down
6 changes: 5 additions & 1 deletion test/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,15 @@ QUnit.test('the plugin cleans up after its previous incarnation when called agai
QUnit.test('when dispose is triggered should not throw error ', function(assert) {
this.player.src(sources);
this.player.trigger('play');
this.player.trigger('dispose');
this.player.dispose();
this.clock.tick(45 * 1000);

assert.ok(!this.player.error(),
'should not throw player error when dispose is called.');

// reset this.player because otherwise afterEach will fail
this.fixture.appendChild(this.video);
this.player = videojs(this.video);
});

QUnit.test('progress clears player timeout errors', function(assert) {
Expand Down

0 comments on commit f4440c1

Please sign in to comment.