The lengthy title sums up what I am trying to do but, to clarify a bit, I have a template mod' that adds a YouTube video to an XF sidebar on a particular page. The video is set to autoplay. Using the @media definitions it is possible to turn off the display of the video but it still plays (because it is only suppressing the display of the content, not the inclusion of it).
Any thoughts on being able to disabling the auto-play when the content is suppressed and/or disabling the inclusion of the content altogether based upon the browser size? I've been searching around but finding a viable solution.
Thanks for the suggestion. I just gave it a try and while the 0-by-0 size suppresses the display it is still playing. I've got a funny feeling that to stop it the video from playing, or to completely disable the inclusion, I'll need some JS.