Karen  Karapetyan
Karen Karapetyan

Reputation: 754

AVPlayer streaming delay

I have ios application which streams music from server. It takes 4 to 5 seconds to start playing audio. it seems the AVPlayer downloads entire audio file then starts playing. How to decrease long delay of AVPlayer?

Upvotes: 3

Views: 1887

Answers (1)

ronb
ronb

Reputation: 261

iOS devices currently support streaming the following audio formats:

  • E-AAC or AAC-LC up to 48 kHz, stereo audio
  • MP3 (MPEG-1 Audio Layer 3) 8 kHz to 48 kHz, stereo audio
  • AC-3 (for Apple TV, in pass-through mode only)

If your audio is in one of the these formats, AVPlayer should be able to stream it instead of needing to download it before starting to play.

Here's a link to the Apple doc where I got this info: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/FrequentlyAskedQuestions/FrequentlyAskedQuestions.html

Upvotes: 1

Related Questions