From 606cf200f49a7015a2e189f80ab380b57f767363 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 14 Oct 2020 18:17:50 +0200 Subject: making sure audio is loaded before we start --- .../frontend/app/views/viewer/player/player.container.js | 9 +++------ animism-align/frontend/app/views/viewer/viewer.actions.js | 5 +++-- animism-align/frontend/app/views/viewer/viewer.container.js | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'animism-align/frontend/app/views/viewer') diff --git a/animism-align/frontend/app/views/viewer/player/player.container.js b/animism-align/frontend/app/views/viewer/player/player.container.js index ef76aa7..afb6a40 100644 --- a/animism-align/frontend/app/views/viewer/player/player.container.js +++ b/animism-align/frontend/app/views/viewer/player/player.container.js @@ -89,15 +89,12 @@ class PlayerContainer extends Component { render() { // const { } = this.props - const { currentSection, viewer } = this.props - if (!currentSection && !viewer.credits) { return
} + const { currentSection } = this.props + if (!currentSection) { return
} // console.log(currentSection) return (
- {viewer.credits - ? - : - } +
) diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js index 16a3d8f..6894b3a 100644 --- a/animism-align/frontend/app/views/viewer/viewer.actions.js +++ b/animism-align/frontend/app/views/viewer/viewer.actions.js @@ -22,7 +22,7 @@ export const loadSections = () => dispatch => { let sections = [] // current section being processed (i.e. last section) - let currentSection + let currentSection, sectionColor // keep tally of all media, so that we can display them with correct IDs in the checklist let mediaIndex = 0 @@ -159,12 +159,13 @@ export const loadSections = () => dispatch => { } if ((!currentSection.fullscreenTimeline.length || time_to_first_fullscreen_element > 0.0) && currentSection.index !== 0) { // here we should create a dummy curtain event + sectionColor = currentSection.paragraphs[0].annotations[0].settings.color || 'white' initial_curtain_event = makeFullscreenEvent(0, { start_ts: currentSection.start_ts, end_ts: currentSection.start_ts + 1.1, type: 'curtain', settings: { - color: CURTAIN_COLOR_LOOKUP.white, // TODO: get this from the first annotation + color: CURTAIN_COLOR_LOOKUP[sectionColor], fade_in_duration: '0.0', fade_out_duration: '1.0', duration: '1.0', diff --git a/animism-align/frontend/app/views/viewer/viewer.container.js b/animism-align/frontend/app/views/viewer/viewer.container.js index c26f513..6395a68 100644 --- a/animism-align/frontend/app/views/viewer/viewer.container.js +++ b/animism-align/frontend/app/views/viewer/viewer.container.js @@ -37,7 +37,7 @@ class ViewerContainer extends Component { return
} let className = 'viewer' - if (viewer.checklist) { + if (viewer.checklist || viewer.credits) { className += ' checklist-open' } else { if (viewer.transcript) className += ' transcript-open' -- cgit v1.2.3-70-g09d2