0

My video launches perfectly on windows but as soon as I play on an android smartphone the video is no longer read I saw that it was necessary to go through playsinline but it does not work thank you for your help

 <script>
    jQuery(document).ready(function($) {
        var Video_back = new video_background($("#home"), { 
            "position": "absolute", //Follow page scroll
            "z-index": "-1",        //Behind everything
            "loop": true,           //Loop when it reaches the end
            "autoplay": true,       //Autoplay at start
            "muted": true,          //Muted at start
            "mp4":"ionos/videos/logo.mp4" ,     //Path to video mp4 format
            "video_ratio": 1.7778,              // width/height -> If none provided sizing of the video is set to adjust
            "fallback_image": "ionos/images/dummy.png",   //Fallback image path
            "priority": "html5"             //Priority for html5 (if set to flash and tested locally will give a flash security error)
        });
    });
</script>
dragon sly
  • 37
  • 3
  • Check [this](https://stackoverflow.com/questions/42160528/html5-autoplay-video-in-mobile-device) out. Maybe you haven't taken everything into account – simplecreator May 31 '21 at 13:52

1 Answers1

0

You need the playsinline attribute there otherwise there is no ways you can get that working on mobile devices. I'm not sure if there is a way of you getting it work using the tag though.

Example:

<video width="100%" height="auto" autoplay muted loop playsinline id="my_video">
<source data-src="/video.mp4" type="video/mp4">
</video>