How to build a Music Player properly?


i'm building audio player on both mobile platforms: ios + android. right i'm interested in ios.

these features have. if makes simpler think about, how spotify functions (see screenshots below).

here features anyway:

  • working play queue/playlist
  • play / pause
  • shuffle / repeat
  • skip / previous
  • scrubbing via dragging in ui
  • auto buffering next song (maybe?)
  • different quality options
  • play music when app closed, including navigating next/previous song on playlist

i'm not native developer though, , i'm trying research find information on tell developers on course of action should choose, , i'm having lot of difficulty grasping these concepts.

fast sidenote: app deals actual 'tracks', doesn't deal continuous streaming type stuff continuous news channel stream or anything.

here questions have...

  1. what pros , cons of using `m3u/m3u8` playlist, vs streaming mp3 file? 1 of these better other, given features need above? i'm having difficulty whether choose streaming mp3's, m3u, or m3u8.
  2. it's understanding hls automatically chooses right bitrate. see many audio players let user choose quality use in settings pane (high/med/low). imply these apps not using hls? of above 3 options think majority of apps use?
  3. i wanted offer 3 qualities similar spotify (96, 160, 320 kbps). there limitations of doing while streaming mp3's?
  4. assuming streaming mp3's still option (and not eliminated contender), there performance differences streaming mp3's vs using playlist? can still thinks scrubbing , skipping tracks no more delay?
  5. are there popular libraries both platforms handle of stuff? entire app music player i'm looking maintained , trusted. dont know if need wrapper honest though use case quite simple.
  6. i assume need transcoding... there downsides using `ffmpeg` on server , doing myself?

overall insight helpful... feel i'm drowning in information, , while i'm pretty finding way, 1 case i'm lost how proceed.

thanks!

here few screenshots of spotify player give feel of i'm looking do. mine looks lot different, 100% same functionality.

play screen

[​img]

lock screen

[​img]
 

i'm writing podcast player audio/music playing app. i've developed of features, i'll try , answer questions best can.

using apple's avplayer framework. it's great!

1. .m3u tells player mp3 order , provides links. can stream mp3 or play locally device.

2. i'm not sure hls.

3. there no limitation on streaming different bit rates app. decided end server on it's settings, or app can potentially have option on users preferred bit rate.

4. using streaming avplayer, there minimal performance differences. can scrub , skip tracks like. there short delay (1 - 3 seconds) based on users connection speed app needs gather mp3 header information , begin playing.

5. i'm using native approach. there may 3rd party tools out there, doubt integrate ios platform. using apple's framework bells , whistles @ finger tips.

6. no, iphone's can decode audio themselves.
 


Forums iPhone, iPad, and iPod Touch iOS Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments

Popular posts from this blog

Sean Penn, "Chapo Guzman", and Rolling Stone

Subler - What is "Fix Audio Fallbacks"?

Help please Strange logs