[Vuejs]-How load media by condition in Nuxt?

0👍

have you tried using the Device module? It is available in both Nuxt 2 and Nuxt 3 with some minor difference when installing it.

The Installing process is quite simple and very easy to use. After Installation, you can just use it like

<video
  :src="$device.isDesktop ? require('~/assets/video/intro.mp4') : ''"
/>

cheers

Leave a comment