{ "id": "63980", "key": "TIMOB-3348", "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": "12075", "description": "", "name": "Sprint 2011-35", "archived": true, "released": true, "releaseDate": "2011-09-05" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2011-08-29T14:13:49.000+0000", "created": "2011-04-15T03:42:43.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "createsound", "media", "sound" ], "versions": [], "issuelinks": [ { "id": "12584", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "62120", "key": "TIMOB-1488", "fields": { "summary": "Cannot reset the url of a sound object", "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" } }, "priority": { "name": "Trivial", "id": "5" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "43082", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "140055", "key": "TIMOB-18058", "fields": { "summary": "Kitchen Sink: Not able to change url of sound; Remove button", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T18:04:29.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}

This works:

\r\n
\r\nvar sound = Titanium.Media.createSound();\r\nsound.url='../cricket.wav';\r\nsound.play();\r\n
\r\n

But if I try to change the url after that, sound plays still the\r\ncricket.wav sound.

\r\n
\r\nsound.url='../other_sound.wav';\r\nsound.play(); /* plays cricket.wav */\r\n
{html}", "attachment": [], "flagged": false, "summary": "Ti.Media.Sound url bug", "creator": { "name": "netspy", "key": "netspy", "displayName": "netspy", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "netspy", "key": "netspy", "displayName": "netspy", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "163358", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "h5.Associated HD ticket\r\nENT customer relying on this, APP-117136\r\n\r\nh5.Tested on\r\nSimulator iOS 4.3\r\nDevice iPod / iPad 1\r\n\r\nh5.Target Environment\r\n{noformat}\r\n Product: Mobile SDK: 1.7.2\r\n Platform OS: iOS Version: 4.3\r\n{noformat}\r\n\r\nh5.Repro sequence\r\n{code:title=app.js}\r\n//\r\n// create controls tab and root window\r\n//\r\nvar win2 = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 2',\r\n\tbackgroundColor : '#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({\r\n\ticon : 'KS_nav_ui.png',\r\n\ttitle : 'Tab 2',\r\n\twindow : win2\r\n});\r\n\r\nvar label2 = Titanium.UI.createLabel({\r\n\tcolor : '#999',\r\n\ttext : 'I am Window 2',\r\n\tfont : {\r\n\t\tfontSize : 20,\r\n\t\tfontFamily : 'Helvetica Neue'\r\n\t},\r\n\ttextAlign : 'center',\r\n\twidth : 'auto'\r\n});\r\n\r\nwin2.add(label2);\r\n\r\nvar b1 = Titanium.UI.createButton({\r\n\ttitle:'Play me!',\r\n\tcolor : '#fff',\r\n\ttop : 74,\r\n\tleft : 0,\r\n\twidth : 107,\r\n\theight : 69\r\n});\r\n\r\nwin2.add(b1);\r\n\r\nwin2.open();\r\n\r\nvar snd = Titanium.Media.createSound({\r\n\t//url : 'mp3/sn-1.mp3',\r\n\tpreload : true\r\n});\r\nsnd.isLopping = false;\r\n\r\nvar type = 1;\r\n\r\nfunction go() {\r\n\t\r\n\ttry {\r\n\t\tif(type == 1) {\r\n\t\t\tsn = 'mp3/sn-1.mp3';\r\n\t\t\ttype = 2;\r\n\t\t\tTi.API.info(\"first file\");\r\n\t\t}else if(type == 2) {\r\n\t\t\tsn = 'mp3/sn-9.mp3';\r\n\t\t\ttype = 1;\r\n\t\t\tTi.API.info(\"second file\");\r\n\t\t}\r\n\r\n\t\tsnd.url = sn;\r\n\t\tTi.API.info(sn);\r\n\t\t\r\n\t} catch (e) {\r\n\t\tTi.API.error(\"FAIL: play creating sound:\" + e);\r\n\t}\r\n\t\r\n\tsnd.play();\r\n}\r\n\r\nb1.addEventListener('click', function(e) {\r\n\tTi.API.info(\"click\");\r\n\tgo();\r\n}, false);\r\n{code}", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-08-18T16:14:45.000+0000", "updated": "2011-08-18T16:14:45.000+0000" }, { "id": "164406", "author": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of customer issue TIMOB-1488. This can be easily achieved by creating a new sound object. Furthermore, this would create a platform parity issue and would complicate any future API that, for example, would support sound channels, etc. A sound object should be considered an immutable object once it's constructed.", "updateAuthor": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-29T14:13:49.000+0000", "updated": "2011-08-29T14:13:49.000+0000" }, { "id": "213107", "author": { "name": "acebone", "key": "acebone", "displayName": "Esben Maaløe", "active": true, "timeZone": "Europe/Berlin" }, "body": "MY COMMENT PERTAINS TO ANDROID ONLY, HAVE NOT TESTED ON iOS. MAY OR MAY NOT APPLY TO iOS AS WELL\r\n\r\nBut if you do that (create a new soundobject) - you end up depleting resources and your application will go silent.\r\n\r\nYou will get an errormessage in the log-output, but no errors are raised to the app.\r\n\r\nFurther details here: http://developer.appcelerator.com/question/140287/problems-with-timediasound-on-android", "updateAuthor": { "name": "acebone", "key": "acebone", "displayName": "Esben Maaløe", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-08-07T07:10:48.000+0000", "updated": "2012-08-07T07:10:48.000+0000" }, { "id": "213108", "author": { "name": "acebone", "key": "acebone", "displayName": "Esben Maaløe", "active": true, "timeZone": "Europe/Berlin" }, "body": "Besides - the docs have no mention of not being able to set a new Url, on the contrary, in the docs you have a 'setUrl' method.\r\n\r\nThis method is not available on Android.\r\n\r\nSo a doc-update is needed", "updateAuthor": { "name": "acebone", "key": "acebone", "displayName": "Esben Maaløe", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-08-07T07:12:33.000+0000", "updated": "2012-08-07T07:12:33.000+0000" }, { "id": "414830", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue will not fix and with reference to the above comments. ", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T18:04:29.000+0000", "updated": "2017-03-22T18:04:29.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }