From b65eb0e5f3843960962166e4f063b358f6ea0564 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Tue, 1 Jul 2014 16:11:32 -0400 Subject: [PATCH] switch to vjs.obj.each --- src/js/player.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/js/player.js b/src/js/player.js index 77c28e35f..e82da3622 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -162,8 +162,7 @@ vjs.Player.prototype.createEl = function(){ var el = this.el_ = vjs.Component.prototype.createEl.call(this, 'div'), tag = this.tag, - attrs, - attr; + attrs; // Remove width/height attrs from tag so CSS can make it 100% width/height tag.removeAttribute('width'); @@ -195,11 +194,11 @@ vjs.Player.prototype.createEl = function(){ // Copy over all the attributes from the tag, including ID and class // ID will now reference player box, not the video tag attrs = vjs.getAttributeValues(tag); - for (attr in attrs) { + vjs.obj.each(attrs, function(attr) { if (Object.prototype.hasOwnProperty.call(attrs, attr)) { el.setAttribute(attr, attrs[attr]); } - } + }); // Update tag id/class for use as HTML5 playback tech // Might think we should do this after embedding in container so .vjs-tech class