Help with wordpress and youtube on mobile

Hello guys, I have a wordpress website and I want to make a youtube video autoplay ONLY on desktop.

I tried many things but everything failed, I tried to hide the css class for the container, and it worked on the background and the sound was on.

All I need is youtube video as a background for the container on a page, but only autoplay for dekstop and tablets.

Can someone help me out please ??, since I searched for days and cannot find an answer.

Thanks in advance.