diff --git a/src/js/tech/html5.js b/src/js/tech/html5.js index eb890d4961..f6d1fb7f04 100644 --- a/src/js/tech/html5.js +++ b/src/js/tech/html5.js @@ -95,7 +95,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_); @@ -208,7 +208,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_);