简体   繁体   中英

Video working on iPhone, but not iPad

I've built a site that uses the HTML5 Video format, and it works great on the iPhone, and pretty much everywhere else, except the iPad.

On the iPad it doesn't even load up the video.

I've checked this on an iPad Mini, and iPad simulators in xCode.

Any idea why it would work on the iPhone, but not the iPad?

http://www.leschinskidesign.com.php53-10.ord1-1.websitetestlink.com/Loki/

Turns out it was due to the "controls" tag not being present in the markup.

However I did not want the controls to be visible to end users. So I had to find a way to enable controls for the iPad, but nothing else.

function isiPhone(){ return ((navigator.platform.indexOf("iPad") != -1));}

if(isiPhone()){    var video = document.getElementById('player');
      video.controls = true;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM