MyBB Community Forums

Full Version: Simple Audio Video Embeder ADJUST VIDEO SIZE ON MOBILE SCREEN
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I have downloaded the Simple Audio Video Embeder plugin, all works well except when I try to view the page on mobile screen. It does not automatically readjust. I tried editing global.css in styles but I have no luck so far. 

When I pasted this code to the end of the global.css, the videos disappeared completely, but I could see in inspect element that it resizes the videos correctly - it makes the embed invisible for some reason.
/* Responsive styling for embedded videos */
iframe {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  position: relative;
}

iframe[src*="youtube.com"] {
  /* Specific styling for YouTube videos if needed */
  /* Add any additional styling here */
}


If anyone here could help me resolve this issue, I would be very grateful and I am willing to pay you for your help.
I think you might be needing to use media queries. Below is a link that might be of some insight :
https://stackoverflow.com/questions/3813...le-devices