diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-10-14 18:17:50 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-10-14 18:17:50 +0200 |
| commit | 606cf200f49a7015a2e189f80ab380b57f767363 (patch) | |
| tree | 208c3ddfcf485503a303a6ec6c6a5633a59fc51e /animism-align/frontend/app/views/viewer | |
| parent | 2d7af61fb12160e65bc373f1597a61f15da8d4ae (diff) | |
making sure audio is loaded before we start
Diffstat (limited to 'animism-align/frontend/app/views/viewer')
3 files changed, 7 insertions, 9 deletions
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 <div /> } + const { currentSection } = this.props + if (!currentSection) { return <div /> } // console.log(currentSection) return ( <div className='viewer-container'> - {viewer.credits - ? <PlayerCredits /> - : <PlayerTranscript section={currentSection} /> - } + <PlayerTranscript section={currentSection} /> <PlayerFullscreen /> </div> ) 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 <div className='viewer loading'><Loader /></div> } let className = 'viewer' - if (viewer.checklist) { + if (viewer.checklist || viewer.credits) { className += ' checklist-open' } else { if (viewer.transcript) className += ' transcript-open' |
