{ "id": "62599", "key": "TIMOB-1967", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-04-28T20:46:15.000+0000", "created": "2011-04-15T03:06:48.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-05-31T22:42:20.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

When I create an AudioPlayer object and set a URL to an MP3 file\r\nI get an error that says 'No audio data found' even though I can\r\nverify a correct MP3 file is present and can be played through\r\niTunes and can be downloaded.

\r\n

Here is the code that I am using

\r\n
\r\n    var player = Titanium.Media.createAudioPlayer({url: audio_uri});\r\n    player.start();\r\n
\r\n

audio_uri is http://serverdemo.voicebox.com/VBTGetTTSAudio.aspx?TTS=79458.mp3

\r\n

This happens on an iPad/iPhone project with versions 1.4.1 and\r\n1.4.2 continuous.

{html}", "attachment": [], "flagged": false, "summary": "iOS: createAudioPlayer not playing MP3 from URL", "creator": { "name": "johnmcknight(atyahoo)", "key": "johnmcknight(atyahoo)", "displayName": "johnmcknight (at yahoo)", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "johnmcknight(atyahoo)", "key": "johnmcknight(atyahoo)", "displayName": "johnmcknight (at yahoo)", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "127112", "author": { "name": "eddiemonge", "key": "eddiemonge", "displayName": "eddiemonge", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I think its a problem with your audio file. I threw the link\ninto my working music player and it gave me the error.

{html}", "updateAuthor": { "name": "eddiemonge", "key": "eddiemonge", "displayName": "eddiemonge", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:06:49.000+0000", "updated": "2011-04-15T03:06:49.000+0000" }, { "id": "127113", "author": { "name": "johnmcknight(atyahoo)", "key": "johnmcknight(atyahoo)", "displayName": "johnmcknight (at yahoo)", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

It's not the file, I am able to fetch it using createHTTPClient\nand then play that file locally. If I just send the URL, it says\nthere is no audio data.

{html}", "updateAuthor": { "name": "johnmcknight(atyahoo)", "key": "johnmcknight(atyahoo)", "displayName": "johnmcknight (at yahoo)", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:06:49.000+0000", "updated": "2011-04-15T03:06:49.000+0000" }, { "id": "127114", "author": { "name": "johnmcknight(atyahoo)", "key": "johnmcknight(atyahoo)", "displayName": "johnmcknight (at yahoo)", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I have found the problem for my URL while attempting to use\ncreateSound to play the same URL.

\n

TiMediaSoundProxy.m around line 43 of the 1.5.0 nightly\nbuild.

\n
\n NSString *ext = [[[url path] lastPathComponent] pathExtension];\n
\n

For my URL, which is a fairly common thing to encounter, the\nvalue of ext becomes aspx because that is the file extension of the\nfile that is being called to return the MP3. Using the same logic,\na URL that is not using any file to return audio would have an\ninvalid extension as well. An example would be a streaming audio\nURL that is something like http://www.somestream.com/astream/\nwould fail because the ext variable would not specify the type of\nfile that is present.

\n

My sloppy test was changing that line to this and it would play\nmy file.

\n
\nNSString *ext = @\"mp3\";\n
\n

I assume the preferred way to deal with this would be some sort\nof media type detection and setting the temp ext according to it\nbut an easier would might be to allow developers to specify the\ntype of media we are attempting to play and make the ext variable\nbased on it. Just my opinion...

{html}", "updateAuthor": { "name": "johnmcknight(atyahoo)", "key": "johnmcknight(atyahoo)", "displayName": "johnmcknight (at yahoo)", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:06:50.000+0000", "updated": "2011-04-15T03:06:50.000+0000" }, { "id": "127115", "author": { "name": "johnmcknight(atyahoo)", "key": "johnmcknight(atyahoo)", "displayName": "johnmcknight (at yahoo)", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

When calling createAudioPlayer with the same URL, I have a\nsimilar problem.

\n

Around line 543 of AudioStreamer.m there is another place that\nlooks like it attempts to guess file type by extension which\nwouldn't work correctly for my URL. The comment directly above that\nline says.

\n
\n     //\n        // Attempt to guess the file type from the URL. Reading the MIME type\n        // from the CFReadStream would be a better approach since lots of\n        // URL's don't have the right extension.\n        //\n        // If you have a fixed file-type, you may want to hardcode this.\n        //\n
\n

This is similar to my comment above about being able to tell the\nmedia object what file type it is trying to stream.

{html}", "updateAuthor": { "name": "johnmcknight(atyahoo)", "key": "johnmcknight(atyahoo)", "displayName": "johnmcknight (at yahoo)", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:06:50.000+0000", "updated": "2011-04-15T03:06:50.000+0000" }, { "id": "209593", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Confirmed against SDK 2.2.0.014b86f. Probably due to URL mangling; a URL without special characters works fine.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-26T10:09:43.000+0000", "updated": "2012-07-26T10:09:43.000+0000" }, { "id": "418283", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving ticket as invalid due to the above comments and the lack of activity.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-04-28T20:46:15.000+0000", "updated": "2017-04-28T20:46:15.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }