diff options
| -rw-r--r-- | animism-align/frontend/app/utils/transcript.utils.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/animism-align/frontend/app/utils/transcript.utils.js b/animism-align/frontend/app/utils/transcript.utils.js index a8f889c..445a255 100644 --- a/animism-align/frontend/app/utils/transcript.utils.js +++ b/animism-align/frontend/app/utils/transcript.utils.js @@ -5,6 +5,7 @@ import { INLINE_UTILITY_ANNOTATION_TYPES, FULLSCREEN_UTILITY_ANNOTATION_TYPES, } from 'app/constants' +import { timestampToSeconds } from 'app/utils' export const buildParagraphs = (annotationOrder, sectionCount, footnoteCount) => { const state = store.getState() @@ -95,7 +96,9 @@ export const buildParagraphs = (annotationOrder, sectionCount, footnoteCount) => annotation.footnote_id = footnoteCount } // set annotation start point to the start of the previous sentence - if (currentParagraph.annotations[currentParagraph.annotations.length - 1]) { + if (annotation.settings.actual_ts) { + annotation.start_ts = timestampToSeconds(annotation.settings.actual_ts) + } else if (currentParagraph.annotations[currentParagraph.annotations.length - 1]) { annotation.start_ts = currentParagraph.annotations[currentParagraph.annotations.length - 1].start_ts } footnotes.push(annotation) |
