[TIMOB-3348] Ti.Media.Sound url bug
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2011-08-29T14:13:49.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2011-35 |
Components | iOS |
Labels | createsound, media, sound |
Reporter | netspy |
Assignee | Reggie Seagraves |
Created | 2011-04-15T03:42:43.000+0000 |
Updated | 2017-03-22T18:04:29.000+0000 |
Description
This works:
var sound = Titanium.Media.createSound();
sound.url='../cricket.wav';
sound.play();
But if I try to change the url after that, sound plays still the
cricket.wav sound.
sound.url='../other_sound.wav';
sound.play(); /* plays cricket.wav */
Associated HD ticket
ENT customer relying on this, APP-117136Tested on
Simulator iOS 4.3 Device iPod / iPad 1Target Environment
{noformat} Product: Mobile SDK: 1.7.2 Platform OS: iOS Version: 4.3 {noformat}Repro sequence
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.
MY COMMENT PERTAINS TO ANDROID ONLY, HAVE NOT TESTED ON iOS. MAY OR MAY NOT APPLY TO iOS AS WELL But if you do that (create a new soundobject) - you end up depleting resources and your application will go silent. You will get an errormessage in the log-output, but no errors are raised to the app. Further details here: http://developer.appcelerator.com/question/140287/problems-with-timediasound-on-android
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. This method is not available on Android. So a doc-update is needed
Closing ticket as the issue will not fix and with reference to the above comments.