Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8646569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:50:41+00:00 2026-06-12T12:50:41+00:00

I looking for sample code for iOS (I guess, using AVMediaPlayer or AVPlayer) to

  • 0

I looking for sample code for iOS (I guess, using AVMediaPlayer or AVPlayer) to play streaming audio, from URL (our current server URL is http://server.local:8008/ourradio.aac.m3u).

Audio stream also should be played, when application in background mode.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:50:43+00:00Added an answer on June 12, 2026 at 12:50 pm

    M3U is a playlist format. It is a plain text file containing the locations of music files, most notably MP3 files. Read the Wikipedia Article about M3U. Then play each MP3 using this if you really want it on an iPhone:

    AVPlayer *musicPlayer = [AVPlayer playerWithURL:musicLinkFromM3uFile];
    [musicPlayer play];
    

    where musicLinkFromM3uFile is the location of the MP3 file read from the m3u file.

    EDIT: And to be able to continue playing in background you will need to setup an audio session with category kAudioSessionCategory_MediaPlayback. To do that add the following lines of codes to your applicationDidLoad in the app delegate:

    UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;
    AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory);
    

    You will also need to set UIBackgroundModes in your Info.plist to audio.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking at some iOS sample code from Apple which shows off GLES2 functionality,
I am looking at the 'Metronome' sample code from the iOS SDK ( http://developer.apple.com/library/ios/#samplecode/Metronome/Introduction/Intro.html
I've copied all the code from here but instead of looking like the sample
I am looking for a code sample of this Core Image filter for iOS.
I'm looking at the sample code for Facebook Connect ( http://github.com/facebook/facebook-ios-sdk ) and noticed
I'm looking for code samples and tutorials for integrating iAd in iOS 4. What
I am looking for sample code or documentation on how to use client side
I've been looking at sample code for interfacing with the Windows Task Scheduler, and
I'm looking for sample code or tutorials on how to implement iAds in my
I'm looking for Delphi sample code to develope a Win32 Windows service which can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.