Skip to content

Commit

Permalink
@nickygerritsen fixed texttrack handling in IE10. closes #2481
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicky Gerritsen authored and gkatsev committed Aug 19, 2015
1 parent d0e2ede commit 33de008
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ CHANGELOG
* @gkatsev moved default and player dimensions to style els at the top of HEAD el ([view](https://github.com/videojs/video.js/pull/2482))
* @gkatsev removed non-default track auto-disabling ([view](https://github.com/videojs/video.js/pull/2475))
* @gkatsev exported event helpers on videojs object ([view](https://github.com/videojs/video.js/pull/2491))
* @nickygerritsen fixed texttrack handling in IE10 ([view](https://github.com/videojs/video.js/pull/2481))

--------------------

Expand Down
4 changes: 2 additions & 2 deletions src/js/tech/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class Html5 extends Tech {
let emulatedTt = this.textTracks();

// remove native event listeners
if (tt) {
if (tt && tt.removeEventListener) {
tt.removeEventListener('change', this.handleTextTrackChange_);
tt.removeEventListener('addtrack', this.handleTextTrackAdd_);
tt.removeEventListener('removetrack', this.handleTextTrackRemove_);
Expand Down Expand Up @@ -184,7 +184,7 @@ class Html5 extends Tech {
proxyNativeTextTracks_() {
let tt = this.el().textTracks;

if (tt) {
if (tt && tt.addEventListener) {
tt.addEventListener('change', this.handleTextTrackChange_);
tt.addEventListener('addtrack', this.handleTextTrackAdd_);
tt.addEventListener('removetrack', this.handleTextTrackRemove_);
Expand Down

0 comments on commit 33de008

Please sign in to comment.