mediawiki-extensions-EmbedVideo
mediawiki-extensions-EmbedVideo copied to clipboard
vplayer / evlplayer does not allow template parameters in its parameters
Describe the bug Creating a template with defined parameters to setup the videoplayer throughout the wiki hinders its usage.
E.g. <evlplayer poster="File:{{{cover|some_image.jpg}}}" service="youtube" defaultid="{{{video1|some_youtube_id}}}" />
coverwould allow someone to set the poster parameter for the player. In this case, by default it'll load "some_image.jpg".video1is the first parameter used to provide the first video id. As the first id provided, we want this to be the defaultid.
For Warcraft Wiki, we use a template to setup a cover image and a video list for animated series like Warbringers here. However, with the consent now setup, the background image was covered with the white background on the consent and so now we're using CSS to display it on the consent for these. However, since we can't pass video1 as the defaultid, the "load video" button does nothing until a user clicks one of the video links on the right then clicks the button.
To Reproduce Steps to reproduce the behavior:
- Go to https://warcraft.wiki.gg/wiki/Template:Videoplayer/dev
- Scroll down to the example section
- See error, try to start a video but it refuses since it can't accept a defaultid that includes a template parameter.
Expected behavior Be able to add parameters to the vplayer/evlplayer parameters and add information to them from a template.
Such as {{videplayer|cover=some_image.jpg|video1=some_id}}, should be able to display the cover and use that id just fine.
Screenshots
Technical information:
- OS: Windows 11
- Browser: Firefox Developer Edition
- Extension Version: 3.4.2 (3d81247) 12:16, 4 May 2024
- MediaWiki Version: 1.41.0
- Host type: wiki.gg
Have you tried using the parser tag method {{#evl:}}?
The wikitext inside regular parser tag <evlplayer> are not parsed, like other MediaWiki extensions.
CC-ing myself here. Suraf's been cut off from electricity.
Mm, #evl won't help since it's the link tag and not the player.
Piping evplayer through {{#tag:}} should work: {{#tag:evlplayer||defaultid=aExAYHQLwsY|id=wowtest|poster=File:{{{cover|Legacies_title.jpg}}}}} - ... but the poster parameter is causing the embed not to initialise. which is almost definitely a bug in the extension.
Is there any specific reason, though, why the tag does not expand its attributes?
Addressed in dev, arguments are now parsed and should expand accordingly, see screenshot :)
Thanks, we'll get the patch live around Thursday.
Though, is it possible to also get support in evlplayer for the cover/poster param? Currently it breaks the player altogether.
Actually, it seems cover/poster could use its own issue report. The parameter seems to break any embed when the consent gate is enabled server-side.