[TIMOB-19805] KitchenSink: Remote url , sound doesn't play on android.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-05-02T20:41:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Angel Petkov |
Assignee | Ashraf Abu |
Created | 2015-10-27T21:08:19.000+0000 |
Updated | 2017-05-02T20:41:42.000+0000 |
Description
var win = Titanium.UI.createWindow({
title : "test"
}),
isIOS = Titanium.Platform.name === 'iPhone OS',
isAndroid = Ti.Platform.name === 'android',
isTizen = Ti.Platform.osname === 'tizen';
var timob7502fix = ((Ti.version >= '3.0.0') && (Titanium.Platform.name == 'iPhone OS'));
var url = "http://www.archive.org/download/CelebrationWav/1.wav";
// On iOS, loading remote url takes time and blocks window opening.
// Set the url after the window opens on iOS.
var sound = Titanium.Media.createSound({
url : url
});
// Show Actvity Indicator when loading the remote url.
var actInd = Titanium.UI.createActivityIndicator({
bottom : 10,
style : Titanium.UI.ActivityIndicatorStyle.DARK,
message : "Loading URL ..."
});
win.add(actInd);
actInd.show();
win.addEventListener('open', function() {
actInd.hide();
});
//
// PLAY
//
var play = Titanium.UI.createButton({
title : 'Play',
height : 40,
width : 145,
left : 10,
top : 10
});
play.addEventListener('click', function() {
sound.play();
});
win.add(play);
win.open();
The issue is linked to be autolayout related. Since autolayout is iOS only, this might be independent from that.
Resolving ticket as Invalid as there is now a new version of Kitchen Sink available and we no longer support the version which relates to this ticket.