I have a very simple html page that hosts only a video. The controls
attribute is absent and autoplay
is present. This prevents the movie from playing on mobile (autoplay is banned and it cannot be started without controls).
<video class="center" width="1280" height="720" loop autoplay="autoplay" ondblclick="makeFullScreen(this)" >
Is there a way using either an attribute or some javascript to have different attribute for mobile and desktop, for example by using the media
attribute and a restriction on the screen size? A PHP solution serving different pages would also be acceptable, but second best.