mirror of
https://github.com/videojs/video.js.git
synced 2025-03-29 22:07:10 +02:00
refactor: removed old bug work-around code (#5200)
This removes some old workarounds for Chrome 15 and Safari 5.
This commit is contained in:
parent
5c15d48635
commit
ceed382222
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user