Mutawe
Mutawe

Reputation: 6524

The audio keeps stopping on MPMoviePlayerController Audio streaming

Im using MPMoviePlayerController to stream audio from a server, but after playing the audio for more than two minutes, the audio starts to stop and resume alot, im streaming more than one file one after one, so because of the interruption, some of the audio files are being skipped with those two console messages:

 Took background task assertion (38) for playback stall

 Ending background task assertion (38) for playback stall

I'm losing a lot of tracks because of this error. for the first while, i thought that was a memory issue, but the console shows that each time a loose a track, it print those messages,

Upvotes: 5

Views: 1875

Answers (2)

auspicious99
auspicious99

Reputation: 4311

Are you trying it on a simulator or a device? It may be a simulator issue.

Also, on device, try streaming through multiple networks, e.g., LTE, wifi, etc., see if there is any difference

Upvotes: 0

Till
Till

Reputation: 27587

Check your network connectivity and the stream encoding.

This console output pretty much says exactly what your problem is; the stream dries out of content and could not keep up playing without interruption.

Either your network connection is unstable or the content is encoded in bandwidths that are far too high for your network connection.

For clarification; even if your local internet peering is offering high bandwidths, you should still check the bandwidths of the entire route. For example, you could try to download the streamed files via your browser for testing the throughput.

Upvotes: 4

Related Questions