Stop background video downloading on mobile viewports

Asked on January 13, 2016 in How To.

I am using a full screen background video in the slider widget for a single page site.  I would like to stop  the video downloading for mobile viewports and replace with a background png.

I am currently using the following CSS in DevKit (under the tablet and mobile  panels):

.swiper-slide video {display:none;}

.swiper-slide {
background-image: url(imageurlhere.png);
}

This hides the video perfectly on my iphone, but when you touch anywhere on the screen, the video appears and starts to play.  I would ideally like the video to not be downloaded in the first place, or at least completely hidden.

Link to test page:
http://www.michaelgoodson.co.uk/SC_TEST

Any help greatly appreciated.

littlegoodson Layers User
Reply
  • Possible Answers to Your Question:

  • 1 Answer(s)
    Answered on January 20, 2016.

    Hi there,
    The slider is already coded to do this if a background image is set. If you have devices that ignore it, use background instead of background-image. Also add visibility: hidden to the video selector

    Thank you for the reply,

    Unfortunately this still is not working as you say.  The full screen video is replaced by the still image when viewed on mobile (both set in the slider ‘background options) , but as soon as you interact with  the button in the slider (a mailto link) the video launches and is then activated with every touch on the screen afterwards.

    Event using the below code does note hide the video/stop it becoming activated on touch:

    .swiper-slide video {
    display:none;
    visibility:hidden;
    }

    Am I doing something wrong for the video to still display on mobile (testing on an iPhone 6+)?  The page can be seen at www.solidcollective.co.uk.

    Many thanks

    on February 17, 2016.

    I would like to help you. Everything related to video and photo shooting is a responsible process. Therefore, I advise you to turn to professionals https://www.photographytalk.com/photo-shoot-vs-photoshoot who know their job. Although I am a beginner photographer, I get all my knowledge only there.

    on January 30, 2020.

    I wish I could help you with this issue, maybe it’s essential to read additional tutorials to solve it. Once I had similar problems with jungle jackpots free play and eventually, manage to resolve it upon reading through some related material

    on October 20, 2020.

    Even a newbie bettor can play and win, if they are educated about deposits, bets, withdrawals, banking methods, and more, which can make or break online gambling experience. Casinority https://casinority.com/slots/playboy-by-microgaming/ explains these things, and educates on smart gambling.

    on December 28, 2020.

    Thank you so much for sharing this info this is what I am looking for my YOWhatsApp Apk site page which is a modified version of WhatsApp.

    on March 29, 2021.
    Reply