diff --git a/index.php b/index.php
index 178f20e..0380bb0 100644
--- a/index.php
+++ b/index.php
@@ -13,6 +13,8 @@
+
+
@@ -44,6 +46,10 @@
?>
+
+
diff --git a/js/audioplayer.js b/js/audioplayer.js
index ab4e8b4..b93a300 100644
--- a/js/audioplayer.js
+++ b/js/audioplayer.js
@@ -1,3 +1,35 @@
+SC.initialize({
+ client_id: 'B4dzsr4tDHKQqDMMMREfUnwrwJzvGaD2'
+});
+
+var id = 293
+
+var scPlayer;
+SC.stream('/tracks/' + id).then(function(player){
+ console.log(player);
+
+ // making sure that 'http' is the first item in .protocols seems to fix issues with the flash obj being blocked
+ player.options.protocols = [
+ "http",
+ "rtmp"
+ ];
+
+// player.play()
+ scPlayer = player;
+});
+
+function playTrack(trackNumber){
+ alert('playTrack');
+ if(trackNumber){
+ window.SC.Widget('soundcloud-player').skip(trackNumber);
+ }
+ window.SC.Widget('soundcloud-player').play();
+}
+
+//sound2 = new newSound(313537641);
+//newSound(313331549);
+
+
songs = [{"name": "money", "src":"assets/snd/one.mp3"},
{"name": "arab", "src":"assets/snd/two.mp3"},
{"name": "sphlash", "src":"assets/snd/three.mp3"},
@@ -28,7 +60,18 @@ window['songHandler'] = {
songVars : {},
playSong : function(songName){
songName = songName.replace('invis_', '');
- alert('Play: ' + songName);
+ var songIndex;
+ window['songs'].forEach(function(item, key){
+ if(item.name == songName){
+ songIndex = key;
+ }
+ });
+ window.playTrack(songIndex);
+ return true;
+
+ //
+ //
+ alert('Play: ' + songName);
for(key in this.songVars){
window[this.songVars[key]].stop();
if(key == songName){
diff --git a/page.js b/page.js
index 1884c8a..da22540 100644
--- a/page.js
+++ b/page.js
@@ -211,8 +211,12 @@ function onTouchStart(event){
console.log(event);
console.log(raycaster);
- unlockIOSAudioPlayback();
+ if(event.targetTouches){
+
+ }else{
+ return false;
+ }
mouse.x = +(event.targetTouches[0].pageX / window.innerWidth) * 2 +-1;
mouse.y = -(event.targetTouches[0].pageY / window.innerHeight) * 2 + 1;
@@ -223,7 +227,7 @@ function onTouchStart(event){
if ( intersects.length > 0 ) {
// alert(mesh.name);
- var mesh = intersects[0].object.parent;
+ var mesh = intersects[0].object.parent;
if(mesh.name == 'Cylinder'){
moveToDownloadPage();
}