StarCitizenWiki / mediawiki-extensions-EmbedVideo

GDPR focused EmbedVideo. Supports YouTube, Twitch, Spotify and SoundCloud
https://www.mediawiki.org/wiki/Extension:EmbedVideo_(fork)
Other
27 stars 15 forks source link

vplayer / evlplayer displays big block if no id is provided by default #73

Closed Suraf closed 9 months ago

Suraf commented 10 months ago

(First of all, thanks for reimplementing these back into the forked version of the extension! I'm sure communities beyond just Warcraft Wiki could really use them!)

Describe the bug When those tags, vplayer or evlplayer is added like <vplayer /> or <evlplayer />, they instead display this huge block that is otherwise empty.

The original experience, there was no empty block like this. Nothing. Whenever a video link is clicked (vlink or evl), this area would expand to that video.

To Reproduce Just create an article and add <vplayer /> or the other tag to the article.

Example: https://warcraft.wiki.gg/wiki/Dragonflight_in-game_cinematics

image

Expected behavior There should be no big empty space where the video would appear if no default video id is provided.

So it should look like this: image

When any of the video links is clicked, it expands and displays the video. It'll stay there forever, won't shrink back down or anything. image

Technical information:

Additional context Let me know if you'd like me to clarify anything.

octfx commented 10 months ago

That is currently expected behavior.
You can hide the empty embed by adding the following css:

.evlplayer[data-service="videolink"] {
  display: none;
}

I'll add this to the 3.4.1 release :)

Suraf commented 10 months ago

The problem with the CSS is that it also hides the video when a link is clicked.

octfx commented 10 months ago

That shouldn't be the case.
The data-service attribute on the player gets updated with the corresponding service from the video link. With the videolink service being only used for empty embeds.

Empty Embed: image

After clicking a video link: image

Can you confirm that the data-service attribute changes after a video link gets clicked?

Suraf commented 10 months ago

I can confirm that the data-service does not change at all from videolink after clicking a video link. I've tried it on this page: https://warcraft.wiki.gg/wiki/Shadowlands_in-game_cinematics data-service-videolink

octfx commented 10 months ago

Was an oversight on my part! When explicit consent is not required, the service parameter was not updated.

Fixed in develop.