1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-25 02:42:10 +02:00

fix: silence unhandled promise rejection in Safari when seeking (#4860)

Fix #4853.
This commit is contained in:
Calvin Correli 2018-01-05 15:29:34 -05:00 committed by Gary Katsevman
parent 7c393e5c89
commit baf0982515
2 changed files with 30 additions and 8 deletions

35
package-lock.json generated
View File

@ -10765,13 +10765,26 @@
}
},
"remark-toc": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/remark-toc/-/remark-toc-4.0.1.tgz",
"integrity": "sha1-/zb/beVOoH3Vnj9TNKSjqsHpMYU=",
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/remark-toc/-/remark-toc-5.0.0.tgz",
"integrity": "sha512-j2A/fpio1nzNRJtY6nVaFUCtXNfFPxaj6I5UHFsFgo4xKmc0VokRRIzGqz4Vfs7u+dPrHjnoHkImu1Dia0jDSQ==",
"dev": true,
"requires": {
"mdast-util-toc": "2.0.1",
"remark-slug": "4.2.3"
"remark-slug": "5.0.0"
},
"dependencies": {
"remark-slug": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/remark-slug/-/remark-slug-5.0.0.tgz",
"integrity": "sha512-bRFK90ia6iooqC5KH6e9nEIL3OwRbTPU6ed2fm/fa66uofKdmRcsmRVMwND3pXLbvH2F022cETYlE7YlVs7LNQ==",
"dev": true,
"requires": {
"github-slugger": "1.2.0",
"mdast-util-to-string": "1.0.4",
"unist-util-visit": "1.1.3"
}
}
}
},
"remark-validate-links": {
@ -13048,6 +13061,14 @@
"videojs-ie8": "1.1.2",
"videojs-vtt.js": "0.12.4",
"xhr": "2.4.0"
},
"dependencies": {
"videojs-font": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-2.0.0.tgz",
"integrity": "sha1-r3Rh751LleAzS/+3iy8v8DZKkDQ=",
"dev": true
}
}
},
"videojs-flash": {
@ -13062,9 +13083,9 @@
}
},
"videojs-font": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-2.0.0.tgz",
"integrity": "sha1-r3Rh751LleAzS/+3iy8v8DZKkDQ="
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-2.1.0.tgz",
"integrity": "sha1-olkwpn9snPvyu4jay4xrRR8JM3k="
},
"videojs-ie8": {
"version": "1.1.2",

View File

@ -7,6 +7,7 @@ import {IE_VERSION, IS_IOS, IS_ANDROID} from '../../utils/browser.js';
import * as Dom from '../../utils/dom.js';
import * as Fn from '../../utils/fn.js';
import formatTime from '../../utils/format-time.js';
import {silencePromise} from '../../utils/promise';
import './load-progress-bar.js';
import './play-progress-bar.js';
@ -254,7 +255,7 @@ class SeekBar extends Slider {
*/
this.player_.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true });
if (this.videoWasPlaying) {
this.player_.play();
silencePromise(this.player_.play());
}
}