Jas-SinghFSU / HyprPanel

A Bar/Panel for Hyprland with extensive customizability.
MIT License
478 stars 36 forks source link

Media Widget - Slider & Scrolling up/down #100

Closed Shubham-550 closed 1 month ago

Shubham-550 commented 1 month ago

Describe the bug

  1. Media Slider does not work for Firefox/Librewolf.
  2. Scrolling up/down on Media widget changes songs in spotify (which was paused) instead of player which is playing.

To Reproduce

  1. Play anything in Firefox/Librewolf. 2.Play a playlist in spotify & paused it. Then play a playist on browser/mpv. Use Scroll wheel to play next.

Expected behavior

  1. Slider should work for media playing in Firefox/Librewolf
  2. Scrolling should change media of the player currently playing.

Desktop (please complete the following information):

Shubham-550 commented 1 month ago

Media slider still not fixed for Firefox/Librewolf.

Jas-SinghFSU commented 1 month ago

I'm able to use the scroll wheel to navigate the youtube playlists in Firefox. What media website are you on that doesn't let you scroll?

Shubham-550 commented 1 month ago

I am talking about the slider in media menu.

https://github.com/user-attachments/assets/e092c620-466b-49b6-bc16-ea1ee15ab3a0

Jas-SinghFSU commented 1 month ago

Ahh I misread. I'll reopen the issue.

Jas-SinghFSU commented 1 month ago

This doesn't seem to be supported by Firefox since it doesn't return to us any length value from mpris. For instance, if we run playerctl metadata -a:

playerctl metadata -a                        
edge  mpris:artUrl              file:///tmp/.com.microsoft.Edge.CWpyAV
edge  mpris:length              4169781000
edge  mpris:trackid             '/org/chromium/MediaPlayer2/TrackList/Track3B581D3AC46636CEA9A473CF09EDFE33'
edge  xesam:album               
edge  xesam:artist              The Philly Special Show
edge  xesam:title               The Eagles are facing an INTERESTING dilemma! Mekhi Becton HANDLES Jalen Carter + Howie PURSUING WR?
firefox mpris:trackid             '/org/mpris/MediaPlayer2/firefox'
firefox xesam:title               Nest.js Crash Course #1 - Introduction & Setup
firefox xesam:album               
firefox xesam:artist              Net Ninja
firefox mpris:artUrl              file:///home/jaskir/.mozilla/firefox/firefox-mpris/282911_3.png
spotify mpris:trackid             /com/spotify/track/1xFMwu6WbXMq851BlxVfmb
spotify mpris:length              177376000
spotify mpris:artUrl              https://i.scdn.co/image/ab67616d0000b273fa6c4c0b1f1e2d9cd5c296fc
spotify xesam:album               A Day In Japan
spotify xesam:albumArtist         Retro Jungle
spotify xesam:artist              Cloud Break
spotify xesam:autoRating          0.16
spotify xesam:discNumber          1
spotify xesam:title               Birds Eye View
spotify xesam:trackNumber         17
spotify xesam:url                 https://open.spotify.com/track/1xFMwu6WbXMq851BlxVfmb

Notice that all the players except for firefox return the length value.

Good news however... it seems that the code for exposing length was recently merged 2 days ago https://hg.mozilla.org/mozilla-central/log/tip/widget/gtk/MPRISServiceHandler.cpp so it's only a matter of time until Firefox will expose length and the player can pick up the values.

Jas-SinghFSU commented 1 month ago

@Shubham-550 Closing for reason stated above but keep an eye out for firefox updates :)