How to change BackgroundAudioPlayer network timeout? RRS feed

  • Question

  • My app involves scenarios where I may want to switch the BackgroundAudioPlayer track from one url to another, depending on network conditions.

    However, when the BackgroundAudioPlayer attempts to play an audio file from an unresponsive server, it appears to take 90 seconds to time out.  Then it fails with an Exception whose message is simply '-1072877818'.  (Classy!)

    Anyway, NS_E_CONNECT_TIMEOUT seems about right, but does it really have to take 90 seconds?

    I presume there's no simple way to change the timeout the BAP uses?

    Wednesday, April 16, 2014 3:25 AM

All replies

  • If you just pass a URL to the player then you have no control over how the network stream is created.

    The only alternative I can think of would be to write a custom MediaStreamSource implementation where you can handle the network calls in your own code.


    Wednesday, April 16, 2014 6:33 PM