Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13441] iOS: mp4 not playing with AudioPlayer

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-05-02T22:05:12.000+0000
Affected Version/sRelease 3.0.2, Release 3.1.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterShashi Jain
AssigneeEric Merriman
Created2012-11-27T22:13:20.000+0000
Updated2017-05-02T22:05:12.000+0000

Description

Using 3.1.0 sdk: Trying to play a remote .m4a (audio mp4) file with AudioPlayer. The .m4a file was created with AudioRecorder. In KitchenSink Resources/ui/handheld/ios/phone/sound_session_module.js: replace: var audio = Ti.Media.createAudioPlayer({url:'http://appcelerator.qe.test.data.s3.amazonaws.com/KSResources/audio/audio_session.mp3'}); with: var audio = Ti.Media.createAudioPlayer({url:'https://s3.amazonaws.com/titaniumtestfiles/135397723348131a88e5b0d1ace317567db810607f3b6.m4a'}); This will not play in Simulator or on device (iPhone 4S). It crashes after displaying the following log:
[INFO] :   2013-04-06 12:03:34.141 KitchenSink[41416:9207] Queueing of audio buffer failed. err: ˇˇˇŒ -50
However, it will work on device if you replace: Titanium.Media.audioSessionMode = Ti.Media.AUDIO_SESSION_MODE_AMBIENT; with: Titanium.Media.audioSessionMode = Ti.Media.AUDIO_SESSION_MODE_PLAY_AND_RECORD; or Titanium.Media.audioSessionMode = Ti.Media.AUDIO_SESSION_MODE_PLAYBACK; The simulator however, continues to crash.

Comments

  1. Shashi Jain 2012-12-06

    Also happens in 2.1.4GA.
  2. Shashi Jain 2013-02-11

    Any updates on this? I've also noticed another problem (I'm thinking of putting this into its own ticket.): changing the bufferSize (e.g. from default 2048 to 16384) causes the app to crash. I get the following error: AudioQueue changed state in unexpected way. This is on device, iPhone 4S. Using recent Ti 3.1.0 build, iOS 6.1 SDK. setBufferSize() works fine with mp3 files. The app does not crash with mp4 files using default bufferSize.
  3. Daniel Sefton 2013-04-06

    Tested and confirmed with Ti SDK 3.0.2 GA. Updated description to clarify a couple of things.
  4. Lee Morris 2017-05-02

    Resolving ticket as Invalid as there is now a new version of Kitchen Sink available and we no longer support the version which relates to this ticket.

JSON Source