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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user