diff options
Diffstat (limited to 'animism-align/frontend/app')
| -rw-r--r-- | animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js | 12 | ||||
| -rw-r--r-- | animism-align/frontend/app/views/viewer/player/player.transcript.js | 10 |
2 files changed, 20 insertions, 2 deletions
diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js index a4d952d..28f7e79 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import { CURTAIN_COLOR_SELECT_OPTIONS } from 'app/constants' -import { Select, Checkbox } from 'app/common' +import { Select, Checkbox, TextInput } from 'app/common' import { AnnotationFormFullscreen } from './annotationForm.utility' export const AnnotationFormImage = ({ annotation, media, handleSettingsSelect, handleSettingsChange }) => { @@ -55,6 +55,16 @@ export const AnnotationFormImage = ({ annotation, media, handleSettingsSelect, h onChange={handleSettingsSelect} /> + <TextInput + title="Override start time" + name="override_start_ts" + className="number" + placeholder="0:00" + data={annotation.settings} + onChange={handleSettingsChange} + autoComplete="off" + /> + {(annotation.settings.fullscreen && !annotation.settings.inline) && ( <AnnotationFormFullscreen annotation={annotation} diff --git a/animism-align/frontend/app/views/viewer/player/player.transcript.js b/animism-align/frontend/app/views/viewer/player/player.transcript.js index 9048227..0d0a636 100644 --- a/animism-align/frontend/app/views/viewer/player/player.transcript.js +++ b/animism-align/frontend/app/views/viewer/player/player.transcript.js @@ -4,6 +4,7 @@ import React, { Component } from 'react' import { connect } from 'react-redux' import actions from 'app/actions' +import { timestampToSeconds } from 'app/utils' import ParagraphList from 'app/views/paragraph/components/paragraph.list' import { inlineComponents } from './components.inline' @@ -29,7 +30,14 @@ class PlayerTranscript extends Component { handleAnnotationClick(e, paragraph, annotation) { // console.log(annotation) - actions.audio.seek(paragraph.start_ts) + if (annotation.settings.override_start_ts) { + const ts = timestampToSeconds(annotation.settings.override_start_ts) + if (ts) { + actions.audio.seek(ts) + } + } else { + actions.audio.seek(paragraph.start_ts) + } actions.audio.play() } |
