Skip to content

Commit

Permalink
Testing audio player
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Mar 13, 2014
1 parent d139498 commit 5aa0e09
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ var app = {
var music_mp3 = "http://www.x-services.nl/mindfullness-test.mp3";

// preload audio resource
lla.preloadAudio( music_mp3, music_mp3, 1, function(msg){
}, function(msg){
alert( 'error 1: ' + msg );
});
// lla.preloadAudio( music_mp3, music_mp3, 1, function(msg){
// }, function(msg){
// alert( 'error 1: ' + msg );
// });

// lla.preloadFX( click_sound, click_sound, function(msg){
// }, function(msg){
Expand All @@ -96,16 +96,15 @@ var app = {
// Audio player
//

// function onSuccess() {
// alert("ok");
// }
// function onError() {
// alert("nok");
// }
// var my_media = new Media("http://www.x-services.nl/mindfullness-test.mp3", onSuccess, onError);
// var my_media = new Media("http://www.x-services.nl/mindfullness-test.mp3", onSuccess, onError);
// my_media.play({ playAudioWhenScreenIsLocked : false });
// my_media.play();
function onSuccess() {
alert("ok");
}
function onError() {
alert("nok");
}
var my_media = new Media("http://www.x-services.nl/mindfullness-test.mp3", onSuccess, onError);
// my_media.play({ playAudioWhenScreenIsLocked : false });
my_media.play();

/*
// Update media position every second
Expand Down

0 comments on commit 5aa0e09

Please sign in to comment.