Skip to content

Commit

Permalink
Code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatsev committed Aug 12, 2015
1 parent cdb0740 commit e90738c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/js/tech/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Html5 extends Tech {
let emulatedTt = this.textTracks();

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

if (tt && tt.addEventListener) {
if (tt) {
tt.addEventListener('change', this.handleTextTrackChange_);
tt.addEventListener('addtrack', this.handleTextTrackAdd_);
tt.addEventListener('removetrack', this.handleTextTrackRemove_);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tracks/tracks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ test('when switching techs, we should not get a new text track', function() {
ok(htmltracks === flashtracks, 'the tracks are equal');
});

if (Html5.supportsNativeTextTracks() && ('removetrack' in Html5.TEST_VID.textTracks)) {
if (Html5.supportsNativeTextTracks() && ('onremovetrack' in Html5.TEST_VID.textTracks)) {
test('listen to native remove and add track events in native text tracks', function(assert) {
let done = assert.async();

Expand Down

0 comments on commit e90738c

Please sign in to comment.