diff options
Diffstat (limited to 'animism-align/frontend')
| -rw-r--r-- | animism-align/frontend/app/views/viewer/nav/viewer.router.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/animism-align/frontend/app/views/viewer/nav/viewer.router.js b/animism-align/frontend/app/views/viewer/nav/viewer.router.js index e602f4d..53a1f54 100644 --- a/animism-align/frontend/app/views/viewer/nav/viewer.router.js +++ b/animism-align/frontend/app/views/viewer/nav/viewer.router.js @@ -13,9 +13,13 @@ class ViewerRouter extends Component { // console.log(this.props.match.params.component) const { component } = this.props.match.params if (component.match('section_')) { - const sectionIndex = parseInt(component.split('_')[1]) + const sectionParts = component.split('_') + const sectionIndex = parseInt(sectionParts[1]) actions.viewer.seekToSection(getSection(sectionIndex)) - actions.audio.play() + const seek_ts = timestampToSeconds(sectionParts[2]) + if (seek_ts) { + actions.audio.jump(seek_ts) + } return } switch (this.props.match.params.component) { @@ -58,7 +62,7 @@ class ViewerRouter extends Component { actions.viewer.seekToTimestamp(timestampToSeconds('44:39')) break case 'book': - actions.viewer.seekToTimestamp(timestampToSeconds('15:00 ')) + actions.viewer.seekToTimestamp(timestampToSeconds('15:00')) break case 'end': break |
