Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. MP3 AutoPlay & Looping with QML

MP3 AutoPlay & Looping with QML

Scheduled Pinned Locked Moved Mobile and Embedded
6 Posts 2 Posters 5.0k Views 1 Watching
  • 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.
  • Z Offline
    Z Offline
    zaniar
    wrote on last edited by
    #1

    How to autoplay & looping an audio (mp3) file with QML?
    I've tried using Audio component from QtMultimediaKit but it didn't do the job :(
    the autoLoad property that should automatically play the audio didn't affect at all..
    the other problem goes when I use mp3 file. The file didn't played in full duration but it's fine with wav file

    Thanks..

    1 Reply Last reply
    0
    • AlicemirrorA Offline
      AlicemirrorA Offline
      Alicemirror
      wrote on last edited by
      #2

      What target are you using? Can you give more information on the QML ?

      I think that maybe a problem of loading completion when the application start but it is only an intuition...

      Enrico Miglino (aka Alicemirror)
      Balearic Dynamics
      Islas Baleares, Ibiza (Spain)
      www.balearicdynamics.com

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zaniar
        wrote on last edited by
        #3

        I'm developing for N9. I follow the example on the documentation and set the value of 'autoLoad' property to 'true' and expecting the audio will start automatically.

        1 Reply Last reply
        0
        • AlicemirrorA Offline
          AlicemirrorA Offline
          Alicemirror
          wrote on last edited by
          #4

          Please post more information about the code, where is the example, something that can help us to understand what maybe the problem, thank you.

          Enrico Miglino (aka Alicemirror)
          Balearic Dynamics
          Islas Baleares, Ibiza (Spain)
          www.balearicdynamics.com

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            zaniar
            wrote on last edited by
            #5

            here is my code..

            @
            import QtQuick 1.1
            import com.meego 1.0
            import QtMultimediaKit 1.1

            Page {
            id: mainPage

            Audio {
                id: music
                source: "soundtrackFast.mp3"
                autoLoad: true
            }
            
            orientationLock: PageOrientation.LockPortrait
            

            }
            @

            and here is the documentation: http://doc.qt.nokia.com/qtmobility-1.2/qml-audio.html

            1 Reply Last reply
            0
            • AlicemirrorA Offline
              AlicemirrorA Offline
              Alicemirror
              wrote on last edited by
              #6

              I think that it is not so simple to manage it. Regarding autoload property, it maybe a bug because reading the documentation there is not more to do. Just try to remove the setting because the autoLoad is set to tru by default. Sometimes I ecperienced that setting a default value again the result was not what I expected.

              Then the problem that the media in the MP3 case is not played for full, I think that maybe a buffering problem and/or that there are some differences respect the wav format to know the duration i.e. the file lenght. Let me a while and I will search about this. I have found something about the tricks to manage the mp3 files correctly but in this moment I can't see where.

              Enrico Miglino (aka Alicemirror)
              Balearic Dynamics
              Islas Baleares, Ibiza (Spain)
              www.balearicdynamics.com

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved