-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supporting automatic width and height like EmbedVideo 2.X did #26
Comments
I'll look into it! :) |
Hey, Here you go: |
So, I've checked the code and found the following:
Since EmbedVideo v3, the global default width is changed to But I'll check further if something is not working as intended! |
I think the more interesting part is height="auto" - the width seems to be the expected 320, but height is not adjusting to fit. I don't really know what's different, but width="100%" did actually lead to the container width being used (in my case 1200 on my screen size) and height="auto" made a good aspect ratio out of it. V3 just seems to default to the default width and probably a default height as well, as it does not try to make a viewable aspect ratio out of it. Weird. Not sure what magic V2 had hidden. |
I can't fully re-create your issue on a local mediawiki installation. Would you be able to create a test page on your wiki with the config mentioned in the first post? |
Hey, The captcha issue is indeed pretty problematic, but seems to be a MediaWiki bug. Unfortunately we can't turn it off, as that led to massive spam roll before: https://phabricator.wikimedia.org/T311449 |
Hey, As stated before, the top two implementations led to a video autosized for maximum width of the container it is in with a fitting height to keep a viewable height to width ratio instead of a really small bar, but I've never tested it outside of the front page box with limited width. So it may not have been working on normal pages that have no container with limited width. If you want I can temporarily remove the captcha for you. We are currently hoping for a fix of the captcha, as without it we get around a hundred automated spam pages a day. Once I get time I'll probably disable the editing for unregistered people until a fix is available, but I need to get some minutes to get myself familiar with the configuration for that again. |
Have you been able to find anything new? |
Sorry for the late reply! I'm somewhat time constrained atm.😕 This seems to be an issue with the auto resizer: The problem is that I cant replicate the error using a local environment. I'll try to look at this in the following days, but if some other kind soul wants to take this on, I'd be more than happy! |
@D3nnis3n this should be fixed in the upcoming release :) |
In 3.2.0, you can use |
Just saw this (way too late, sorry), thanks a lot! Is there any way to use that in combination with a maximum height / width? Using autoresize=true seems to prevent width=640px to work? That was originally possible with the former extension - it allowed to have a default size that fits the preview image (or just the design) and have it scale down when mobile / small window. You can again see how it looks like on the URL i posted originally. |
Hello,
EmbedVideo 2.0 supported the following:
<youtube alignment="center" width="100%" height="auto">ud_refZuQoA</youtube>
(or: {{#ev:youtube|id=ud_refZuQoA|alignment=center|width=100%|height=auto}})
This automatically centered the video and sized it fittingly to maximum width of its container, keeping a height that made sense for aspect ratio - unfortunately I have not found an equivalent that works in your cool updated version, hence putting this as feature request. Using the same ways in EmbedVideo 3.0 will lead to a extremely small video that ignores it is supposed to extend to full width and adjust its height.
Unfortunatley I can no longer use the older EmbedVideo, as it broke with some Update, throwing a Error: invalid magic word 'evt'.
For now I have manually set width to 1200, which unfortunately leads to weird height aspect ratios when using different sized screens, as width doesn't variably adjust.
^ This view it did via the instructions mentioned at the start by default, adjusting perfectly on mobile or changing the screen.
The text was updated successfully, but these errors were encountered: