[TIMOB-23428] Android: Ti.Media.Sound method 'setUrl' not working
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-12-15T08:54:27.000+0000 |
| Affected Version/s | Release 5.2.2 |
| Fix Version/s | Release 6.1.0 |
| Components | Android |
| Labels | Ti.Media.Sound, setUrl |
| Reporter | CREATIVE KAIZEN |
| Assignee | Maggie Chen |
| Created | 2016-05-24T15:06:39.000+0000 |
| Updated | 2017-01-03T22:17:19.000+0000 |
Description
Ti.Media.Sound method 'setUrl' is described in latest documentation.
has no method 'setUrl'
[ERROR] : File: app.js
[ERROR] : Line: undefined
[ERROR] : SourceId: undefined
[ERROR] : Backtrace:
[ERROR] : undefined
Thanks
Steps to reproduce
var sound = Ti.Media.createSound({
url: '/sounds/sample.mp3'
});
sound.setUrl('/sounds/sample2.mp3');
sound.play();
Hello, I was able to reproduce the issue. This is a valid bug in Android. For iOS this is working as expected.
Environmentvar sound = Ti.Media.createSound({}); sound.setUrl('Sounds.mp3'); sound.play();Operating System Name = Mac OS X Version = 10.11.4 Architecture = 64bit # CPUs = 4 Memory = 8589934592 Node.js Node.js Version = 4.2.2 npm Version = 2.14.7 Titanium CLI CLI Version = 5.0.6 Titanium SDK SDK Version = 5.2.2.GA Target Platform = androidThis issue is still reproducible in SDK 6.0.0.GA. Tested in Android 6.0.1 device.
PR: https://github.com/appcelerator/titanium_mobile/pull/8690
Validated with this environment: NPM Version: 2.15.9 Node Version: 4.5.0 Mac OS: 10.12.1 Appc CLI: 6.1.0 Appc CLI NPM: 4.2.8 Titanium SDK version: 6.1.0.v20170103080657 Appcelerator Studio, build: 4.8.1.201612050850 Xcode 8.2 Android Device: 6.0.1 I first reproduced the issue using SDK 6.0.1 GA. The sound file did not play, and errors were printed on the console. I then tried it (on Android Device) with SDK 6.1.0, and was able to play a sound file as expected, and no errors were printed.