mirror of
https://github.com/videojs/video.js.git
synced 2024-11-24 08:42:25 +02:00
@forbesjo updated player to not autoplay if there is no source. closes #2971
This commit is contained in:
parent
aa4700b098
commit
867fec910f
@ -8,6 +8,7 @@ CHANGELOG
|
||||
* @rcrooks fixed some broken links in guides ([view](https://github.com/videojs/video.js/pull/2965))
|
||||
* @forbesjo fixed errorDisplay erroring on subsequent openings ([view](https://github.com/videojs/video.js/pull/2966))
|
||||
* @incompl updated build command in CONTRIBUTING.md ([view](https://github.com/videojs/video.js/pull/2967))
|
||||
* @forbesjo updated player to not autoplay if there is no source ([view](https://github.com/videojs/video.js/pull/2971))
|
||||
|
||||
--------------------
|
||||
|
||||
|
@ -720,7 +720,7 @@ class Player extends Component {
|
||||
// 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.tag && this.options_.autoplay && this.paused()) {
|
||||
if (this.src() && this.tag && this.options_.autoplay && this.paused()) {
|
||||
delete this.tag.poster; // Chrome Fix. Fixed in Chrome v16.
|
||||
this.play();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user