Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3567] AudioStreamerBC sometimes fails to play stream. (Solution here)

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2013-12-12T22:50:30.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterFlexible
AssigneeShak Hossain
Created2011-04-15T03:46:45.000+0000
Updated2013-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.

Comments

  1. Flexible 2011-04-15

    This has been observed consistently on an iPod Touch 2G

  2. Eduardo Gomez 2011-06-16

    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(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. Shak Hossain 2013-12-12

    Closing this as invalid bug since we could not reproduce it. No addition information were provided by the original reporter.

JSON Source