If <video> then don't play on mobile

Discussion in 'HTML & Website Design' started by 7643sfsag6, Jul 9, 2015.

  1. #1
    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:

    <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!
     
    7643sfsag6, Jul 9, 2015 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    1) NEVER auto-play a video, it just pisses off users.

    2) if it's not auto-playing, why would it be a "problem" on mobile to have it showing. It would then just show the poster with the option to play it.

    So solution, don't utterly and completely piss off visitors to the site with the auto-play bull!
     
    deathshadow, Jul 9, 2015 IP
  3. COBOLdinosaur

    COBOLdinosaur Active Member

    Messages:
    515
    Likes Received:
    123
    Best Answers:
    11
    Trophy Points:
    95
    #3
    When I land on a site and they auto play anything; I leave. I don't care what they have, I don't care what the site looks like, and I don't care what they think is appropriate to shove down my throat. I don't use sites that show that level of disrespect for users, and there is nothing on any site on the internet that is not available somewhere else where they respect a user's right to decide what they want to see or hear.
     
    COBOLdinosaur, Jul 10, 2015 IP