Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8418] iOS: AudioPlayer is failing for some mp3, even if are in a supported format/encoding.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-09-24T17:14:29.000+0000
Affected Version/sRelease 1.8.2
Fix Version/sRelease 2.1.0, Sprint 2012-08
ComponentsiOS
LabelsSupportTeam, api, module_media, qe-testadded
ReporterMauro Parra-Miranda
AssigneeMax Stepanov
Created2012-03-29T11:35:59.000+0000
Updated2012-09-24T17:14:29.000+0000

Description

Problem Description

This doesn't seem to work for me, the mp3 plays fine via a web browser though. The code is correct so internally it doesn't like the file format. Is there a reason for this or something I can do (including encoding the audio differently) so that it's compatible. 90% of the audio files I encode all work, it's only a small number that don't and they are encoded the same way always. Replacing the audio file with something else works fine. This is the last stumbling block to release my app.

Actual Results

One file it's working, one it's not. EVen if they are encoded in the same way.

Expected results

Similar encoded mp3 files should play just fine

Test Case

1. Create a new mobile Project 2. Add this code
var win = Ti.UI.createWindow();
var vurl = "http://www.voxsci.com/turtle2.mp3"; 
Ti.API.info(vurl); 
var streamer = Titanium.Media.createAudioPlayer({
	allowBackground: true,
	url:vurl,
	preload:true
}); 
streamer.start();
Ti.API.info("Audio started");
win.open();
3. If you change the vurl to "http://www.voxsci.com/turtle1.mp3", it will work just fine.

Extra info

I checked the files, they are similar: Mono, 44100hz, 32 bits float and they work in browser and audacity.

Comments

  1. Max Stepanov 2012-04-10

    PR https://github.com/appcelerator/titanium_mobile/pull/1971 pending.
  2. Vishal Duggal 2012-04-13

    Fixed by PR #1971
  3. Tushar Joshi 2012-04-16

    Thanks so much for fixing this, how can I possibly use this fix? Can you point me to a way I can get the latest titanium code to incorporate this fix please? Or is it a matter of waiting for the next titanium release? Thanks again, Tushar
  4. Olga Romero 2012-08-09

    verified fix with: Titanium Studio, build: 2.1.1.201207271312 Titanium SDK 2.1.1 iPhone4 5.1.1 closing as fixed
  5. Shyam Bhadauria 2012-08-10

    Re-opening to edit label
  6. Olga Romero 2012-08-23

    Audio player fails to consistently play mp3 . Rerunning test several times might result in one success to hear the sound. The same behavior in 2.1.1. Tested on: Titanium Studio, build: 2.1.2.201208201549 Titanium SDK: 2.1.2.v20120821160113 Mac osx Mountain Lion 10.8 iPhone4s 5.0.1 iPad3 4G 5.1.1

JSON Source