{ "id": "63218", "key": "TIMOB-2586", "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": [ { "id": "11234", "name": "Release 1.6.0 M01", "archived": true, "released": true, "releaseDate": "2010-12-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:59:31.000+0000", "created": "2011-04-15T03:23:38.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "android", "defect", "release-1.6.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2011-04-17T01:59:31.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

Our \ndocs say that the way you set the Audio Player's url is with\n.setUrl. This causes an exception in Android (though\nit is possible to set the .url property instead).

\n

Failcase:

\n
\nvar player = Ti.Media.createAudioPlayer();\nplayer.setUrl('x');\n
\n

will cause an exception which you can see in logcat (trace\nlog):

\n
\nE/KrollContext(  456): org.mozilla.javascript.EcmaError: TypeError: Cannot find function setUrl in object [Ti.Media.AudioPlayer]. (app://app.js#10)\nE/KrollContext(  456):  at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3761)\nE/KrollContext(  456):  at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3739)\nE/KrollContext(  456):  at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3767)\nE/KrollContext(  456):  at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3786)\nE/KrollContext(  456):  at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3850)\nE/KrollContext(  456):  at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2343)\nE/KrollContext(  456):  at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2310)\nE/KrollContext(  456):  at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1524)\nE/KrollContext(  456):  at script(app://app.js:10)\n
{html}", "attachment": [], "flagged": false, "summary": "Android: AudioPlayer.setUrl causes exception", "creator": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "128878", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [f56e13c4273318e5515db7de0d4b59be4463e155])\n[#2586 state:fixed-in-qa] Add kroll.method\nannotation to AudioPlayerProxy.setUrl, drillbit test for it.\n\nhttps://github.com/appcelerator/titanium_mobile/commit/f56e13c42733...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:23:38.000+0000", "updated": "2011-04-15T03:23:38.000+0000" }, { "id": "128879", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

[INFO] Titanium SDK version: 1.6.0 (01/04/11\n08:01 e49700d), no exception using provided code snippet, emulator\nor 1.6 device

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:23:39.000+0000", "updated": "2011-04-15T03:23:39.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }