Skip to content

Commit

Permalink
Move onremovetrack check into the Supports function.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatsev committed Aug 12, 2015
1 parent e90738c commit 887e45c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/js/tech/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,9 @@ Html5.supportsNativeTextTracks = function() {
if (supportsTextTracks && browser.IS_FIREFOX) {
supportsTextTracks = false;
}
if (supportsTextTracks && ('onremovetrack' in Html5.TEST_VID.textTracks)) {
supportsTextTracks = false;
}

return supportsTextTracks;
};
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() && ('onremovetrack' in Html5.TEST_VID.textTracks)) {
if (Html5.supportsNativeTextTracks()) {
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 887e45c

Please sign in to comment.