From 38fd1460b6de1a72b1345c5f23ea688c54f14689 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 14 Oct 2020 15:26:55 +0200 Subject: option to loop video --- animism-align/frontend/app/views/viewer/viewer.actions.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (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 d63ced5..3800623 100644 --- a/animism-align/frontend/app/views/viewer/viewer.actions.js +++ b/animism-align/frontend/app/views/viewer/viewer.actions.js @@ -137,15 +137,15 @@ export const loadSections = () => dispatch => { if (currentSection) { currentSection.mediaLabels = Object.keys(currentMediaLabels).sort().join(', ') currentSection.paragraphs = buildParagraphs(sectionTextAnnotationOrder, currentSection.index) - currentSection.duration = timeline.duration + currentSection.end_ts = timeline.duration } let time_to_first_fullscreen_element, initial_curtain_event // last fixes on the sections - for (let i = 0; i < sections.length - 1; i++) { + for (let i = 0; i < sections.length; i++) { currentSection = sections[i] // set the end_ts for each section (i.e. just before the next section starts) - if (currentSection.end_ts === 0) { + if (currentSection.end_ts === 0 && i < sections.length - 1) { currentSection.end_ts = sections[i+1].start_ts - 1 } // if the first fullscreen event is close to the beginning of the section, move it there @@ -206,6 +206,8 @@ const makeFullscreenEvent = (index, annotation) => { } if (annotation.settings.color) { event.color = CURTAIN_COLOR_LOOKUP[annotation.settings.color] || CURTAIN_COLOR_LOOKUP.white + } else { + event.color = CURTAIN_COLOR_LOOKUP.white } return event } @@ -351,6 +353,8 @@ export const vitrineGo = direction => dispatch => { } } +/* growl */ + export const openGrowl = message => dispatch => { dispatch({ type: types.viewer.open_growl, message }) } -- cgit v1.2.3-70-g09d2