From 218386a7008a208c93f07aee02a8db605c57db70 Mon Sep 17 00:00:00 2001 From: Steve Heffernan Date: Thu, 27 Jun 2013 17:43:35 -0700 Subject: [PATCH 1/4] Fixed double captions in Chrome --- src/css/video-js.css | 4 ++-- src/js/player.js | 19 +++++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/css/video-js.css b/src/css/video-js.css index 9419a8818b..65483aa830 100644 --- a/src/css/video-js.css +++ b/src/css/video-js.css @@ -712,9 +712,9 @@ so you can upgrade to newer versions easier. You can remove all these styles by /* There's unfortunately no CC button in FontAwesome, so we need to manually create one. Please +1 the fontawesome request. https://github.com/FortAwesome/Font-Awesome/issues/968 */ -.vjs-default-skin .vjs-captions-button { +/*.vjs-default-skin .vjs-captions-button { font-size: 1em; /* Font icons are 1.5em */ -} +/*}*/ .vjs-default-skin .vjs-captions-button:before { content: "\e008"; font-family: VideoJS; diff --git a/src/js/player.js b/src/js/player.js index 184112ddef..fa11f68257 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -148,12 +148,23 @@ vjs.Player.prototype.createEl = function(){ // so we'll need to turn off any default tracks if we're manually doing // captions and subtitles. videoElement.textTracks if (tag.hasChildNodes()) { - var nrOfChildNodes = tag.childNodes.length; - for (var i=0,j=tag.childNodes;i Date: Thu, 27 Jun 2013 17:46:18 -0700 Subject: [PATCH 2/4] Fixed ie9 captions icon size. fixes #542 --- src/css/video-js.css | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/css/video-js.css b/src/css/video-js.css index 65483aa830..afb3cfaef2 100644 --- a/src/css/video-js.css +++ b/src/css/video-js.css @@ -710,23 +710,10 @@ so you can upgrade to newer versions easier. You can remove all these styles by .vjs-default-skin .vjs-subtitles-button:before { content: "\e00c"; } /* There's unfortunately no CC button in FontAwesome, so we need - to manually create one. Please +1 the fontawesome request. + to use another font. Please +1 the fontawesome request. https://github.com/FortAwesome/Font-Awesome/issues/968 */ -/*.vjs-default-skin .vjs-captions-button { - font-size: 1em; /* Font icons are 1.5em */ -/*}*/ .vjs-default-skin .vjs-captions-button:before { content: "\e008"; - font-family: VideoJS; - font-size: 1.5em; - line-height: 2; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - text-align: center; - text-shadow: none; } From be123469097e9804240f71f90c3f99cf1907f767 Mon Sep 17 00:00:00 2001 From: Steve Heffernan Date: Thu, 27 Jun 2013 17:48:25 -0700 Subject: [PATCH 3/4] Fixed linting issue in chrome dobule captions fix. fixes #564 --- src/js/player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/player.js b/src/js/player.js index fa11f68257..17254fcfe4 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -162,7 +162,7 @@ vjs.Player.prototype.createEl = function(){ } } - for (var i = 0; i < removeNodes.length; i++) { + for (i=0; i Date: Thu, 27 Jun 2013 18:19:07 -0700 Subject: [PATCH 4/4] Figured out that IE9 requires ending track tags, and updated demos --- build/demo-files/demo.html | 2 +- sandbox/index.html.example | 1 + src/js/core.js | 4 +++- src/js/player.js | 12 ++++-------- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/build/demo-files/demo.html b/build/demo-files/demo.html index ca1d7b5218..fb26a08712 100644 --- a/build/demo-files/demo.html +++ b/build/demo-files/demo.html @@ -23,7 +23,7 @@ - + diff --git a/sandbox/index.html.example b/sandbox/index.html.example index be52b7be31..e86e5248fc 100644 --- a/sandbox/index.html.example +++ b/sandbox/index.html.example @@ -24,6 +24,7 @@ +

Video Playback Not Supported

diff --git a/src/js/core.js b/src/js/core.js index ef62e961d6..28f047765d 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -3,7 +3,9 @@ */ // HTML5 Shiv. Must be in to support older browsers. -document.createElement('video');document.createElement('audio'); +document.createElement('video'); +document.createElement('audio'); +document.createElement('track'); /** * Doubles as the main function for users to create a player instance and also diff --git a/src/js/player.js b/src/js/player.js index 17254fcfe4..569ab04b90 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -113,22 +113,18 @@ vjs.Player.prototype.getTagSettings = function(tag){ // Get tag children settings if (tag.hasChildNodes()) { - var child, childName, - children = tag.childNodes, - i = 0, - j = children.length; + var children, child, childName, i, j; - for (; i < j; i++) { + children = tag.childNodes; + + for (i=0,j=children.length; i