1
0
mirror of https://github.com/videojs/video.js.git synced 2024-11-28 08:58:46 +02:00

@gkatsev cleared waiting/spinner on timeupdate. Fixes #3124. closes #3138

This commit is contained in:
Gary Katsevman 2016-03-07 14:48:15 -05:00
parent cb3d709237
commit f77bcc95d0
3 changed files with 10 additions and 0 deletions

View File

@ -4,6 +4,7 @@ CHANGELOG
## HEAD (Unreleased)
* @gkatsev updated videojs badges in the README ([view](https://github.com/videojs/video.js/pull/3134))
* @BrandonOCasey converted remaining text-track modules to ES6 ([view](https://github.com/videojs/video.js/pull/3130))
* @gkatsev cleared waiting/spinner on timeupdate. Fixes #3124 ([view](https://github.com/videojs/video.js/pull/3138))
--------------------

View File

@ -812,6 +812,7 @@ class Player extends Component {
handleTechWaiting_() {
this.addClass('vjs-waiting');
this.trigger('waiting');
this.one('timeupdate', () => this.removeClass('vjs-waiting'));
}
/**

View File

@ -943,3 +943,11 @@ test('player#reset loads the first item in the techOrder and then techCalls rese
equal(loadedSource, null, 'with a null source');
equal(techCallMethod, 'reset', 'we then reset the tech');
});
test('Remove waiting class on timeupdate after tech waiting', function() {
let player = TestHelpers.makePlayer();
player.tech_.trigger('waiting');
ok(/vjs-waiting/.test(player.el().className), 'vjs-waiting is added to the player el on tech waiting');
player.trigger('timeupdate');
ok(!/vjs-waiting/.test(player.el().className), 'vjs-waiting is removed from the player el on timeupdate');
});