{ "id": "63570", "key": "TIMOB-2938", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "6", "description": "", "name": "Hold" }, "resolutiondate": "2011-04-15T03:33:22.000+0000", "created": "2011-04-15T03:33:21.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "2.3", "android", "remoteurl", "reported-1.6.0", "sound" ], "versions": [], "issuelinks": [ { "id": "10632", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "63696", "key": "TIMOB-3064", "fields": { "summary": "Android: Prepare failed when initializing sound from remote URL", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T21:13:53.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}
[INFO] Titanium SDK version: 1.6.0 (01/24/11\n08:14 e1cb22a) Nexus S (2.3.1) specific
\n1.Phone > Sound > Remote URL or remote streaming
\n2.check logcat when sound fails to play
W/TiSound ( 615): (kroll$194) [164,11390895] Issue while\ninitializing :
\nW/TiSound ( 615): java.io.IOException: Prepare failed.:\nstatus=0x1
\nW/TiSound ( 615): at android.media.MediaPlayer.prepare(Native\nMethod)
\nW/TiSound ( 615): at\nti.modules.titanium.media.TiSound.initialize(TiSound.java:119)
\nW/TiSound ( 615): at\nti.modules.titanium.media.TiSound.play(TiSound.java:173)
\nW/TiSound ( 615): at\nti.modules.titanium.media.SoundProxy.play(SoundProxy.java:116)
\nW/TiSound ( 615): at\nti.modules.titanium.media.SoundProxyBindingGen$10.invoke(SoundProxyBindingGen.java:407)
\nW/TiSound ( 615): at\norg.appcelerator.kroll.KrollMethod.call(KrollMethod.java:48)
\nW/TiSound ( 615): at\norg.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1711)
\nW/TiSound ( 615): at\norg.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
\nW/TiSound ( 615): at\norg.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
\nW/TiSound ( 615): at\norg.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
\nW/TiSound ( 615): at\norg.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)
\nW/TiSound ( 615): at\norg.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
\nW/TiSound ( 615): at\norg.appcelerator.titanium.kroll.KrollCallback.callSync(KrollCallback.java:139)
\nW/TiSound ( 615): at\norg.appcelerator.titanium.kroll.KrollCallback$1.run(KrollCallback.java:163)
\nW/TiSound ( 615): at\nandroid.os.Handler.handleCallback(Handler.java:587)
\nW/TiSound ( 615): at\nandroid.os.Handler.dispatchMessage(Handler.java:92)
\nW/TiSound ( 615): at android.os.Looper.loop(Looper.java:123)
\nW/TiSound ( 615): at\norg.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:73)
Confirmed. This seems to be a bug in any Android device that\nuses the Stagefright media player implementation (which is the new\nplayer for 2.3, but some 2.2 devices from HTC are also shipping\nwith it).
\nAn initial glance at the Stagefright C++ code, and it looks like\ntheir custom HTTP client is returning an EOF for the stream for\nsome unknown reason.
\nMore trace info from my Nexus S:
\n02-15 11:22:50.596: INFO/StagefrightPlayer(75): setDataSource('http://www.nch.com.au/acm/8kmp38.wav')\n02-15 11:22:50.615: INFO/NuHTTPDataSource(75): connect to www.nch.com.au:80/acm/8kmp38.wav @0\n02-15 11:22:50.959: ERROR/MediaPlayer(23243): error (1, -2147483648)\n02-15 11:22:50.971: INFO/NuCachedSource2(75): ERROR_END_OF_STREAM\n02-15 11:22:50.990: WARN/TiSound(23243): (kroll$10: app://examples/sound_remote_url.js) [399,1210563] Issue while initializing : \n02-15 11:22:50.990: WARN/TiSound(23243): java.io.IOException: Prepare failed.: status=0x1\n02-15 11:22:50.990: WARN/TiSound(23243): at android.media.MediaPlayer.prepare(Native Method)\n02-15 11:22:50.990: WARN/TiSound(23243): at ti.modules.titanium.media.TiSound.initialize(TiSound.java:120)\n02-15 11:22:50.990: WARN/TiSound(23243): at ti.modules.titanium.media.TiSound.play(TiSound.java:179)\n02-15 11:22:50.990: WARN/TiSound(23243): at ti.modules.titanium.media.SoundProxy.play(SoundProxy.java:116)\n02-15 11:22:50.990: WARN/TiSound(23243): at ti.modules.titanium.media.SoundProxyBindingGen$10.invoke(SoundProxyBindingGen.java:407)\n02-15 11:22:50.990: WARN/TiSound(23243): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:51)\n02-15 11:22:50.990: WARN/TiSound(23243): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1711)\n02-15 11:22:50.990: WARN/TiSound(23243): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)\n02-15 11:22:50.990: WARN/TiSound(23243): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)\n02-15 11:22:50.990: WARN/TiSound(23243): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)\n02-15 11:22:50.990: WARN/TiSound(23243): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)\n02-15 11:22:50.990: WARN/TiSound(23243): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)\n02-15 11:22:50.990: WARN/TiSound(23243): at org.appcelerator.titanium.kroll.KrollCallback.callSync(KrollCallback.java:139)\n02-15 11:22:50.990: WARN/TiSound(23243): at org.appcelerator.titanium.kroll.KrollCallback$1.run(KrollCallback.java:164)\n02-15 11:22:50.990: WARN/TiSound(23243): at android.os.Handler.handleCallback(Handler.java:587)\n02-15 11:22:50.990: WARN/TiSound(23243): at android.os.Handler.dispatchMessage(Handler.java:92)\n02-15 11:22:50.990: WARN/TiSound(23243): at android.os.Looper.loop(Looper.java:123)\n02-15 11:22:50.990: WARN/TiSound(23243): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:89)
\n
I've filed an Android bug here:
\nMarking back as hold until we get more feedback from our Android\nbug
There may be multiple issues here. It sounds like your Android\nbug is with wav files.
\nHowever, we are seeing the same exception when streaming an mp3\non the 2.2 emulator, but that same mp3 streams fine on a G2 with\n2.2.