• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Ho to display music info on multimédia player?

Scheduled Pinned Locked Moved Solved App Development
10 Posts 2 Posters 736 Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      manland
      last edited by manland 19 Apr 2020, 23:33

      Hi all,

      I play a song with the help of QtMultilediaPlayer from UbuntiComponents. I have set all metadata I can, but the multimedia player controller (top of phone where we can up/down volume or mute) is empty. I can only play/pause. No title and no cover display.

      There is something to do? The only notable difference with music-app, is I play a song instead of a playlist. Do I need to do it?

      Thanks

      1 Reply Last reply Reply Quote 0
      • W Offline
        wdehoog
        last edited by 20 Apr 2020, 07:38

        Hi,

        Does your audio file contain any tags? Maybe the media-hub (which is playing the audio using gstreamer) ignores the meta data you have set and only uses the information it extracts from the file.

        M 1 Reply Last reply 20 Apr 2020, 09:21 Reply Quote 1
        • M Offline
          manland @wdehoog
          last edited by 20 Apr 2020, 09:21

          @wdehoog thank you very much for your help. The name is "media-hub" I have found it https://github.com/ubports/media-hub

          I don't set any meta-data on the file. But maybe I need to do it ?

          W 1 Reply Last reply 20 Apr 2020, 10:02 Reply Quote 0
          • M Offline
            manland
            last edited by 20 Apr 2020, 09:33

            And after some search I have found the commit in music-app https://gitlab.com/ubports/apps/music-app/-/commit/840de21049c0af61056ee6bafd4b51652bd73453 it seams to be related to playlist of qtmultimedia player! I'll try tonight 😉

            1 Reply Last reply Reply Quote 0
            • W Offline
              wdehoog @manland
              last edited by 20 Apr 2020, 10:02

              @manland Sorry. I am confused. In your first message you say ' I have set all metadata' and now you say 'I don't set any meta-data '. What is it that you do?

              M 1 Reply Last reply 20 Apr 2020, 10:06 Reply Quote 0
              • M Offline
                manland @wdehoog
                last edited by manland 20 Apr 2020, 10:06

                @wdehoog Hahaha sorry... I haven't set metadata in file. I have set metadata of QtMultimediaplayer in qml code https://api-docs.ubports.com/sdk/apps/qml/QtMultimedia/MediaPlayer.html#sdk-qtmultimedia-mediaplayer-metadata-albumartist

                1 Reply Last reply Reply Quote 0
                • M Offline
                  manland
                  last edited by 20 Apr 2020, 10:09

                  I can try to extract and/or append those metadata in the file directly to see if it's change something.

                  W 1 Reply Last reply 20 Apr 2020, 10:17 Reply Quote 0
                  • W Offline
                    wdehoog @manland
                    last edited by 20 Apr 2020, 10:17

                    @manland So you are sure your audio file does not contain any metadata?

                    Another question is the file located on your phone or do you sue a remote url?

                    I ask since I am currently messing around with this media-hub and it's meta-data. I want it to use (preview)image embedded in the stream and tags from internet radio streams.
                    I have a hard time understanding what is going on. So I am really curious what is not working in your case.

                    M 1 Reply Last reply 20 Apr 2020, 10:23 Reply Quote 0
                    • M Offline
                      manland @wdehoog
                      last edited by 20 Apr 2020, 10:23

                      @wdehoog No I'm not sure... I need to try to extract to see if it contain something! Have you some code available to see if I do something bad?

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        manland
                        last edited by 27 Apr 2020, 16:04

                        And finally it work! I have added information on the track with help of taglib. I have search in media-hub but not found any reference to QMultimediaPlayer or something to give information of the current track (like dbus or other system). But I have find lot of metadata files parsing. After using taglib to add some informations on my track i'm able to display them in the HUD!

                        Thank you for your help @wdehoog

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post