diff --git a/src/js/player.js b/src/js/player.js index 569ab04b9..07f853c72 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -210,7 +210,7 @@ vjs.Player.prototype.loadTech = function(techName, source){ // So we need to remove it if we're not loading HTML5 } else if (techName !== 'Html5' && this.tag) { this.el_.removeChild(this.tag); - this.tag.player = null; + this.tag['player'] = null; this.tag = null; } diff --git a/test/unit/player.js b/test/unit/player.js index c68d29099..18fb8d0e2 100644 --- a/test/unit/player.js +++ b/test/unit/player.js @@ -108,7 +108,8 @@ test('should get tag, source, and track settings', function(){ player.dispose(); - ok(tag['player'] === null, 'tag player ref killed'); + + ok(tag['player'] !== player, 'tag player ref killed'); ok(!vjs.players['example_1'], 'global player ref killed'); ok(player.el() === null, 'player el killed'); });