Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Playing QML Audio or Multimedia from qrc not working on Android

Playing QML Audio or Multimedia from qrc not working on Android

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.7k Views
  • 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.
  • F Offline
    F Offline
    feldifux
    wrote on last edited by
    #1

    Hi,
    I was trying to play a sound file with the QML Audio or MultiMedia components from qrc, but it doesn't work on Android.

    Running the same code on Windows works.

    Based on "this bug report":https://bugreports.qt-project.org/browse/QTBUG-31422, playing audio files from resources should work since Qt 5.2.1. I tried both with Qt 5.2.1 and the latest Qt 5.3 RC but only get this onError output:

    @ErrorCode: 5
    ErrorString: (Unknown error/Insufficient resources)
    @

    and this error pops up in the console too:
    @E/MediaPlayer(17306): Error (1,-2147483648)@

    I tested on a Sony Ericsson Xperia and Huawei Ascend, both the same errors.

    Anyone experiencing the same issues or has a fix for this?

    Cheers,
    Chris

    Founder of Felgo SDK - http://felgo.com/qt

    Felgo simplifies

    • Mobile App Dev with Qt esp. iOS & Android
    • Game Development with Qt

    What others say

    Felgo scored #1 in Cross-Platform App Development Tools Report - see why: https://goo.gl/rgp3rq

    1 Reply Last reply
    0
    • F Offline
      F Offline
      feldifux
      wrote on last edited by
      #2

      Using the Audio or MultiMedia QML elements to play from resources also does not work on iOS and Mac! You can give this issue a vote in the bug tracker here: https://bugreports.qt-project.org/browse/QTBUG-36175

      Founder of Felgo SDK - http://felgo.com/qt

      Felgo simplifies

      • Mobile App Dev with Qt esp. iOS & Android
      • Game Development with Qt

      What others say

      Felgo scored #1 in Cross-Platform App Development Tools Report - see why: https://goo.gl/rgp3rq

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MartynW
        wrote on last edited by
        #3

        My mistake (of course), the qrc prefix was the same as the folder name and I didn't use both in the url. DOH, sorry folks.

        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