Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-13150

Android: AudioPlayer.start() freezes UI thread

    Details

      Description

      Problem description
      AudioPlayer.start() freezes the user interface on Android for several seconds (9 seconds and more) until playback starts. I would expect it to be asynchronous (there are events that all one to know what happens...). Or at least it should also have a startAsync(). The url of the AudioPlayer is set to a remote MP3/SHOUTcast stream.

      Test case

      var win = Ti.UI.createWindow({
      	backgroundColor : "#FFF"
      });
       
      var audioPlayer = Titanium.Media.createAudioPlayer({
      	allowBackground : true
      });
      audioPlayer.setUrl('http://broadcast.infomaniak.net:80/energyzuerich-high.mp3');
      var s = new Date().getTime();
      audioPlayer.start();
      audioPlayer.stop();
      alert("time required: " + (new Date().getTime() - s));
       
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sunila Sunila
                Reporter:
                remmeier Remo
                Reviewer:
                Ping Wang
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-15964
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration