[TIMOB-2938] Android: 2.3 only; Remote URL Sound fails to play with "java.io.IOException: Prepare failed" error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Hold |
Resolution Date | 2011-04-15T03:33:22.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | 2.3, android, remoteurl, reported-1.6.0, sound |
Reporter | Thomas Huelbert |
Assignee | Don Thorp |
Created | 2011-04-15T03:33:21.000+0000 |
Updated | 2017-03-21T21:13:53.000+0000 |
Description
[INFO] Titanium SDK version: 1.6.0 (01/24/11 08:14 e1cb22a) Nexus S (2.3.1) specific
1.Phone > Sound > Remote URL or remote streaming
2.check logcat when sound fails to play
W/TiSound ( 615): (kroll$194) [164,11390895] Issue while
initializing :
W/TiSound ( 615): java.io.IOException: Prepare failed.:
status=0x1
W/TiSound ( 615): at android.media.MediaPlayer.prepare(Native
Method)
W/TiSound ( 615): at
ti.modules.titanium.media.TiSound.initialize(TiSound.java:119)
W/TiSound ( 615): at
ti.modules.titanium.media.TiSound.play(TiSound.java:173)
W/TiSound ( 615): at
ti.modules.titanium.media.SoundProxy.play(SoundProxy.java:116)
W/TiSound ( 615): at
ti.modules.titanium.media.SoundProxyBindingGen$10.invoke(SoundProxyBindingGen.java:407)
W/TiSound ( 615): at
org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:48)
W/TiSound ( 615): at
org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1711)
W/TiSound ( 615): at
org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
W/TiSound ( 615): at
org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
W/TiSound ( 615): at
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
W/TiSound ( 615): at
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)
W/TiSound ( 615): at
org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
W/TiSound ( 615): at
org.appcelerator.titanium.kroll.KrollCallback.callSync(KrollCallback.java:139)
W/TiSound ( 615): at
org.appcelerator.titanium.kroll.KrollCallback$1.run(KrollCallback.java:163)
W/TiSound ( 615): at
android.os.Handler.handleCallback(Handler.java:587)
W/TiSound ( 615): at
android.os.Handler.dispatchMessage(Handler.java:92)
W/TiSound ( 615): at android.os.Looper.loop(Looper.java:123)
W/TiSound ( 615): at
org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:73)
Confirmed. This seems to be a bug in any Android device that uses the Stagefright media player implementation (which is the new player for 2.3, but some 2.2 devices from HTC are also shipping with it).
An initial glance at the Stagefright C++ code, and it looks like their custom HTTP client is returning an EOF for the stream for some unknown reason.
More trace info from my Nexus S:
I've filed an Android bug here:
http://code.google.com/p/android/issues/detail?id=14756">http://code.google.com/p/android/issues/detail?id=14756
Marking back as hold until we get more feedback from our Android bug
There may be multiple issues here. It sounds like your Android bug is with wav files.
However, we are seeing the same exception when streaming an mp3 on the 2.2 emulator, but that same mp3 streams fine on a G2 with 2.2.
Bug also found in NookColor: SDK: 1.8.0.1.v20111207091653 Runtimes: Android V8/Rhino Studio: 1.0.7.201112061404 OS: OS X Lion Devices Tested: NookColor, NookColor Emulator 2.2 (Rhino)
Closing ticket due to the time that has passed since it was filed.