Milkshiift / GoofCord

:shield: Take control of your Discord experience with GoofCord – the highly configurable and privacy minded discord client.
Open Software License 3.0
113 stars 5 forks source link

[BUG] Invidious replacement iframe overshooting frame #9

Closed jacksongoode closed 5 months ago

jacksongoode commented 5 months ago

Description

It seems that the Invidious instance that replaces the YouTube player extends past the frame of the existing video player. This makes the fullscreen button hidden.

Guessing some additional css props might need to be added here: https://github.com/Milkshiift/GoofCord-Scripts/blob/main/patches/BL12_invidiousEmbeds.js

Steps to Reproduce

Play a video with Invidious replaced.

Expected Behavior

Replacement video player should fit the same player size.

Actual Behavior

Frame is underfitted.

Screenshots

image

Environment

Milkshiift commented 5 months ago

This is rather a problem in the library that Invidious uses for its embeds ― video.js, that doesn't do the scaling properly. The invidious controls bar is also pretty bloated with useless buttons for an embed. While it's theoretically feasible to address this on GoofCord's side with CSS, the only way I can think of to do this is to constantly scan the DOM for the Invidious iframe and inject CSS into it, which will hurt performance and is a bad solution overall. Will probably never get fixed unless I find a better way to inject CSS into iframes