Skip to content
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

Use local file as cover image if fetching external thumbnails is disabled #13

Closed
aesulus opened this issue Oct 10, 2021 · 5 comments
Closed
Labels
enhancement New feature or request

Comments

@aesulus
Copy link

aesulus commented Oct 10, 2021

For external (e.g. YouTube) embeds, if $wgEmbedVideoRequireConsent = true and $wgEmbedVideoFetchExternalThumbnails = false, then the embed will be covered with a gray screen saying "Click to show content".

Is it possible to specify a local file to use as the cover image instead of the gray screen? If so, what is the wikitext syntax? If not, can this be added as an argument to the #ev parser function?

@aesulus aesulus added the bug Something isn't working label Oct 10, 2021
@octfx octfx added enhancement New feature or request and removed bug Something isn't working labels Oct 11, 2021
@octfx
Copy link
Member

octfx commented Oct 11, 2021

This is currently not possible. But as this seems like a very useful feature, I'll add it in the next release. :)

@octfx
Copy link
Member

octfx commented Oct 11, 2021

Should now work using develop branch.

See example 4 and 5, you can add |thumbnail=File:... and |title=... anywhere on the #ev parser function

@aesulus
Copy link
Author

aesulus commented Oct 13, 2021

Great! I can't wait until this makes it to a stable release. I'd love to test it on our wiki, but unfortunately, I'm constrained.

This is beyond my original issue, but why is it |thumbnail= for external videos but |cover= for local videos?

Also, why not make every unnamed parameter a named parameter too?

@octfx
Copy link
Member

octfx commented Oct 13, 2021

The thumbnail cover naming was indeed an unnecessary inconsistency. Both parameters are now called cover.

Since refactoring the extension every parameter can already be called as a named parameter, but the documentation was lacking.
I've updated the readme to include some examples of using named parameres, thanks for pointing this out!

Release v3.0.6 should include your requested feature.

@octfx
Copy link
Member

octfx commented Oct 23, 2021

Working as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants