playerctl | 🎧 mpris media player command-line controller | Media Player library

 by   altdesktop C Version: v2.4.1 License: LGPL-3.0

kandi X-RAY | playerctl Summary

kandi X-RAY | playerctl Summary

playerctl is a C library typically used in Media, Media Player applications. playerctl has no bugs, it has no vulnerabilities, it has a Weak Copyleft License and it has medium support. You can download it from GitHub.

Playerctl is a command-line utility and library for controlling media players that implement the MPRIS D-Bus Interface Specification. Playerctl makes it easy to bind player actions, such as play and pause, to media keys. You can also get metadata about the playing track such as the artist and title for integration into statusline generators or other command-line tools. Playerctl also comes with a daemon that allows it to act on the currently active media player called playerctld.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              playerctl has a medium active ecosystem.
              It has 2050 star(s) with 78 fork(s). There are 21 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 52 open issues and 183 have been closed. On average issues are closed in 58 days. There are 5 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of playerctl is v2.4.1

            kandi-Quality Quality

              playerctl has 0 bugs and 0 code smells.

            kandi-Security Security

              playerctl has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              playerctl code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              playerctl is licensed under the LGPL-3.0 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              playerctl releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 1181 lines of code, 110 functions and 15 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of playerctl
            Get all kandi verified functions for this library.

            playerctl Key Features

            No Key Features are available at this moment for playerctl.

            playerctl Examples and Code Snippets

            No Code Snippets are available at this moment for playerctl.

            Community Discussions

            QUESTION

            Is it possible to trace my shell(bash, fish, zsh)?
            Asked 2022-Mar-01 at 22:44

            I am running archlinux(arcolinux distro to be specific) everything is fine but one little tiny problem which annoys me the problem is every time i open a terminal this pops us at the top of the terminal

            "Linux pengu 5.15.25-1-lts x86_64 unknown"

            I know this is a uname command with custom flags however I don't have that in my config.fish(I use fish shell(I run fish with bash i), I am aware that every time I open a my fish shell the stuff in my config.fish run, is there anything I am missing or what? here is my config.fish:

            {

            ...

            ANSWER

            Answered 2022-Mar-01 at 19:17

            strace can attach to a process using -p:

            Source https://stackoverflow.com/questions/71313211

            QUESTION

            Is it possible to create a browser based html/javascript audio player, that handles most of the MPRIS commands?
            Asked 2022-Feb-12 at 09:09

            I am trying to create a music player, that can handle most of the MPRIS commands.

            During youtube is playing, playerctl list the firefox player (firefox.instance{id}), and if it has playlist then I can skip to previous / next item using $ playerctl -p firefox.instance{id} next. This works in chrome too.

            I want to implement the same behavior in a React.js application, but first I'm looking for a html/javascript based solution.

            One of my guesses that this is impossible (without using a browser add-on), because firefox implements this manually for each supported website.

            Maybe I did something wrong, but no matter what I search for I couldn't find any information about this.

            Thanks for reading / commenting!

            ...

            ANSWER

            Answered 2022-Feb-12 at 09:09

            Media Session API seems to solve this problem pretty well: https://developer.mozilla.org/en-US/docs/Web/API/Media_Session_API

            This event listener runs every time $ playerctl -p firefox.instance{id} next is run (or when any other MPRIS client calls 'next', like KDE connect on android):

            Source https://stackoverflow.com/questions/71084867

            QUESTION

            [SOLVED]Unicode decode error when passing a bash script's output to python
            Asked 2021-Apr-28 at 15:23

            I am trying to pass the output of a shell script into python, it works when I do not have unicode characters inside the string that should be returned. The bash script that gets the currently played music:

            ...

            ANSWER

            Answered 2021-Apr-28 at 15:23

            To be sure the metadata is using proper UTF-8 encoding, you can filter the output of playerctl with iconv -ct UTF-8//TRANSLIT:

            Here is your improved script:

            Source https://stackoverflow.com/questions/67302184

            QUESTION

            Sort workspaces numerically
            Asked 2020-Dec-09 at 22:45

            I'm using XMonad in combination with xmobar, and I'm having an issue with workspaces displayed on xmobar not being sorted numerically. Because workspace ID's are ultimately strings, they get sorted lexicographically. So, provided that I have 12 workspaces, they are sorted as 1 10 11 12 3 4 5 6 7 8 9, instead of 1 2 3 4 5 6 7 8 9 10 11 12. I think marshallPP is the culprit because prior to introducing independent screens, the workspaces were displayed correctly without ppSort. I know there is mkWsSort that creates a sorting function from a comparison function, however, I'm not sure how would I write the comparison function. This is my config:

            ...

            ANSWER

            Answered 2020-Dec-09 at 22:45

            You can see that the type signature of mkWsSort is X WorkspaceCompare -> X WorkspaceSort. ppSort needs a X WorkspaceSort, so you just need to provide a X WorkspaceCompare. WorkspaceCompare is an alias for WorkspaceId -> WorkspaceId -> Ordering, and WorkspaceId is an alias for String. So basically, this is just a long-winded path to say you need a string comparison function. You can make one that compares strings by trying to read them into Ints first, then comparing the two:

            Source https://stackoverflow.com/questions/65225820

            QUESTION

            Awesome naughty notifications
            Asked 2020-Nov-25 at 21:09

            I'm creating a widget for Awesome based on playerctl. When i test with awesomeclient it works fine.

            ...

            ANSWER

            Answered 2020-Nov-23 at 22:31

            I think it's a Lua version issue. I don't know the specifics, but it runs fine on Lua 5.3 and 5.4 - wheras within LuaJIT, Lua 5.1 and 5.2 you see the same lack of artist and song art that you mention. Do you happen to know what version of Lua your AwesomeWM is compiled against?

            Source https://stackoverflow.com/questions/64976245

            QUESTION

            MPRIS integration with Python or VLC-Python
            Asked 2020-Sep-11 at 19:55

            Does anybody know of an easy module to interact with MPRIS and write metadata to it? I'm trying to get a music player working with the OS, and I'm using VLC [python-vlc] as it's backend. If you can help me out find any module that allows me to easily write metadata, thanks.

            Modules I've tried:

            • playerdo - Only reads metadata
            • playerctl - Only reads metadata
            • modipy-mpris - Doesn't work
            • mpris-server - Breaks constantly and generally a pain to set up
            • vidify - Not what I've wanted

            VLC docs: https://www.olivieraubert.net/vlc/python-ctypes/doc/index.html

            NOTE: This is not what my player looks like, this is KDE's Applet allowing me to see what is playing. I'm sure windows has something similar, but the most important thing is I need to be able to play and pause music from anywhere in the OS with the play/pause button on my keyboard or bluetooth device

            Example of output: KDE Plasma Applet

            ...

            ANSWER

            Answered 2020-Sep-11 at 19:55

            Use MPRIS-SERVER but read the issues. Still a pain to set up but at least it works properly.

            Source https://stackoverflow.com/questions/63834998

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install playerctl

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/altdesktop/playerctl.git

          • CLI

            gh repo clone altdesktop/playerctl

          • sshUrl

            git@github.com:altdesktop/playerctl.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link