Skip to content

Commit

Permalink
@IJsLauw fixed unhandled exception in deleting poster on ios7. closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
IJsLauw authored and gkatsev committed Jun 7, 2016
1 parent 8d5a1b1 commit 4e03250
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

--------------------

Expand Down
7 changes: 6 additions & 1 deletion src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 4e03250

Please sign in to comment.