You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#114061 Video without dimensions inserted

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Thursday, 29 June 2023 11:46 BST

p.barg
Hello,
I've inserted a HTML5 video (hosted on our own server) with the media manager. Unfortunately I seem to be unable to get rid of the dimensions.
I can eliminate width and height in the source code and that works - until I save the article the next time. Then the dimensions
are inserted back again. Is there a way to avoid this (like with the images where you can define for the image manager not to insert dimensions)?

Thanks,

Petra

Ryan
I can eliminate width and height in the source code and that works - until I save the article the next time. Then the dimensions
are inserted back again.


If you remove the dimensions in the Code tab save, the dimensions won't be added back. Thay will only be added again if you edit the video with the Media Manager dialog again (which I will fix in the next update).

Assuming you are using JCE Pro 2.9.38?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

p.barg
Hi Ryan,

thanks for your reply. Unfortunately I can't confirm the behaviour. The dimensions are also re-inserted if I switch back from code view to standard view of the editor and save the article. So for me the problem does not only occur if I open the Media Manager... Any ideas?

Yes, we're using JCE Pro 2.9.38

Thanks, Petra

Ryan
Any reason why you don't want to include the dimensions?

The dimensions are also re-inserted if I switch back from code view to standard view of the editor and save the article. So for me the problem does not only occur if I open the Media Manager... Any ideas?


Please send me a login - https://www.joomlacontenteditor.net/contact/site-login

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

p.barg
I have 2 divs with 50%: on the left hand side there is an image on the right hand side the video. If dimensions are inlcuded, the video doesn't fit correctly.
Especially if the site gets smaller the occupied space by the video looks odd. If no dimensions are inlcuded everything looks as it should.

Ryan
If dimensions are inlcuded, the video doesn't fit correctly. Especially if the site gets smaller the occupied space by the video looks odd. If no dimensions are inlcuded everything looks as it should.
Try adding the following to your template stylesheet:

video {
    max-width: 100%;
    height: auto;
}
This will preserve the aspect ratio of the image while scaling it down to fit the parent container div.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

p.barg
Thanks a lot, Ryan - that fixes the issue perfectly!

Ryan
Just to clarify, there are reasons why you would want to include dimensions for images and video, most notably:

Layout stability: Specifying the dimensions helps other elements on the page to position and flow correctly around the video. It prevents unexpected layout shifts that can occur when the video loads or when the page dynamically adjusts its content.

Accessibility: Providing explicit dimensions allows assistive technologies to understand and convey the video's size to users with disabilities. This helps in creating an inclusive experience for all users.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.