{"action":"opened","issue":{"url":"https://api.github.com/repos/videojs/video.js/issues/1953","labels_url":"https://api.github.com/repos/videojs/video.js/issues/1953/labels{/name}","comments_url":"https://api.github.com/repos/videojs/video.js/issues/1953/comments","events_url":"https://api.github.com/repos/videojs/video.js/issues/1953/events","html_url":"https://github.com/videojs/video.js/issues/1953","id":62412464,"number":1953,"title":"Patch to support IE7","user":{"login":"doublex","id":274624,"avatar_url":"https://avatars.githubusercontent.com/u/274624?v=3","gravatar_id":"","url":"https://api.github.com/users/doublex","html_url":"https://github.com/doublex","followers_url":"https://api.github.com/users/doublex/followers","following_url":"https://api.github.com/users/doublex/following{/other_user}","gists_url":"https://api.github.com/users/doublex/gists{/gist_id}","starred_url":"https://api.github.com/users/doublex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doublex/subscriptions","organizations_url":"https://api.github.com/users/doublex/orgs","repos_url":"https://api.github.com/users/doublex/repos","events_url":"https://api.github.com/users/doublex/events{/privacy}","received_events_url":"https://api.github.com/users/doublex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-17T14:26:50Z","updated_at":"2015-03-17T14:26:50Z","closed_at":null,"body":"It would be very easy to still support IE7:\r\n\r\na)\r\nvjs.IS_IE8 = (/MSIE\\s8\\.0/).test(vjs.USER_AGENT); \r\n->\r\n // http://tanalin.com/en/articles/ie-version-js/\r\nvjs.IS_IE8 = (document.all && !document.addEventListener);\r\n\r\nb) A dummy for:\r\nObject.defineProperty()\r\nElement.querySelector()\r\n\r\nc) Remove some trailing commas from \"{,}\"\r\n\r\nPatch:\r\n\r\n```` \r\n*** video.dev.js-orig\t2015-03-17 14:58:08.371495894 +0100\r\n--- video.dev.js\t2015-03-17 15:21:59.815432074 +0100\r\n*************** vjs.IS_OLD_ANDROID = vjs.IS_ANDROID && (\r\n*** 1104,1110 ****\r\n  \r\n  vjs.IS_FIREFOX = (/Firefox/i).test(vjs.USER_AGENT);\r\n  vjs.IS_CHROME = (/Chrome/i).test(vjs.USER_AGENT);\r\n! vjs.IS_IE8 = (/MSIE\\s8\\.0/).test(vjs.USER_AGENT);\r\n  \r\n  vjs.TOUCH_ENABLED = !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch);\r\n  vjs.BACKGROUND_SIZE_SUPPORTED = 'backgroundSize' in vjs.TEST_VID.style;\r\n--- 1104,1110 ----\r\n  \r\n  vjs.IS_FIREFOX = (/Firefox/i).test(vjs.USER_AGENT);\r\n  vjs.IS_CHROME = (/Chrome/i).test(vjs.USER_AGENT);\r\n! vjs.IS_IE8 = (document.all && !document.addEventListener); // http://tanalin.com/en/articles/ie-version-js/\r\n  \r\n  vjs.TOUCH_ENABLED = !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch);\r\n  vjs.BACKGROUND_SIZE_SUPPORTED = 'backgroundSize' in vjs.TEST_VID.style;\r\n*************** vjs.ChaptersTrackMenuItem.prototype.upda\r\n*** 9409,9419 ****\r\n--- 9409,9429 ----\r\n  (function() {\r\n    'use strict';\r\n  \r\n+   // Support IE 7\r\n+   if (! Object.defineProperty) {\r\n+     Object.defineProperty = function() {};\r\n+   }\r\n+   \r\n    vjs.TextTrackSettings = vjs.Component.extend({\r\n      init: function(player, options) {\r\n        vjs.Component.call(this, player, options);\r\n        this.hide();\r\n  \r\n+       // Support IE 7\r\n+       if (! this.el().querySelector) {\r\n+         this.el().querySelector = function() {};\r\n+       }\r\n+       \r\n        vjs.on(this.el().querySelector('.vjs-done-button'), 'click', vjs.bind(this, function() {\r\n          this.saveSettings();\r\n          this.hide();\r\n*************** vjs.plugin = function(name, init){\r\n*** 10206,10212 ****\r\n  \r\n    var scrollSetting = {\r\n      \"\": true,\r\n!     \"up\": true,\r\n    };\r\n  \r\n    function findScrollSetting(value) {\r\n--- 10216,10222 ----\r\n  \r\n    var scrollSetting = {\r\n      \"\": true,\r\n!     \"up\": true\r\n    };\r\n  \r\n    function findScrollSetting(value) {\r\n*************** vjs.plugin = function(name, init){\r\n*** 11122,11128 ****\r\n      if (cue.vertical === \"\") {\r\n        this.applyStyles({\r\n          left:  this.formatStyle(textPos, \"%\"),\r\n!         width: this.formatStyle(cue.size, \"%\"),\r\n        });\r\n      // Vertical box orientation; textPos is the distance from the top edge of the\r\n      // area to the top edge of the box and cue.size is the height extending\r\n--- 11132,11138 ----\r\n      if (cue.vertical === \"\") {\r\n        this.applyStyles({\r\n          left:  this.formatStyle(textPos, \"%\"),\r\n!         width: this.formatStyle(cue.size, \"%\")\r\n        });\r\n      // Vertical box orientation; textPos is the distance from the top edge of the\r\n      // area to the top edge of the box and cue.size is the height extending\r\n*************** vjs.plugin = function(name, init){\r\n*** 11141,11147 ****\r\n          left: this.formatStyle(box.left, \"px\"),\r\n          right: this.formatStyle(box.right, \"px\"),\r\n          height: this.formatStyle(box.height, \"px\"),\r\n!         width: this.formatStyle(box.width, \"px\"),\r\n        });\r\n      };\r\n    }\r\n--- 11151,11157 ----\r\n          left: this.formatStyle(box.left, \"px\"),\r\n          right: this.formatStyle(box.right, \"px\"),\r\n          height: this.formatStyle(box.height, \"px\"),\r\n!         width: this.formatStyle(box.width, \"px\")\r\n        });\r\n      };\r\n    }\r\n```` "}}