From 9f647ef0810b92004f2d133e7818fc21638fe53f Mon Sep 17 00:00:00 2001 From: Steve Heffernan Date: Fri, 28 Jun 2013 15:42:47 -0700 Subject: [PATCH] Fixed an issue where the tag player reference wasn't getting killed in the minified version --- src/js/player.js | 2 +- test/unit/player.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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'); });