I am using youtube videos on a website here
I have set a video to autoplay on home page. And In responsive mobile version (below resolution 767px) I hide the video using css display none. But video is still playing in the backend.
I did all this because I want to change the position of video in mobile version , so I hide the right sidebar video in mobile version and display the left side video.
Now I want to stop the video in mobile version when it is hide. But the video is still playing even when it is hidden using css. I know css can not stop iframe autoplay.
Is there any method which can relate the autoplay of youtube video depending upon the resolutions of the screen. So that we can play and stop the video as per the resolutions of the screen.