Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9065] Android: Sound - Remote URL does not play

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-12-05T23:23:16.000+0000
Affected Version/sRelease 2.0.2
Fix Version/sRelease 3.2.0, Release 3.3.0
ComponentsAndroid
Labelsapi, kitchensink, module_media, qe-3.2.0, qe-testadded, regression
ReporterAnshu Mittal
AssigneePing Wang
Created2012-05-08T23:57:26.000+0000
Updated2014-02-19T01:29:02.000+0000

Description

Remote URL does not play. Steps To Reproduce: 1. LG-P970 > Kitchensink > Phone> Sound> RemoteURL 2. Press Play Actual: 05-09 06:43:26.673: V/MediaPlayerService(1627): [68] notify (0x920d8, 100, 1, -2112880640) 05-09 06:43:26.680: E/MediaPlayer(11860): error (1, -2112880640) 05-09 06:43:26.680: W/TiSound(11860): (KrollRuntimeThread) [2746,8112398] Issue while initializing : 05-09 06:43:26.680: W/TiSound(11860): java.io.IOException: Prepare failed.: status=0x1 05-09 06:43:26.680: W/TiSound(11860): at android.media.MediaPlayer.prepare(Native Method) 05-09 06:43:26.680: W/TiSound(11860): at ti.modules.titanium.media.TiSound.initialize(TiSound.java:119) 05-09 06:43:26.680: W/TiSound(11860): at ti.modules.titanium.media.TiSound.play(TiSound.java:178) 05-09 06:43:26.680: W/TiSound(11860): at ti.modules.titanium.media.SoundProxy.play(SoundProxy.java:135) 05-09 06:43:26.680: W/TiSound(11860): at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) 05-09 06:43:26.680: W/TiSound(11860): at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:60) 05-09 06:43:26.680: W/TiSound(11860): at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:494) 05-09 06:43:26.680: W/TiSound(11860): at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:675) 05-09 06:43:26.680: W/TiSound(11860): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:398) 05-09 06:43:26.680: W/TiSound(11860): at android.os.Handler.dispatchMessage(Handler.java:95) 05-09 06:43:26.680: W/TiSound(11860): at android.os.Looper.loop(Looper.java:123) 05-09 06:43:26.680: W/TiSound(11860): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:104) 05-09 06:43:26.680: V/MediaPlayerService(1627): disconnect(68) from pid 11860 Expected: File should play successfully Note: Also occured in 1.8.2

Comments

  1. Neeraj Gupta 2012-05-10

    @amittal - This ticket mentions Android in the subject but the component is marked as KitchenSink. Is this a platform issue or KitchenSink issue? Did you run the same test with iOS platform? We need to file these tickets with better information.
  2. Anshu Mittal 2012-05-18

    This is the platform issue and the problem occurs only for the device LG-P970(v 2.2). It works fine for iOS devices and following Android devices: 1. Samsung galaxy tab(v 3.2) 2. Samsung galaxy nexus (4.0.2) 3. Samsung Galaxy note(2.3.6)
  3. Neeraj Gupta 2012-05-19

    @anshu - if it is a platform issue then why the component was set as KitchenSink?
  4. jithinpv 2013-03-19

    device specific jithinpv
  5. Paras Mishra 2013-12-04

    Issue is reproducible using following environment. Kitchensink: Phone-> Sound ->Remote url then click play It works fine on SDK: 3.1.3.GA Tested on: Device : Google Nexus 7, Android Version: 4.3 SDK: 3.2.0.v20131203104847 CLI version : 3.2.0-beta OS : MAC OSX 10.9 Alloy: 1.3.0-beta ACS: 1.0.9 Appcelerator Studio, build: 3.2.0.201311272052 titanium-code-processor: 1.1.0-beta XCode : 5.0.2 Expected: Sound should play Actual: Sound does not play
  6. Ping Wang 2013-12-04

    The regression is caused by [PR#4593](https://github.com/appcelerator/titanium_mobile/pull/4593).
  7. Ping Wang 2013-12-05

    PR: https://github.com/appcelerator/titanium_mobile/pull/5060 For FR: 1. Run the KS->Phone-> Sound ->Remote url. Play with all the buttons. The sound should play/pause/stop/reset without any problem. 2. Run the below test case. The log should show
       I/TiAPI   (25912):  ****************** Before initialized: sound.getDuration() = 0
       
    Then click the button and the log should show
       I/TiAPI   (25912):  ****************** After initialized: sound.getDuration() = 7863
       
    Another test case:
       var win=Ti.UI.createWindow({
       	backgroundColor: "white"
       });
       
       var url = "http://www.archive.org/download/CelebrationWav/1.wav";
       
       var sound = Titanium.Media.createSound();
       sound.url = url;
       
       var button = Ti.UI.createButton({
       	title: "play sound"
       });
       
       button.addEventListener("click", function(){
       	sound.play();
       });
       
       sound.addEventListener("change", function(e){
       	if (e.state == sound.STATE_INITIALIZED) {
       		Ti.API.info("****************** After initialized: sound.getDuration() = " + sound.getDuration());
       	}
       });
       
       Ti.API.info("****************** Before initialized: sound.getDuration() = " + sound.getDuration());
       
       win.add(button);
       win.open();
       
  8. Ping Wang 2013-12-05

    3.2.X PR: https://github.com/appcelerator/titanium_mobile/pull/5071
  9. Paras Mishra 2013-12-11

    Remote Url does play the sound. Tested both the above app and KitchenSink. Verified fix on: Device : Google Nexus 4, Android Version: 4.0.4, SDK: 3.2.0.v20131210191510 CLI version : 3.2.0-cr OS : MAC OSX 10.9 Alloy: 1.3.0-cr ACS: 1.0.10 Appcelerator Studio, build: 3.2.0.201312101708 titanium-code-processor: 1.1.0-cr XCode : 5.0.2

JSON Source