Comments (12)
Hey @itzmanish, I still need to go through a few PRs (like #389) and then I'll release a new version, probably in the following weeks!
from youtube-music.
Hey @th-ch thanks so much! I'm afraid there's a bug somewhere, attached are the tracebacks:
dbus-monitor-out.txt
mpris-remote-cmd-out.txt
I'm not sure if you have a linux distro available to test things out on, if you do you can check out playerctl or mpris-remote... otherwise I'll do my best to test things out whenever I get the chance
from youtube-music.
Hey @jrabinow & @azizLIGHT, thanks for the precise feedback! I have opened a draft PR #78 but I have no setup to test it 😬
Feel free to test it out and update the issue accordingly! To run it, you need node.js and yarn, then:
git clone https://github.com/th-ch/youtube-music
cd youtube-music
git checkout mpris
yarn
yarn start
from youtube-music.
I'm going to close this issue as all changes have shipped with the latest release. If people are still running into problems, please feel free to reopen.
Thanks everyone!
from youtube-music.
@JoeJoeTV I have possible fixes in mind but no way to test on windows. would you be willing to help me test?
if so add me on discord Araxeus#0819
fix playPause:
MPRISPlayer.on("playpause", playpause);
fix displayed time in mpris:
youtubePlayer.onTimeUpdate = time =>
mprisPlayer.seeked(time)
seek from mpris progress bar:
player.on('seek', (offset) => {
// note that offset may be negative
const currentPosition = youtubePlayer.getPositionInMicroseconds();
const newPosition = currentPosition + offset;
realPlayer.setPosition(newPosition);
});
docs:
https://www.npmjs.com/package/mpris-service
https://github.com/dbusjs/mpris-service/blob/master/src/index.js#L26-L132
https://github.com/dbusjs/mpris-service/search?q=seeked
https://github.com/dbusjs/mpris-service/blob/master/examples/player.js
from youtube-music.
There is some kind of mpris implementation because it works for me on Manjaro on Gnome. I can press pause/play/prev/next successfully and it carries over to my bluetooth headset buttons too. Maybe its not to spec like you say as some things are working for some and not others? In any case, here's what I noticed related to mpris:
When i query qdbus for track information by mpris, the app name is a random chromium instance number like org.mpris.MediaPlayer2.chromium.instance1820402
instead of something like org.mpris.MediaPlayer2.youtube-music
. I also can't query full track information with qdbus org.mpris.MediaPlayer2.chromium.instance1820402 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata
like you would for a player like vlc, I get nothing returned back on the prompt. A Gnome extension I use to display now-playing information in my top panel can find track information, but the Artist has - Topic
appended at the end of it and Title seems cutoff
.
The notifications show proper track information however:
Hope this info helps implementing the mpris spec fully!
from youtube-music.
@azizLIGHT I can only guess why it's working for you but not for me: since you mention you're using Gnome, would it be possible for Gnome to be using its own media keys solution independent of mpris? Maybe even something similar to this
On my end, my DE has no such media key service built in. I'm using a keyboard shortcut tied to https://github.com/mackstann/mpris-remote (actually I updated the code a fair bit, long story short it works with mpris2. Tested and confirmed all players work except this one). Per my understanding, the way dbus works internally is it looks for any mpris-compatible players that registered themselves and dispatches them the message - so my guess is the name of the app doesn't matter, it's just that there's no mpris support at the moment, or that it didn't register.
Would there be a way for you to confirm that the media keys are actually working through mpris on your setup? Possibly dbus-monitor
would be of help https://wiki.ubuntu.com/DebuggingDBus I'm not sure it'll display when apps receive a sent message but it's worth a shot IMO
EDIT: I have to say I'm quite mystified by your gnome plugin which doesn't seem to be using anything other than mpris (or maybe I'm missing something, I spent all of 10min looking through the source) - though I'm still rather confident that mpris isn't supported by youtube-music
app since grepping the source for mpris
didn't reveal a single result
from youtube-music.
Are there any updates to this? I could maybe test it on my Linux Mint install, if that helps.
from youtube-music.
I have tested on Arch linux with playerctl. So please merge this.
from youtube-music.
@th-ch when this will be release? I am waiting only for this because I don't know how do I install in arch linux. (PS- I am also lazy to go through tutorials)
from youtube-music.
@th-ch I created new PR #431 for this issue. Please check the PR for details.
from youtube-music.
I'm still having issues with this after updating to the newest version(1.14.0).
The mpris2 control now properly shows YouTube Music with the song info(title and artist) and also the cover, but only the previous and next buttons work.
There is also still a "Chromium" control, that shows the song info without a cover art, but there, all buttons(previous, play/pause, stop and skip) work in contrast to the "correct" control.
EDIT: Also the progress bar doesn't work as in, it doesn't reflect the progress of the playing song and changing it in the mpris control interface doesn't seek to that part. The "Chromium" control doesn't even show a progress bar.
EDIT2: I have looked into this using d-feet and qdbusviewer and the Play() and Pause() methods work, but the PlayPause() and Stop() methods do not. Also the Position property stays at 0 and the Seek method does nothing, no matter, what the argument value is.
I'm on Linux Mint Cinnamon 20.2 64x and have installed the .deb version.
from youtube-music.
Related Issues (20)
- [Feature Request]: Twitch functionalities HOT 1
- [Feature Request]: if possibile, down app volume
- [Bug]: Playback speed slider is not visible HOT 1
- [Feature Request]: Lyrics V2 Plugin HOT 2
- Suggesting An End User Persona HOT 6
- [Bug]: App starts to lag when I select a playlist with alot of songs HOT 6
- [Bug]: Fullscreen cuts off large amount of video with a black bar ontop HOT 2
- [Feature Request]: Disable search suggestions HOT 1
- [Bug]: when in full screen there is a big gap in the top pushing part of the video to be cropped by the screen HOT 1
- [Feature Request]: Video delay for bluetooth audio
- [Feature Request]: Download Real Support
- [Feature Request]: plugin to always play songs from the start
- [Feature Request]: don't make ~/.config/YouTube\ Music/config.json world writable HOT 1
- [Bug]: A JavaScript error occured in the main process HOT 1
- [Bug]: Cache is stored in the `.config` folder HOT 2
- [Bug]: Shows Constantly Cannot load YT Music ... Internet disconnected HOT 3
- [Feature Request]: Change Discord status from Playing Youtube Music to Listening to Youtube Music (changing status value) HOT 2
- [Bug]: Automatically got logged out of my account and now shows a black screen when I click on sign in HOT 1
- [Bug]: The entire app is black HOT 20
- [Bug]: FTBFS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtube-music.