Skip to content

Commit

Permalink
switch to vjs.obj.each
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatsev committed Jul 1, 2014
1 parent c9b1217 commit b65eb0e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b65eb0e

Please sign in to comment.