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
- [Vuejs]-How can I implement Vue 3's built in KeepAlive component to cache a child component of a page so that it only calls it's API on first page load
- [Vuejs]-Why I can't import the image inside a component Vue.js?
Source:stackexchange.com