Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Responsive Images for Video Poster

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #271803
    oloolo
    Participant

    I have a page with two different videos and different aspect sizes depending on whether someone accesses my site with a mobile device or on desktop. I would like to not only offer different videos but also different posters (stills)

    <video controls height="100%" width="100%" poster="/image1.png">
    <source src="https://xyz.com/1.mp4" type="video/mp4" media="all and (max-width: 444px)" > 
    <source src="https://xyz.com/2.mp4" type="video/mp4" media="all and (min-width: 445px)" > 
    </source>
    </video> 
    

    What can I do to integrate image2.png and load it with video 2.mp4

    #271846
    chris_2080
    Participant

    hint: specify a transparent image as the actual poster image

    in css change it in media query

    https://codepen.io/chris3000/pen/wXBwyr

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.