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

Home Forums Other Chrome not respecting video source inline media queries

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #183455

    Hi guys,

    Using the below, Chrome is not respecting the media queries to display the correct video source based on the device width. Chrome is just playing the first source it finds as you can see here: Any ideas what is wrong?

    <video id="intro-video" poster="img/poster.png" controls>
    <source src="videos/intro.mp4" type="video/mp4" media="all and (min-device-width:1600px)">
    <source src="videos/intro.webm" type="video/webm" media="all and (min-device-width:1600px)">
    <source src="videos/intro-1600.mp4" type="video/mp4" media="all and (min-device-width:1100px)">
    <source src="videos/intro-1600.webm" type="video/webm" media="all and (min-device-width:1100px)">
    <source src="videos/intro-1100.mp4" type="video/mp4" media="all and (min-device-width:481px)">
    <source src="videos/intro-1100.webm" type="video/webm" media="all and (min-device-width:481px)">
    <source src="videos/intro-480.mp4" type="video/mp4">
    <source src="videos/intro-480.webm" type="video/webm">

    Many thanks


    Inline media queries…are they supported yet…I didn’t think so but perhaps my information is out of date?

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