1

Is there a way to detect mobile and tablet devices and change css accordingly without using media queries? For this project I don't want to detect resolution, I just need to detect mobile/tablet devices and use css to display: none; a video on the page. Instead of the video that autoplays muted on desktop I need to show an image instead on mobile/tablet. This is because on mobile and tablet a play button appears, but since this is just an animated logo the play button is not appropriate.

midknyte
  • 587
  • 3
  • 6
  • 18
  • Could you explain why you can't use media queries or why they won't work in this instance? – Brett Dec 02 '19 at 19:31
  • Because I don't need to reconfigure the layout, I need to hide a video from mobile regardless of resolution size because they don't autoplay muted, they always show the play button so I need to swap it with a graphic instead. The most common mobile resolution in 2019 is 1080x1920. – midknyte Dec 02 '19 at 19:53
  • 1
    Media queries won't run off the _rendered_ device resolution, they will pay attention to the "points". See: https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions – Brett Dec 02 '19 at 20:12

0 Answers0