summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/viewer.actions.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-10-14 15:26:55 +0200
committerJules Laplace <julescarbon@gmail.com>2020-10-14 15:26:55 +0200
commit38fd1460b6de1a72b1345c5f23ea688c54f14689 (patch)
treee0b74a696d19616ef31d0fc05e1f4a51056ce6ed /animism-align/frontend/app/views/viewer/viewer.actions.js
parent7ed7efb524e7984e8e1ca0da77a882412a748174 (diff)
option to loop video
Diffstat (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js')
-rw-r--r--animism-align/frontend/app/views/viewer/viewer.actions.js10
1 files changed, 7 insertions, 3 deletions
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 })
}