diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-08-26 22:28:13 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-08-26 22:28:13 +0200 |
| commit | fe515fa4bc940183ba9253e67461c1f009a5d94b (patch) | |
| tree | 040f816ac41d2ce4f13b4c653929bb70fc9a2cfe /animism-align/frontend/app/views/viewer/viewer.actions.js | |
| parent | 14c8fd88b99dbab731c50f7285f7d799f17f86ff (diff) | |
times and stuff on the section nav
Diffstat (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js')
| -rw-r--r-- | animism-align/frontend/app/views/viewer/viewer.actions.js | 5 |
1 files changed, 4 insertions, 1 deletions
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) |
