loop from preview position
This commit is contained in:
parent
9d8a5f3792
commit
53610808bf
@ -20,9 +20,13 @@ function SongSelect(){
|
|||||||
var no_delay = first_open ? 0 : 300;
|
var no_delay = first_open ? 0 : 300;
|
||||||
|
|
||||||
_preview.currentTime = _preview.duration/2-10;
|
_preview.currentTime = _preview.duration/2-10;
|
||||||
_preview.loop = true;
|
|
||||||
_preview.volume = 0.5;
|
_preview.volume = 0.5;
|
||||||
|
|
||||||
|
_preview.addEventListener('ended', function(){
|
||||||
|
this.currentTime = this.duration/2-10;
|
||||||
|
this.play();
|
||||||
|
}, false);
|
||||||
|
|
||||||
_preview_to = setTimeout(function(){
|
_preview_to = setTimeout(function(){
|
||||||
_preview.play();
|
_preview.play();
|
||||||
}, delay <= 1000 && first_open ? 1000 : no_delay);
|
}, delay <= 1000 && first_open ? 1000 : no_delay);
|
||||||
|
Loading…
Reference in New Issue
Block a user