Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15798] Titanium.Media.AudioPlayer play throws java.io.IOException when trying to stream on Android 2.3.3 both device and emulator

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterKi Song
AssigneeUnknown
Created2013-11-05T19:40:47.000+0000
Updated2018-02-28T20:03:32.000+0000

Description

Steps to reproduce: var player = Titanium.Media.createAudioPlayer({ url: 'http://xyz/sample.mp3', }); player.play(); Currently using SDK 3.1.3 [INFO][StagefrightPlayer( 34)] setDataSource('http://xyz/sample.mp3') [ERROR][MediaPlayer( 2733)] error (1, -2147483648) [WARN][TiSound ( 2733)] (KrollRuntimeThread) [1404,1404] Issue while initializing : [WARN][TiSound ( 2733)] java.io.IOException: Prepare failed.: status=0x1 [WARN][TiSound ( 2733)] at android.media.MediaPlayer.prepare(Native Method) [WARN][TiSound ( 2733)] at ti.modules.titanium.media.TiSound.initialize(TiSound.java:124) [WARN][TiSound ( 2733)] at ti.modules.titanium.media.TiSound.play(TiSound.java:181) [WARN][TiSound ( 2733)] at ti.modules.titanium.media.AudioPlayerProxy.play(AudioPlayerProxy.java:124) [WARN][TiSound ( 2733)] at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) [WARN][TiSound ( 2733)] at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:159) [WARN][TiSound ( 2733)] at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:289) [WARN][TiSound ( 2733)] at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:185) [WARN][TiSound ( 2733)] at android.os.Handler.dispatchMessage(Handler.java:95) [WARN][TiSound ( 2733)] at android.os.Looper.loop(Looper.java:130) [WARN][TiSound ( 2733)] at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)

Comments

  1. Mauro Parra-Miranda 2013-11-20

    Hello! We used this code to reproduce your issue:
       var win = Ti.UI.createWindow({
           backgroundColor : 'white'
       });
        
       var player = Titanium.Media.createAudioPlayer({ url: 'http://music-com-bd.com/Music/A/Arfin%20Rumey/Eshona/Arfin%20Rumey%20-%20Ak%20Polok%20(music.com.bd).mp3', });
       player.play();
        
       win.open();
       
    without success. Where this happened? In device? Which device was? Which Android version was running? Best, Mauro
  2. Ki Song 2013-11-20

    Thanks Mauro, Indeed your mp3 url streams well without a problem. Let me give you an example with the url I am having trouble with: var win = Ti.UI.createWindow({ backgroundColor : 'white' }); var player = Titanium.Media.createAudioPlayer({ url: 'https://www.audioverse.org/english/download/stream/16418/2013/10/5240/20131012-0900-Steve_Wohlberg-Perils_of_the_Emerging_Church-16k.mp3', }); player.play(); win.open(); The code throws errors on HTC Evo Android 2.3.3 and the armeabi Android Emulator 2.3.3

JSON Source