From 4e0325013e04b73b8c8022cc62f55083d194ca6a Mon Sep 17 00:00:00 2001 From: Laurent de Goede Date: Tue, 7 Jun 2016 11:53:50 -0400 Subject: [PATCH] @IJsLauw fixed unhandled exception in deleting poster on ios7. closes #3337 --- CHANGELOG.md | 1 + src/js/player.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4820335d8..b4bb9e7b99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) -------------------- diff --git a/src/js/player.js b/src/js/player.js index b086b16f78..517f3948dc 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -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()) { - delete this.tag.poster; // Chrome Fix. Fixed in Chrome v16. + try { + delete this.tag.poster; // Chrome Fix. Fixed in Chrome v16. + } + catch (e) { + log('deleting tag.poster throws in some browsers', e); + } this.play(); } }