From 10d5edd310521918d3c7274005171580eac91228 Mon Sep 17 00:00:00 2001 From: Matthew McClure Date: Mon, 29 Sep 2014 13:13:44 -0700 Subject: [PATCH] @doublex fix. #1495 --- src/js/player.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/js/player.js b/src/js/player.js index 39d88d8049..01e2878365 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -235,7 +235,13 @@ vjs.Player.prototype.createEl = function(){ // ID will now reference player box, not the video tag attrs = vjs.getElementAttributes(tag); vjs.obj.each(attrs, function(attr) { - el.setAttribute(attr, attrs[attr]); + // workaround so we don't totally break IE7 + // http://stackoverflow.com/questions/3653444/css-styles-not-applied-on-dynamic-elements-in-internet-explorer-7 + if (attr == 'class') { + el.className = attrs[attr]; + } else { + el.setAttribute(attr, attrs[attr]); + } }); // Update tag id/class for use as HTML5 playback tech