Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #991349

    We have a site with an autoplay video on the front page. The video is quite big (over 40mb) and is set to not display on mobile devices. It’s a bit hard to tell, but it seems that when the site is loaded on a mobile device the video file is actually downloaded, but then not displayed. In this country cellular data is not cheap, so forcing your visitors to download a 40mb file is rather rude. Is there a way to tell devices which can’t actually show the content not to download it?

    I have my own views on autoplay videos – particularly on the homepage – but ‘that’s what the client wants’.

    #991401

    private url added

    #991416

    Hi,

    Thank you for using Enfold.

    Add this script in the functions.php file to remove the video container on mobile view.

    add_action('wp_head', 'ava_remove_video_on_mobile', 10);
    function ava_remove_video_on_mobile() {
        if(wp_is_mobile()) {
        ?>
        <script>
            (function($) {
                $('.avia-slideshow .mejs-container').remove();
            })(jQuery); 
        </script>
        <?php
        } 
    }
    

    Please test it on an actual mobile device.

    Best regards,
    Ismael

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.