1
0
mirror of https://github.com/videojs/video.js.git synced 2025-07-13 01:30:17 +02:00

@mister-ben silenced chrome's play() request was interrupted by pause() error. closes #3518

This commit is contained in:
mister-ben
2016-08-15 17:49:52 -04:00
committed by Gary Katsevman
parent bf2eabf82d
commit fa1c6430f4
3 changed files with 27 additions and 1 deletions

View File

@ -442,3 +442,20 @@ test('Html5#reset calls Html5.resetMediaElement when called', function() {
Html5.resetMediaElement = oldResetMedia;
});
QUnit.test('Exception in play promise should be caught', function() {
const oldEl = tech.el_;
tech.el_ = {
play: () => {
return new Promise(function(resolve, reject) {
reject(new DOMException());
});
}
};
tech.play();
QUnit.ok(true, 'error was caught');
tech.el_ = oldEl;
});