diff options
Diffstat (limited to 'animism-align/frontend/app/views/viewer/player')
| -rw-r--r-- | animism-align/frontend/app/views/viewer/player/player.container.js | 10 | ||||
| -rw-r--r-- | animism-align/frontend/app/views/viewer/player/player.fullscreen.js | 2 |
2 files changed, 7 insertions, 5 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 9655955..cc9c401 100644 --- a/animism-align/frontend/app/views/viewer/player/player.container.js +++ b/animism-align/frontend/app/views/viewer/player/player.container.js @@ -10,7 +10,8 @@ import PlayerFullscreen from './player.fullscreen' class PlayerContainer extends Component { componentDidMount() { // console.log(this.props.sections) - actions.viewer.setCurrentSection(this.props.sections[0]) + const { sections } = this.props + actions.viewer.setCurrentSection(sections[0], sections[1]) } componentDidUpdate(prevProps) { @@ -25,17 +26,18 @@ class PlayerContainer extends Component { return } - const insideSection = sections.some(section => { + const insideSection = sections.some((section, i) => { if (floatInRange(section.start_ts, play_ts, section.end_ts)) { if (currentSection !== section) { - actions.viewer.setCurrentSection(section) + const nextSection = sections[i+1] + actions.viewer.setCurrentSection(section, nextSection) } return true } return false }) if (!insideSection) { - actions.viewer.setCurrentSection(sections[0]) + actions.viewer.setCurrentSection(sections[0], sections[1]) } } diff --git a/animism-align/frontend/app/views/viewer/player/player.fullscreen.js b/animism-align/frontend/app/views/viewer/player/player.fullscreen.js index 26219c4..a4acef9 100644 --- a/animism-align/frontend/app/views/viewer/player/player.fullscreen.js +++ b/animism-align/frontend/app/views/viewer/player/player.fullscreen.js @@ -69,7 +69,7 @@ class PlayerFullscreen extends Component { fadeOutDuration = 0 } const transitionDuration = (isEntering ? fadeInDuration : fadeOutDuration) + 'ms' - console.log(play_ts, isEntering, isLeaving, fadeInDuration, fadeOutDuration) + // console.log(play_ts, isEntering, isLeaving, fadeInDuration, fadeOutDuration) return ( <CSSTransition key={index} |
