From fe515fa4bc940183ba9253e67461c1f009a5d94b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 26 Aug 2020 22:28:13 +0200 Subject: times and stuff on the section nav --- animism-align/frontend/app/views/viewer/viewer.actions.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js') diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js index 097f01b..f5f0630 100644 --- a/animism-align/frontend/app/views/viewer/viewer.actions.js +++ b/animism-align/frontend/app/views/viewer/viewer.actions.js @@ -18,6 +18,8 @@ const newSection = (annotation, index, mediaIndex) => ({ media: [], index, mediaIndex, + no_audio: !!annotation.settings.no_audio, + section_nav_color: annotation.settings.section_nav_color || 'white', }) // build the list of sections from the raw annotation list. @@ -125,7 +127,7 @@ export const loadSections = () => dispatch => { if (currentSection) { currentSection.mediaLabels = Object.keys(currentMediaLabels).sort().join(', ') currentSection.paragraphs = buildParagraphs(sectionTextAnnotationOrder, currentSection.index) - currentSection.end_ts = timeline.duration + currentSection.duration = timeline.duration } // set the end_ts for each section (i.e. just before the next section starts) @@ -134,6 +136,7 @@ export const loadSections = () => dispatch => { if (currentSection.end_ts === 0) { currentSection.end_ts = sections[i+1].start_ts - 1 } + currentSection.duration = currentSection.end_ts - currentSection.start_ts } // console.log(sections) -- cgit v1.2.3-70-g09d2