diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-11-18 19:09:29 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-11-18 19:09:29 +0100 |
| commit | 4237c423cafea47ab11a593d5f150692a6b23d93 (patch) | |
| tree | 711aed5756ade952ac5dbf3fdd4a5764b23dcbb9 /animism-align/frontend/app/utils/annotation.utils.js | |
| parent | 062543e4fd5a25bb41a116e9510407a23ca70c64 (diff) | |
clicking the nav bar jumps to that point
Diffstat (limited to 'animism-align/frontend/app/utils/annotation.utils.js')
| -rw-r--r-- | animism-align/frontend/app/utils/annotation.utils.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/animism-align/frontend/app/utils/annotation.utils.js b/animism-align/frontend/app/utils/annotation.utils.js index 3afd096..ca088c4 100644 --- a/animism-align/frontend/app/utils/annotation.utils.js +++ b/animism-align/frontend/app/utils/annotation.utils.js @@ -113,6 +113,10 @@ export const sectionProgressPercentage = (section, play_ts) => { return (Math.round(sectionProgress(section, play_ts) * 2000) / 20) + '%' } +export const sectionOffsetSeconds = (section, percent) => { + return (section.start_ts + section.duration * percent) +} + export const makeMediaItems = (media, types) => { const { lookup, order } = media if (types instanceof String) { |
