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. Playing audio from the Internet is not working on iOS
Qt 6.11 is out! See what's new in the release blog

Playing audio from the Internet is not working on iOS

Scheduled Pinned Locked Moved Solved Mobile and Embedded
2 Posts 1 Posters 593 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.
  • V Offline
    V Offline
    vudangkhoa2906
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vudangkhoa2906
      wrote on last edited by
      #2

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

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved