make background videos work on ipad #1778

This commit is contained in:
Hakim El Hattab 2017-01-31 16:24:06 +01:00
parent 981a8b98e4
commit 7daa0e04de
1 changed files with 3 additions and 0 deletions

View File

@ -3212,6 +3212,9 @@
else { else {
el.removeEventListener( 'loadeddata', startEmbeddedMedia ); // remove first to avoid dupes el.removeEventListener( 'loadeddata', startEmbeddedMedia ); // remove first to avoid dupes
el.addEventListener( 'loadeddata', startEmbeddedMedia ); el.addEventListener( 'loadeddata', startEmbeddedMedia );
// `loadeddata` never fires unless we start playing on iPad
if( /ipad/gi.test( UA ) ) el.play();
} }
} }