Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Playing audio from the Internet is not working on iOS



  • I have this piece of code here

            MouseArea {
                anchors.fill: parent
                onClicked: {
                    sampleAudio.play()
                }
            }
    
        Audio {
            id: sampleAudio
            source: "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3"
    
            onStatusChanged: {
                console.log("DEBUG_488_1:", sampleAudio.status)
            }
        }
    

    basically, I'm trying to play the audio from the internet for my mobile app. this code works as expected on Android, but not with iOS!!! when I tap on the MouseArea, the status of the Audio element does change to Audio.EndOfMedia (6), but there's no sound playing.

    Is there a proper way to play sound from the internet?



  • Stupid me. For some reason, the sound is played, but you have to switch to unmute mode to hear it.


Log in to reply