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. Harmattan QUrl and QMediaPlayer problem with source
Forum Updated to NodeBB v4.3 + New Features

Harmattan QUrl and QMediaPlayer problem with source

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 2.4k 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.
  • A Offline
    A Offline
    andzero
    wrote on last edited by
    #1

    Hello!

    Okay, as the title says: In my application I'm trying to use QMediaPlayer to play music in my app, for Harmattan target.
    The sound files are included via deploymentfolders.

    From PC, it is already working: (in Qt Simulator)
    @playlist->addMedia(QUrl::fromLocalFile("/files/sound_1.mp3"))@

    However, it's not working when installed in the device.
    I've been going back and forth with QA because of this, because I don't have a device to test
    and I think Harmattan QEMU and RDA doesnt give me sound output because Angry Birds has no sound.

    Things I've tried:

    • I noticed that the default working directory when I run the app is not in my application directory, so I've set it with
      @QDir::setCurrent("/opt/myapp/")@
      by adding this code, the device can now read my textfiles ( with QFile )
      however QUrl still don't seem to work.

    -I've tried to write the absolute path of the file with:
    @playlist->addMedia(QUrl::fromLocalFile(QDir::current().path() + QString("/files/sound_1.mp3")));@
    and still won't work.

    Or can you post an example working QUrl local source with QMediaPlaylist when deployed in Harmattan?

    Please help..

    Big thanks!

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      qtrahul
      wrote on last edited by
      #2

      "Media Player example ":http://harmattan-dev.nokia.com/docs/library/html/qtmobility/multimedia.html?tab=0#examples

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andzero
        wrote on last edited by
        #3

        Thank you, I will check on it.

        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