Tour Preview

Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!


OverviewFelgo 2 Support (Qt 5) › MediaPlayer can't play audio file

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #21693


    I’m trying to build a music player and have this button to play a sound:

                    width: 150
                    height: 50
                    text: "Click Me!";
                    anchors.horizontalCenter: parent.horizontalCenter
                    anchors.verticalCenter: parent.verticalCenter
                    MediaPlayer {
                        id: playMusic
                        source: "E:/Breaeze/SampleAudio_0.mp3" //audio file location
                    MouseArea {
                        id: playArea
                        anchors.fill: parent
                        onPressed:  { }

    My audio can’t be played when I use a directory on my local PC and gives me this error:

    DirectShowPlayerService::doSetUrlSource: Unresolved error code 0x80070002 ()

    But when I use this URL instead :

    it works why?


    Felgo Team


    what operating system are you using? I just tried your example on Windows 10 and it works for me.

    Note that for local files, you should also add


    as prefix, like “file:///E:/Breaeze/SampleAudio_0.mp3”.

    Please also make sure that your path is correct. If you start typing with “file:///” Qt Creator will also allow you to navigate to your file while typing.

    You can also Google for e.g. “Qt DirectShowPlayerService::doSetUrlSource: Unresolved error” to find more help.


Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.