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 1.5k 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.
      • manlandM Offline
        manland
        last edited by manland

        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

          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.

          manlandM 1 Reply Last reply Reply Quote 1
          • manlandM Offline
            manland @wdehoog
            last edited by

            @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 Reply Quote 0
            • manlandM Offline
              manland
              last edited by

              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

                @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?

                manlandM 1 Reply Last reply Reply Quote 0
                • manlandM Offline
                  manland @wdehoog
                  last edited by manland

                  @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
                  • manlandM Offline
                    manland
                    last edited by

                    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 Reply Quote 0
                    • W Offline
                      wdehoog @manland
                      last edited by

                      @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.

                      manlandM 1 Reply Last reply Reply Quote 0
                      • manlandM Offline
                        manland @wdehoog
                        last edited by

                        @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
                        • manlandM Offline
                          manland
                          last edited by

                          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

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          • First post
                            Last post