1
0
mirror of https://github.com/videojs/video.js.git synced 2025-07-03 00:57:02 +02:00

@bc-bbay fixed a bug where the player would try to autoplay when there was no source. closes #2127

This commit is contained in:
Brandon Bay
2015-05-13 15:10:55 -07:00
committed by heff
parent ec53eda738
commit 652a44026f
3 changed files with 35 additions and 1 deletions

View File

@ -76,7 +76,7 @@ vjs.Html5 = vjs.MediaTechController.extend({
// 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
player.ready(function(){
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();
}