change preview time
This commit is contained in:
parent
24b245aa65
commit
9d8a5f3792
@ -45,8 +45,10 @@ function Controller(selectedSong, songData){
|
|||||||
_view.refresh();
|
_view.refresh();
|
||||||
}
|
}
|
||||||
else if(ms>=0 && !started){ //when music shall starts
|
else if(ms>=0 && !started){ //when music shall starts
|
||||||
assets.sounds["main-music"].volume = 0.7;
|
setTimeout(function(){
|
||||||
assets.sounds["main-music"].play();
|
assets.sounds["main-music"].volume = 0.7;
|
||||||
|
assets.sounds["main-music"].play();
|
||||||
|
}, _songData.generalInfo.audioWait);
|
||||||
started=true;
|
started=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ function ParseSong(fileContent){
|
|||||||
|
|
||||||
var _this = this;
|
var _this = this;
|
||||||
var _data = fileContent;
|
var _data = fileContent;
|
||||||
var _generalInfo={audioFilename:""};
|
var _generalInfo={audioFilename:"", audioWait:0};
|
||||||
var _metadata={title:'', artist:''};
|
var _metadata={title:'', artist:''};
|
||||||
var _difficulty={sliderMultiplier:0, sliderTickRate:0, approachRate:0};
|
var _difficulty={sliderMultiplier:0, sliderTickRate:0, approachRate:0};
|
||||||
var _beatInfo={beatInterval:0, bpm:0};
|
var _beatInfo={beatInterval:0, bpm:0};
|
||||||
@ -120,6 +120,9 @@ function ParseSong(fileContent){
|
|||||||
case 'SliderMultiple':
|
case 'SliderMultiple':
|
||||||
_generalInfo.audioFilename = key;
|
_generalInfo.audioFilename = key;
|
||||||
break;
|
break;
|
||||||
|
case 'AudioWait':
|
||||||
|
_generalInfo.audioWait = parseInt(key);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ function SongSelect(){
|
|||||||
var delay = end - start;
|
var delay = end - start;
|
||||||
var no_delay = first_open ? 0 : 300;
|
var no_delay = first_open ? 0 : 300;
|
||||||
|
|
||||||
_preview.currentTime = 10.0;
|
_preview.currentTime = _preview.duration/2-10;
|
||||||
_preview.loop = true;
|
_preview.loop = true;
|
||||||
_preview.volume = 0.5;
|
_preview.volume = 0.5;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user