[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.
Environment
This 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.