Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Taiko Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Taiko Web
Commits
1c92f3b3
Commit
1c92f3b3
authored
Sep 11, 2018
by
LoveEevee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix song previews
parent
47f346ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
public/src/js/songselect.js
public/src/js/songselect.js
+4
-4
public/src/js/soundbuffer.js
public/src/js/soundbuffer.js
+3
-1
No files found.
public/src/js/songselect.js
View file @
1c92f3b3
...
@@ -3,7 +3,7 @@ function SongSelect(){
...
@@ -3,7 +3,7 @@ function SongSelect(){
var
_songs
;
var
_songs
;
var
_selectedSong
=
{
title
:
''
,
folder
:
''
,
difficulty
:
''
};
var
_selectedSong
=
{
title
:
''
,
folder
:
''
,
difficulty
:
''
};
var
_preview
;
var
_preview
;
var
_preview_
ended
var
_preview_
id
=
0
var
_diffNames
=
{
var
_diffNames
=
{
easy
:
"
かんたん
"
,
easy
:
"
かんたん
"
,
normal
:
"
ふつう
"
,
normal
:
"
ふつう
"
,
...
@@ -14,7 +14,7 @@ function SongSelect(){
...
@@ -14,7 +14,7 @@ function SongSelect(){
this
.
startPreview
=
function
(
id
,
prvtime
,
first_open
=
true
)
{
this
.
startPreview
=
function
(
id
,
prvtime
,
first_open
=
true
)
{
_this
.
endPreview
();
_this
.
endPreview
();
var
startLoad
=
+
new
Date
var
startLoad
=
+
new
Date
_preview_ended
=
false
var
current_id
=
_preview_id
if
(
first_open
){
if
(
first_open
){
snd
.
musicGain
.
fadeOut
(
0.4
)
snd
.
musicGain
.
fadeOut
(
0.4
)
}
}
...
@@ -30,7 +30,7 @@ function SongSelect(){
...
@@ -30,7 +30,7 @@ function SongSelect(){
this
.
previewLoaded
(
startLoad
,
prvtime
,
first_open
)
this
.
previewLoaded
(
startLoad
,
prvtime
,
first_open
)
}
else
{
}
else
{
snd
.
previewGain
.
load
(
"
/songs/
"
+
id
+
"
/main.mp3
"
).
then
(
sound
=>
{
snd
.
previewGain
.
load
(
"
/songs/
"
+
id
+
"
/main.mp3
"
).
then
(
sound
=>
{
if
(
!
_preview_ende
d
){
if
(
current_id
==
_preview_i
d
){
songObj
.
sound
=
sound
songObj
.
sound
=
sound
_preview
=
sound
_preview
=
sound
this
.
previewLoaded
(
startLoad
,
prvtime
,
first_open
)
this
.
previewLoaded
(
startLoad
,
prvtime
,
first_open
)
...
@@ -48,7 +48,7 @@ function SongSelect(){
...
@@ -48,7 +48,7 @@ function SongSelect(){
}
}
this
.
endPreview
=
function
()
{
this
.
endPreview
=
function
()
{
_preview_
ended
=
true
_preview_
id
++
if
(
_preview
)
{
if
(
_preview
)
{
_preview
.
stop
();
_preview
.
stop
();
};
};
...
...
public/src/js/soundbuffer.js
View file @
1c92f3b3
...
@@ -124,7 +124,9 @@ class Sound{
...
@@ -124,7 +124,9 @@ class Sound{
playLoop
(
time
,
absolute
,
seek1
,
seek2
,
until
){
playLoop
(
time
,
absolute
,
seek1
,
seek2
,
until
){
time
=
this
.
convertTime
(
time
,
absolute
)
time
=
this
.
convertTime
(
time
,
absolute
)
seek1
=
seek1
||
0
seek1
=
seek1
||
0
seek2
=
seek2
||
0
if
(
typeof
seek2
==
"
undefined
"
){
seek2
=
seek1
}
until
=
until
||
this
.
duration
until
=
until
||
this
.
duration
this
.
loop
=
{
this
.
loop
=
{
started
:
time
+
until
-
seek1
,
started
:
time
+
until
-
seek1
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment