diff options
Diffstat (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js')
| -rw-r--r-- | animism-align/frontend/app/views/viewer/viewer.actions.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js index fa63804..82d3cf1 100644 --- a/animism-align/frontend/app/views/viewer/viewer.actions.js +++ b/animism-align/frontend/app/views/viewer/viewer.actions.js @@ -192,8 +192,13 @@ export const loadSections = () => dispatch => { // currentSection.fullscreenTimeline.unshift(initial_curtain_event) } - if (currentSection.fullscreenTimeline.length && currentSection.fullscreenTimeline[0].type === 'curtain' && currentSection.media.length) { - currentSection.fullscreenTimeline[0].mediaItem = currentSection.media[0].media + if (currentSection.fullscreenTimeline.length && currentSection.fullscreenTimeline[0].type === 'curtain') { + if (currentSection.cover_id) { + currentSection.fullscreenTimeline[0].mediaItem = mediaLookup[currentSection.cover_id] + } else if (currentSection.media.length) { + currentSection.fullscreenTimeline[0].mediaItem = currentSection.media[0].media + } + currentSection.fullscreenTimeline[0].cover_style = currentSection.cover_style } currentSection.duration = currentSection.end_ts - currentSection.start_ts currentSection.inlineParagraphCount = currentSection.paragraphs.filter(p => !p.hidden).length @@ -209,6 +214,8 @@ const newSection = (annotation, index, mediaIndex) => ({ start_ts: annotation.start_ts, end_ts: 0, title: annotation.text, + cover_id: annotation.settings.media_id || 0, + cover_style: annotation.settings.cover_style || "cover", media: [], fullscreenTimeline: [], index, |
