Skip to content

Commit

Permalink
refactor: removed old bug work-around code (#5200)
Browse files Browse the repository at this point in the history
This removes some old workarounds for Chrome 15 and Safari 5.
  • Loading branch information
brandonocasey authored and gkatsev committed Jun 25, 2018
1 parent 5c15d48 commit ceed382
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1170,19 +1170,6 @@ class Player extends Component {

// Update the duration if available
this.handleTechDurationChange_();

// Chrome and Safari both have issues with autoplay.
// In Safari (5.1.1), when we move the video element into the container div, autoplay doesn't work.
// 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.currentSrc()) && this.tag && this.options_.autoplay && this.paused()) {
try {
// Chrome Fix. Fixed in Chrome v16.
delete this.tag.poster;
} catch (e) {
log('deleting tag.poster throws in some browsers', e);
}
}
}

/**
Expand Down

0 comments on commit ceed382

Please sign in to comment.