-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update mpris implementation #279
Conversation
Updates the requirements on [react-beautiful-dnd](https://github.com/atlassian/react-beautiful-dnd) to permit the latest version. - [Release notes](https://github.com/atlassian/react-beautiful-dnd/releases) - [Changelog](https://github.com/atlassian/react-beautiful-dnd/blob/master/CHANGELOG.md) - [Commits](https://github.com/atlassian/react-beautiful-dnd/commits/v10.0.3) Signed-off-by: dependabot[bot] <[email protected]>
…yarn/react-beautiful-dnd-tw-10.0.3 Update react-beautiful-dnd requirement from ^9.0.0 to ^10.0.3
Capitalized some text
I have started a Community-maintained package on chocolatey.org for this, as it was a request here chocolatey-community/chocolatey-package-requests#528
When a youtube playlist is entered in the search box, the different songs appear in the search results. Known limitations : - we should also be able to enter a song url (and not only playlist url) - not implemented - for now, only the first 100 songs of the playlist are displayed - some functionalities like "add all" or play all would make sense A first step towards uniformization of components was taken but isn't deployed everywhere yet (only in search results for now).
Add New Community-maintained package
Make Seekbar Container More Visible
Disable back and forward buttons when no history exists
feat(error): add a global ErrorBoundary component
feat: add a simple express rest api to remotly control nuclear
Api is ready to go. |
Add a basic mpris implementation by updating to mpris-service 2.0 and uncommenting old mpris code. Add additional methods to respond to mpris queries and methods to get and set the shuffle status, loop status, and position of the player. fixes nukeop#98
Ok ready for testing. |
Fantastic, thank you for your contribution. I will test it as soon as possible. |
|
||
module.exports = env => { | ||
const entry = env && env.LINUX ? './server/main.dev.linux.js' : './server/main.dev.js'; | ||
|
||
return { | ||
entry: entry, | ||
resolve: { | ||
alias: { | ||
jsbi: path.resolve(__dirname, 'node_modules', 'jsbi', 'dist', 'jsbi-cjs.js') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I need to look into why this works. @martpie came up with this. See this issue on mpris-service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSBI ships with a .mjs
version of the library. The thing is Webpack's electron-main
will try to import this .mjs
instead of the classic common JS file. Then things goes terribly wrong.
To me, this solution is a hack, but I am not sure if the problem comes from jsbi
builds, or node-dbus-next
(which seems to be written in cjs, but without a transpiler/bundler).
I am also looking for a better solution, but I can't manage to get this library working is the first place 😄 so this is not my top-priority.
I was just looking for a program to use mpris from the terminal, and found playerctl. Only after reading the readme and clicking the author's profile did I realize that it's you. Small world, or maybe you're just the most prominent in that niche. |
My thing is that I primarily do community-driven Linux Desktop projects 😎 This is part of a big project I'm doing to support mpris on electron players. It was inspired by people complaining on the Playerctl issue tracker that electron players don't work. I wrote about it here: https://dubstepdish.com/index.php/2019/03/17/the-great-node-mpris-project/ |
I also found out that dbus doesn't play nicely with tmux (apparently this combo causes an invalid socket location being saved in the environment, breaking playerctl). |
Yep, it can't connect to dbus at all. |
Ah ok you're running a code path I haven't tested in dbus-next. What is the value of |
|
I can reproduce this by launching a shell with I'm pretty sure this is a problem with electron disabling some node api for the filesystem. GPMDP works ok with the abstract socket code path, so that's promising. I'm trying to see if there are differences in the webpack or electron configuration that get this to work. The origin of the error is here within the node-bindings library, a dependency of the node They are trying to get the name of the file to find the However, the stack trace object ( Error.prepareStackTrace = function(e, st) {
for (var i = 0, l = st.length; i < l; i++) {
fileName = st[i].getFileName();
if (fileName !== __filename) {
if (calling_file) {
if (fileName !== calling_file) {
return;
}
} else {
return;
}
}
}
};
// run the 'prepareStackTrace' function above
Error.captureStackTrace(dummy); |
Here is an issue on the node-bindings repo with a similar issue. This seems to be related to webpack doing some sort of node: {
__filename: true,
__dirname: true
} That allows |
The abstract-socket dependency cannot be used in a bundle because it uses logic to find the bindings depending on a location in the filesystem within the node_modules directory
Ok, so the real issue is that abstract-socket and bindings cannot be put in the bundle because the logic to find the bindings depends on the location of I wish we didn't have to include this compiled file, but nodejs does not natively support abstract unix sockets so I don't see a way to write this dependency out. This fixes the issue, but I'm not sure what the implications of using I hope this doesn't put you in a bad spot. |
Does this work when we build the whole program in an Appimage, snap, etc? The whole problem with native dbus implementation was that it was impossible to bundle it correctly for these build targets, and it caused more trouble than it was worth. I'm fine if we have to use some black magic to get it to work, I'll test it later today. |
#555 implements mpris in our updated codebase. Thanks for helping us along the way. |
Add a basic mpris implementation by updating to mpris-service 2.0 and
uncommenting old mpris code.
Ref #98