Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13327] TiAPI: AAC stream shoutcast not working

GitHub Issuen/a
TypeBug
PriorityLow
StatusReopened
ResolutionUnresolved
Affected Version/sRelease 3.0.2
Fix Version/sn/a
ComponentsCore
Labelsn/a
ReporterAlexis Gaitan
AssigneeUnknown
Created2012-09-22T15:00:30.000+0000
Updated2018-02-28T20:03:21.000+0000

Description

*Problem description* Creating a radio stream with the AAC+ format does not work. *iOS behavior* On launch nothing plays and alert dialog appears with "File Error - Unable to configure network read stream." *Android behavior* Nothing happens on launch, sometimes crashes. *Note* MP3 streams work fine on both Android and iOS, the following URL works: http://icecast.omroep.nl/radio1-sb-mp3 *Test case*
// AAC stream URL
var s = "http://184.164.135.245:8026/";

var sound = Ti.Media.createAudioPlayer({
	url : s,
	preload : true,
	allowBackground : true
});

sound.format = Titanium.Media.AUDIO_FORMAT_AAC;
sound.addEventListener('error', function(e) {
	if (e.message == "Unknown media error") {
		alert("No");
	}
});

sound.addEventListener('complete', function() {
	// your code here
});

sound.addEventListener('interrupted', function() {
	// your code here
});

sound.addEventListener('resume', function() {
	// your code here
});

sound.addEventListener('progress', function(e) {
	// your code here
});

sound.start();
*Logs*
[INFO][TiAPI ( 320)] State: starting (4)
[INFO][TiAPI ( 320)] State: stopped (5)
[INFO][StagefrightPlayer( 34)] setDataSource('http://184.164.135.242:9990/')
[ERROR][MediaPlayer( 320)] error (1, -2147483648)
[WARN][TiSound ( 320)] (KrollRuntimeThread) [23253,370368] Issue while initializing :
[WARN][TiSound ( 320)] java.io.IOException: Prepare failed.: status=0x1
[WARN][TiSound ( 320)] at android.media.MediaPlayer.prepare(Native Method)
[WARN][TiSound ( 320)] at ti.modules.titanium.media.TiSound.initialize(TiSound.java:119)
[WARN][TiSound ( 320)] at ti.modules.titanium.media.TiSound.play(TiSound.java:178)
[WARN][TiSound ( 320)] at ti.modules.titanium.media.AudioPlayerProxy.play(AudioPlayerProxy.java:127)
[WARN][TiSound ( 320)] at ti.modules.titanium.media.AudioPlayerProxy.start(AudioPlayerProxy.java:120)
[WARN][TiSound ( 320)] at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[WARN][TiSound ( 320)] at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:60)
[WARN][TiSound ( 320)] at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:636)
[WARN][TiSound ( 320)] at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:831)
[WARN][TiSound ( 320)] at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:307)
[WARN][TiSound ( 320)] at android.os.Handler.dispatchMessage(Handler.java:95)
[WARN][TiSound ( 320)] at android.os.Looper.loop(Looper.java:123)
[WARN][TiSound ( 320)] at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:109)
[INFO][TiAPI ( 320)] State: starting (4)
[INFO][TiAPI ( 320)] State: stopped (5)
[INFO][StagefrightPlayer( 34)] setDataSource('http://184.164.135.242:9990/')
[ERROR][MediaPlayer( 320)] error (1, -2147483648)

Comments

  1. Alexis Gaitan 2012-09-24

    i read in q&a that titanium proxies media modules are outdated and thats why we cant reproduce aac+ shoutcast live stream? is true? if you need more information i can provide it to you thanks very much
  2. Alexis Gaitan 2012-09-24

    if i setup and stream url shoutcast mp3 it works but not with aacp stream stype
  3. Alexis Gaitan 2012-09-24

    im keep getting this in logs: {quote} [INFO][TiAPI ( 320)] State: starting (4) [INFO][TiAPI ( 320)] State: stopped (5) [INFO][StagefrightPlayer( 34)] setDataSource('http://184.164.135.242:9990/') [ERROR][MediaPlayer( 320)] error (1, -2147483648) [WARN][TiSound ( 320)] (KrollRuntimeThread) [23253,370368] Issue while initializing : [WARN][TiSound ( 320)] java.io.IOException: Prepare failed.: status=0x1 [WARN][TiSound ( 320)] at android.media.MediaPlayer.prepare(Native Method) [WARN][TiSound ( 320)] at ti.modules.titanium.media.TiSound.initialize(TiSound.java:119) [WARN][TiSound ( 320)] at ti.modules.titanium.media.TiSound.play(TiSound.java:178) [WARN][TiSound ( 320)] at ti.modules.titanium.media.AudioPlayerProxy.play(AudioPlayerProxy.java:127) [WARN][TiSound ( 320)] at ti.modules.titanium.media.AudioPlayerProxy.start(AudioPlayerProxy.java:120) [WARN][TiSound ( 320)] at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) [WARN][TiSound ( 320)] at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:60) [WARN][TiSound ( 320)] at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:636) [WARN][TiSound ( 320)] at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:831) [WARN][TiSound ( 320)] at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:307) [WARN][TiSound ( 320)] at android.os.Handler.dispatchMessage(Handler.java:95) [WARN][TiSound ( 320)] at android.os.Looper.loop(Looper.java:123) [WARN][TiSound ( 320)] at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:109) [INFO][TiAPI ( 320)] State: starting (4) [INFO][TiAPI ( 320)] State: stopped (5) [INFO][StagefrightPlayer( 34)] setDataSource('http://184.164.135.242:9990/') [ERROR][MediaPlayer( 320)] error (1, -2147483648) {quote}
  4. Daniel Sefton 2013-04-02

    Hi Alexis, Our apologies for taking a while. I noticed that the URL in this sample is down - do you have a new URL that we could try? Could you also confirm whether this works on iOS? Then we can know if it's a parity issue. I removed sound.isMediaTypeSupported() from your test case because it was causing an undefined error. Thanks.
  5. Alexis Gaitan 2013-04-02

    Sure, http://184.164.135.245:8026/ new url, i dont know i just test it using android :)
  6. Daniel Sefton 2013-04-02

    Tested and confirmed on Android and iOS with SDK 3.0.2 GA on iOS 6 simulator and Samsung Galaxy S2 2.3.6. Updated description.

JSON Source