Coder Social home page Coder Social logo

Comments (4)

hypfvieh avatar hypfvieh commented on August 14, 2024

First: this is not related to bluez-dbus because the mpris stuff has nothing to do with bluetooth or bluez.

I assume you are not listening to the correct dbus bus.
Bluez is usually found on system bus, while most of the things happening in user context is on session bus.
The sample you referenced uses the system bus only to catch properties changed events issued by/for bluez related actions.
As I don't have the mpris stuff on my Ubuntu machine, I cannot check, but I would check if the desired information is found on session bus.

from bluez-dbus.

moontide avatar moontide commented on August 14, 2024

First: this is not related to bluez-dbus because the mpris stuff has nothing to do with bluetooth or bluez.

I assume you are not listening to the correct dbus bus. Bluez is usually found on system bus, while most of the things happening in user context is on session bus.

Sorry, I'm pretty new to dbus, didn't know there's system bus and there's session bus.

The sample you referenced uses the system bus only to catch properties changed events issued by/for bluez related actions.

I added the code before the filtering-out-bluez code, I can see information about org.freedesktop.NetworkManager or org.freedesktop.systemd1.Service been printed, but no Metadata information of org.mpris.MediaPlayer2.Player. So I guess your assumption could be right. But I do see PlaybackStatus information of org.mpris.MediaPlayer2.Player, could firefox send these two information to different bus?

As I don't have the mpris stuff on my Ubuntu machine, I cannot check, but I would check if the desired information is found on session bus.

The mpris interface stuff seems been implemented in firefox 75 already. I also tested Audacious media player, I also see information about org.mpris.MediaPlayer2.Player in dbus-monitor command ouput.

from bluez-dbus.

hypfvieh avatar hypfvieh commented on August 14, 2024

Firefox does not provide mpris on my machine, nothing to see in d-feet on system or session bus.
When starting audacious, I can see the mpris stuff in the audacious process on session bus org.mpris.MediaPlayer2.audacious.
So it looks like you have to add a listener to the session bus.

from bluez-dbus.

moontide avatar moontide commented on August 14, 2024

Firefox does not provide mpris on my machine, nothing to see in d-feet on system or session bus.

I guess you need visit a URL contains media content (say, youtube), and play it.

So it looks like you have to add a listener to the session bus.

Yes, you're totally correct. I test it today, and I got the Metadata information as expected from session bus.

from bluez-dbus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.