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.
PR https://github.com/appcelerator/titanium_mobile/pull/1971 pending.
Fixed by PR #1971
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
verified fix with: Titanium Studio, build: 2.1.1.201207271312 Titanium SDK 2.1.1 iPhone4 5.1.1 closing as fixed
Re-opening to edit label
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