Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Explorable-Podcast-Proof-of-Concept
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
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
ℹ️❤️🖥
Explorable-Podcast-Proof-of-Concept
Commits
2202251c
Commit
2202251c
authored
Jan 14, 2018
by
i❤computers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent bottom wipe from flickering on dull
parent
92578dc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
script.js
script.js
+9
-4
No files found.
script.js
View file @
2202251c
...
...
@@ -2,17 +2,22 @@
document
.
addEventListener
(
'
DOMContentLoaded
'
,
function
initializePage
()
{
var
audio
=
document
.
getElementById
(
'
excerpt
'
);
var
MAX_TRANSITION_TIME
=
0.4
;
//make sure transition time matches in index.html's styling
// Ideally these transitions are applied directly to html
var
MAX_TRANSITION_TIME
=
0.4
;
//make sure transition time matches in index.html's styling
cuesTrack
.
forEach
(
function
setShortTransitionTimes
(
cue
,
index
)
{
if
(
index
+
1
===
cuesTrack
.
length
)
{
return
;
}
var
cueDuration
=
cuesTrack
[
index
+
1
].
startTime
-
cue
.
startTime
;
if
(
cueDuration
<
MAX_TRANSITION_TIME
)
{
$
(
cuePositionSelector
(
cue
.
cuePositionName
)).
forEach
(
function
(
cueElement
)
{
cueElement
.
style
.
transitionDuration
=
cueDuration
+
"
s
"
;
});
$
(
cuePositionSelector
(
cue
.
cuePositionName
))
.
filter
(
function
applyOnlyToTextToPreventGlitch
(
cueElement
)
{
return
cueElement
.
tagName
.
toLowerCase
()
===
"
span
"
;
})
.
forEach
(
function
setShortTransitionTimes
(
cueElement
)
{
cueElement
.
style
.
transitionDuration
=
cueDuration
+
"
s
"
;
});
}
});
...
...
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