css - how to auto play, full screen and no controls on mobile devices -


is there way full screen video auto play, no controls, work on mobile devices?

the methods have used have displayed play button black background.

<video poster="#url#" id="backgroundvideo"> <source src="#url#" type="video/mp4"> <source src="#url#" type="video/ogg"> <source src="#url#" type="video/webm"> </video>  backgroundvideo {  position: fixed; top: 50%; left: 50%; min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: -1000; -ms-transform: translatex(-50%) translatey(-50%); -moz-transform: translatex(-50%) translatey(-50%); -webkit-transform: translatex(-50%) translatey(-50%); transform: translatex(-50%) translatey(-50%); background: url(#url#) no-repeat; background-size: cover;  background-size: 100%; background-position: center; } 

the bellow autoplay source:

<video width="320" height="240" autoplay>   <source src="changeme.mp4" type="video/mp4"> </video> 

if wanted display message if user's browser not support method:

<video width="320" height="240" autoplay>   <source src="changeme.mp4" type="video/mp4">   browser not support video. </video> 

the above code supported following browsers , minimum version numbers:

enter image description here


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 -