Streaming Audio File

I need to be able to play an MP3 from a server.
I haven’t touched audio on an iOS yet, so I assume I can just play it like I did on the desktop, but I’m wondering if it’s possible to load it remotely through an web page or something like that.

Is streaming possible somehow?

In all cases you will need iOSKit.

If you don’t need to display controls such as play/pause this should do:

[code]
Dim soundID As Uint32
Declare Function AudioServicesCreateSystemSoundID Lib “AudioToolbox.framework” (inFileURL As ptr, ByRef SystemSoundID As uint32) As Integer

//Untested part
Dim url As NSURL = NSURL.URLWithString(“https://www.example.com”)

Dim res As Integer = AudioServicesCreateSystemSoundID(url, soundID)
res = res

If soundID > 0 then
Declare Sub AudioServicesPlaySystemSound Lib “AudioToolbox.framework” (snd As uint32)
AudioServicesPlaySystemSound(soundID)
End If[/code]

If you need play/pause controls I believe you still need the NSURL portion of that code but another part of iOSKit to show the controls.

Hi Jeremie,

I definitely need the audio controls. The content are long lectures.
I’ll download the latest iOSKit.

Thank you!