Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Jun 2014
    Posts
    37
    Member #
    39433
    Liked
    1 times

    If <video> then don't play on mobile

    Hi, I have a html5 page using <video> tag and running .webm files. It all works quite smoothly.

    However, I would like to not run the video on mobile devices and instead replace it with the jpeg poster.

    This is the setup now:

    Code:
    <video id="video" preload="auto" poster="video1.jpg" autoplay muted loop>
                        <source src="video1.webm" type="video/webm" />
    					<source src="video1.ogv" type="video/ogv" />
    					<source src="video1.mp4" type="video/mp4" />
    					Your browser does not support the video tag. I suggest you upgrade your browser.
    </video>
    Any ideas? Thanks

  2.  

  3. #2
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    Use media queries to hide the video and show the jpeg for mobile is the quickest way i can think of. Can be done other ways but anytime i can use pure css to do something i try to use that.


    Sent from my iPhone using Tapatalk


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Tags for this Thread

All times are GMT -6. The time now is 12:48 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com