Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

play/pause audio not work

$
0
0

hi.

i run simple code to play/pause audio, but it gaves me this message
libc: Fatal signal 11 (SIGSEGV) at 0x00000014 (code=1), thread 2872 (KrollRuntimeThr) and not work, why??

index.xml

<Alloy>
    <Window class="container">
        <View layout="vertical">
        <Button id="label" onClick="doPlay" title="play">
        <Button id="label2" onClick="doPause" title="pause">
          </View>
    </Window>
</Alloy>
index.js
var win2Sound = Titanium.Media.createSound({
    url: '../sounds/25921__suonho__funkysynth-retweek-talkboxer-wha-116bpm.mp3', 
    preload:true
});
function doPlay(e) {
    win2Sound.play();
}
function doPause(e) {
    win2Sound.pause();
}
 
$.index.open();
Note i Put sounds folder in Resources folder

Viewing all articles
Browse latest Browse all 8068

Trending Articles