1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-27 11:22:06 +02:00

@IJsLauw fixed unhandled exception in deleting poster on ios7. closes #3337

This commit is contained in:
Laurent de Goede 2016-06-07 11:53:50 -04:00 committed by Gary Katsevman
parent 8d5a1b1193
commit 4e0325013e
2 changed files with 7 additions and 1 deletions

View File

@ -4,6 +4,7 @@ CHANGELOG
## HEAD (Unreleased)
* @gkatsev pinned dependencies to direct versions ([view](https://github.com/videojs/video.js/pull/3338))
* @gkatsev fixed minified vjs in ie8 when initialized with id string ([view](https://github.com/videojs/video.js/pull/3357))
* @IJsLauw fixed unhandled exception in deleting poster on ios7 ([view](https://github.com/videojs/video.js/pull/3337))
--------------------

View File

@ -773,7 +773,12 @@ class Player extends Component {
// In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays)
// This fixes both issues. Need to wait for API, so it updates displays correctly
if (this.src() && this.tag && this.options_.autoplay && this.paused()) {
try {
delete this.tag.poster; // Chrome Fix. Fixed in Chrome v16.
}
catch (e) {
log('deleting tag.poster throws in some browsers', e);
}
this.play();
}
}