[TIMOB-3567] AudioStreamerBC sometimes fails to play stream. (Solution here)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-12-12T22:50:30.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Flexible |
Assignee | Shak Hossain |
Created | 2011-04-15T03:46:45.000+0000 |
Updated | 2013-12-12T22:50:30.000+0000 |
Description
About 1 in 5 times, when attempting to play streaming audio on iphone, we get the message 'Unable to configure network read stream'. This comes from AudioStreamerBC.m. Fortunately, this bug is quite simple to fix.
simply remove the following block:
if(!CFReadStreamOpen)
{ ... } (lines 553-586)
The author of this code incorrectly assumed that CFReadStreamOpen returning false signifies failure. This is not the case. It simply signals that the stream was not able to be opened synchronously. This is not an error condition and will simply cause the following calls to block momentarily - ie not a problem. This check should be removed.
This has been observed consistently on an iPod Touch 2G
There is a HD Support ticket that encountered this problem while attempting to stream media. http://support.appcelerator.com/display/APP-856696 Whether 3G, or over EDGE networks more specifically got this error: "Unable to configure network read stream". repro sequence: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Titanium.Media.defaultAudioSessionMode = Titanium.Media.AUDIO_SESSION_MODE_PLAYBACK; var gStream = Titanium.Media.createAudioPlayer({ allowBackground: true, url: 'http://grischa.mp3.green.ch:80', }); gStream.start(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Closing this as invalid bug since we could not reproduce it. No addition information were provided by the original reporter.