mediawiki-extensions-EmbedVideo icon indicating copy to clipboard operation
mediawiki-extensions-EmbedVideo copied to clipboard

vplayer / evlplayer does not allow template parameters in its parameters

Open Suraf opened this issue 1 year ago • 6 comments

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}}}" />

  • cover would allow someone to set the poster parameter for the player. In this case, by default it'll load "some_image.jpg".
  • video1 is 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:

  1. Go to https://warcraft.wiki.gg/wiki/Template:Videoplayer/dev
  2. Scroll down to the example section
  3. 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 videoplayer-bug

videoplayer-bug2

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

Suraf avatar Jun 28 '24 22:06 Suraf

Have you tried using the parser tag method {{#evl:}}? The wikitext inside regular parser tag <evlplayer> are not parsed, like other MediaWiki extensions.

alistair3149 avatar Jul 12 '24 20:07 alistair3149

CC-ing myself here. Suraf's been cut off from electricity.

alex4401 avatar Jul 13 '24 21:07 alex4401

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?

alex4401 avatar Jul 13 '24 22:07 alex4401

Addressed in dev, arguments are now parsed and should expand accordingly, see screenshot :) image

octfx avatar Jul 14 '24 13:07 octfx

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.

alex4401 avatar Jul 16 '24 02:07 alex4401

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.

alex4401 avatar Jul 16 '24 03:07 alex4401