Skip video if user is on mobile -


i want html5 video automatically skiped if user on mobile , instead load main site (index2.html).

i'm beginner have read of preload=none browser skips video/buffering. don't know how code though.

most mobile devices ignore autoplay attribute on video , not auto play video.

this protect users data usage , avoid data costs.

you may find site have behaviour require because of - i.e. play video on desktop, not on mobile, , hence can avoid having separate landing pages (index2.html etc).

update

if want check whether user on mobile browser , take 1 action rather (for example redirect different page no video), there number of techniques detect mobile browsers javascript. 1 linked below 1 prefer (currently...) - take @ of other suggested answers question @ link , can feel alternatives:


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -