diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-11-10 15:43:05 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-11-10 15:43:05 +0100 |
| commit | 7bfafb6f079aab435da01010362b1189645b2249 (patch) | |
| tree | 1de26e0b5106fc10356c4f79eb0bc7764a10a079 /animism-align/frontend/app/views/viewer/viewer.actions.js | |
| parent | f66dd644e228592cb72e03b44cb63df1ea27e5f2 (diff) | |
FIX the flicker between audio play and play event firing
Diffstat (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js')
| -rw-r--r-- | animism-align/frontend/app/views/viewer/viewer.actions.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js index 2ac4665..277cb21 100644 --- a/animism-align/frontend/app/views/viewer/viewer.actions.js +++ b/animism-align/frontend/app/views/viewer/viewer.actions.js @@ -227,7 +227,11 @@ export const makeFullscreenEvent = (index, annotation, currentSection) => { timelineLookup: {}, } if (annotation.settings.color) { - event.color = CURTAIN_COLOR_LOOKUP[annotation.settings.color] || CURTAIN_COLOR_LOOKUP.white + if (annotation.settings.color.name) { + event.color = annotation.settings.color + } else { + event.color = CURTAIN_COLOR_LOOKUP[annotation.settings.color] || CURTAIN_COLOR_LOOKUP.white + } } else { event.color = CURTAIN_COLOR_LOOKUP.white } @@ -236,7 +240,7 @@ export const makeFullscreenEvent = (index, annotation, currentSection) => { title: currentSection.title, index: currentSection.index, } - console.log(event.section) + // console.log(event.section) } return event } @@ -330,26 +334,26 @@ export const setCurrentSection = (currentSection, nextSection) => dispatch => { } export const seekToSection = section => dispatch => { - actions.viewer.setCurrentSection(section, getNextSection(section)) actions.audio.seek(section.start_ts) actions.audio.play() + actions.viewer.setCurrentSection(section, getNextSection(section)) actions.viewer.hideComponent('nav') actions.viewer.hideComponent('share') } export const seekToMediaItem = (section, mediaItem) => dispatch => { - actions.viewer.setCurrentSection(section, getNextSection(section)) actions.audio.seek(mediaItem.start_ts) actions.audio.play() + actions.viewer.setCurrentSection(section, getNextSection(section)) actions.viewer.hideComponent('nav') actions.viewer.hideComponent('checklist') actions.viewer.hideComponent('share') } export const seekToTimestamp = play_ts => dispatch => { - actions.viewer.setSectionFromTimestamp(play_ts) actions.audio.seek(play_ts) actions.audio.play() + actions.viewer.setSectionFromTimestamp(play_ts) } export const seekToBeginning = () => dispatch => { |
