Fixed the media scroller to work on the active player. (#101)

* Fixed the media scroller to work on the active player.

* Check existence of player first.
This commit is contained in:
Jas Singh
2024-08-10 00:45:12 -07:00
committed by GitHub
parent 48a5bedb37
commit f3d287ad59

View File

@@ -77,8 +77,8 @@ const Media = () => {
boxClass: "media", boxClass: "media",
name: "media", name: "media",
props: { props: {
on_scroll_up: () => mpris.getPlayer("")?.next(), on_scroll_up: () => activePlayer.value?.next(),
on_scroll_down: () => mpris.getPlayer("")?.previous(), on_scroll_down: () => activePlayer.value?.previous(),
on_primary_click: (clicked: any, event: Gdk.Event) => { on_primary_click: (clicked: any, event: Gdk.Event) => {
openMenu(clicked, event, "mediamenu"); openMenu(clicked, event, "mediamenu");
}, },