Music: how to list
-
Check the official "Music Player example":http://library.developer.nokia.com/index.jsp?topic=/MeeGo_1.2_Harmattan_API/html/qt-components/qt-components-example-musicplayer.html It should show you how to retrieve audio files on a phone with MeeGo Harmattan OS.
-
[quote author="spode" date="1314183307"]how to add QMediaPlayer in a project?[/quote]
Check the "documentation":http://doc.qt.nokia.com/qtmobility-1.2/qmediaplayer.html You should include <QMediaPlayer> and add QtMultimediaKit module to Qt mobility section of your pro file.
-
You can always make your own custom player if you want with the QML Audio Element. I am wrapping up a project right now where I did that exact thing. "QML Audio Doc":http://doc.qt.nokia.com/qtmobility-1.1-tp/qml-audio.html
-
bq. You can always make your own custom player if you want with the QML Audio Element. I am wrapping up a project right now where I did that exact thing. QML Audio Doc [doc.qt.nokia.com]
but how do you list all audio file? and how do you get the selected music?
-
Well the best way to list all the audio files would be to use the QML DocumentGalleryModel Element. The documentation for it is located "here.":http://doc.qt.nokia.com/qtmobility/qml-documentgallerymodel.html You can use a rootType of DocumentGallery.Audio. From there you have just made a nice little list of all the audio files available. My player was written entirely in QML and JS. I am not a programmer by trade so C++ is somewhat a mystery to me. Hope this helps in your quest.
-
If you noticed in the document page in the previous post that I made there was a
@properties: [ "url" ]@
in the DocumentGalleryModel and then a
@source: url@
in the delegate to list it. You will do the same thing, but it will be using the QML Audio Element. I hope that is what you are asking for. If not just let me know. -
just a moment: i need to use this on a device, so could you help me here please: http://developer.qt.nokia.com/forums/viewthread/7174