diff --git a/.babelrc b/.babelrc index c6ef2e7bb3..9a8be8c392 100644 --- a/.babelrc +++ b/.babelrc @@ -1,4 +1,4 @@ { - "presets": [ ["es2015", {"loose": true}] ], - "plugins": ["transform-es3-property-literals", "transform-es3-member-expression-literals", "inline-json"] + "presets": [ "es3", ["es2015", {"loose": true}] ], + "plugins": ["inline-json"] } diff --git a/package.json b/package.json index cbb10e5b5e..3b15b46117 100644 --- a/package.json +++ b/package.json @@ -49,10 +49,9 @@ "aliasify": "^2.1.0", "babel-cli": "^6.11.4", "babel-plugin-inline-json": "^1.1.1", - "babel-plugin-transform-es3-member-expression-literals": "^6.8.0", - "babel-plugin-transform-es3-property-literals": "^6.8.0", "babel-plugin-transform-runtime": "^6.9.0", "babel-preset-es2015": "^6.14.0", + "babel-preset-es3": "^1.0.1", "babel-register": "^6.9.0", "babelify": "^7.3.0", "blanket": "^1.1.6", diff --git a/src/js/component.js b/src/js/component.js index 5517592c43..2629421c05 100644 --- a/src/js/component.js +++ b/src/js/component.js @@ -1493,7 +1493,7 @@ class Component { const Player = Component.getComponent('Player'); - if (name === 'Player' && Player) { + if (name === 'Player' && Player && Player.players) { const players = Player.players; const playerNames = Object.keys(players); diff --git a/test/globals-shim.js b/test/globals-shim.js index 170e5b14db..989df9e37a 100644 --- a/test/globals-shim.js +++ b/test/globals-shim.js @@ -1,6 +1,6 @@ /* eslint-env qunit */ -// import 'es5-shim'; -// import 'es6-shim'; +import 'es5-shim'; +import 'es6-shim'; import document from 'global/document'; import window from 'global/window'; import sinon from 'sinon'; diff --git a/test/index.html b/test/index.html index 977d322efe..dee7975002 100644 --- a/test/index.html +++ b/test/index.html @@ -9,7 +9,7 @@
- + diff --git a/test/karma.conf.js b/test/karma.conf.js index 22c189fa1a..1be85889c8 100644 --- a/test/karma.conf.js +++ b/test/karma.conf.js @@ -10,6 +10,7 @@ module.exports = function(config) { // Compling tests here files: [ '../build/temp/video-js.css', + '../build/temp/ie8/videojs-ie8.min.js', '../test/globals-shim.js', '../test/unit/**/*.js', '../build/temp/browserify.js', diff --git a/test/unit/plugin-static.test.js b/test/unit/plugin-static.test.js index 9465ca1ae3..02ca5bf1a7 100644 --- a/test/unit/plugin-static.test.js +++ b/test/unit/plugin-static.test.js @@ -29,7 +29,7 @@ QUnit.test('registerPlugin() works with basic plugins', function(assert) { assert.strictEqual(Plugin.registerPlugin('foo', foo), foo, 'the plugin is returned'); assert.strictEqual(Plugin.getPlugin('foo'), foo, 'the plugin can be retrieved'); - assert.strictEqual(typeof Player.prototype.foo, 'function', 'the plugin has a wrapper function'); + assert.strictEqual(Object.prototype.toString.call(Player.prototype.foo), '[object Function]', 'the plugin has a wrapper function'); assert.notStrictEqual(Player.prototype.foo, foo, 'the function on the player prototype is a wrapper'); Plugin.deregisterPlugin('foo'); @@ -40,7 +40,7 @@ QUnit.test('registerPlugin() works with class-based plugins', function(assert) { assert.strictEqual(Plugin.registerPlugin('foo', Foo), Foo, 'the plugin is returned'); assert.strictEqual(Plugin.getPlugin('foo'), Foo, 'the plugin can be retrieved'); - assert.strictEqual(typeof Player.prototype.foo, 'function', 'the plugin has a factory function'); + assert.strictEqual(Object.prototype.toString.call(Player.prototype.foo), '[object Function]', 'the plugin has a factory function'); assert.notStrictEqual(Player.prototype.foo, Foo, 'the function on the player prototype is a factory'); Plugin.deregisterPlugin('foo'); diff --git a/test/unit/tech/html5.test.js b/test/unit/tech/html5.test.js index b718b3d45f..c7acf2686b 100644 --- a/test/unit/tech/html5.test.js +++ b/test/unit/tech/html5.test.js @@ -108,11 +108,11 @@ QUnit.test('test volume', function(assert) { tech.createEl(); - tech.el().volume = 0.7; - assert.strictEqual(tech.volume(), 0.7, 'can be changed from the element'); + tech.el().volume = 0.5; + assert.strictEqual(tech.volume(), 0.5, 'can be changed from the element'); - tech.setVolume(0.2); - assert.strictEqual(tech.volume(), 0.2, 'can be changed from the API'); + tech.setVolume(1); + assert.strictEqual(tech.volume(), 1, 'can be changed from the API'); }); QUnit.test('test defaultMuted', function(assert) {