1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-30 17:42:06 -04:00

osd(media): workaround for firefox reporting youtube thumbnails as

players
fixes #2298
This commit is contained in:
bbedward
2026-04-28 11:27:16 -04:00
parent dc5636bed5
commit aeb3fdd637
3 changed files with 60 additions and 13 deletions

View File

@@ -67,6 +67,16 @@ Singleton {
onTriggered: root.activePlayer?.positionChanged()
}
function isFirefoxYoutubeHoverPreview(player: MprisPlayer): bool {
if (!player)
return false;
const id = (player.identity || "").toLowerCase();
if (!id.includes("firefox"))
return false;
const url = (player.metadata?.["xesam:url"] || "").toString();
return /^https?:\/\/(www\.)?youtube\.com\/?($|\?|#)/i.test(url);
}
function previousOrRewind(): void {
if (!activePlayer)
return;