From 2db75c958876dca7e301ea387180342fc11d25a6 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 19 Nov 2020 16:35:06 +0100 Subject: implement audio volume fades within the skeleton dance video --- .../annotationForms/annotationForm.video.js | 25 ++++++++++++++++++++++ .../annotations/annotationForms/index.js | 2 ++ .../annotationTypes/annotationTypes.video.js | 17 +++++++++++++++ .../annotations/annotationTypes/index.js | 2 ++ 4 files changed, 46 insertions(+) (limited to 'animism-align/frontend/app/views/align/components/annotations') diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js index 56bb4ab..a947e2a 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js @@ -125,3 +125,28 @@ export const AnnotationFormVideo = ({ annotation, media, handleSettingsSelect, h ) } + +export const AnnotationFormVideoSetVolume = ({ annotation, handleSettingsChange }) => { + return ( +
+ + +
+ ) +} \ No newline at end of file diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/index.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/index.js index 7b95332..8a1be48 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/index.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/index.js @@ -7,6 +7,7 @@ import { import { AnnotationFormVideo, + AnnotationFormVideoSetVolume, } from './annotationForm.video' import { @@ -31,6 +32,7 @@ export const annotationFormLookup = { image: AnnotationFormImage, video: AnnotationFormVideo, + video_set_volume: AnnotationFormVideoSetVolume, gallery: AnnotationFormGallery, carousel: AnnotationFormGallery, diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationTypes/annotationTypes.video.js b/animism-align/frontend/app/views/align/components/annotations/annotationTypes/annotationTypes.video.js index 4533a5d..4ea9595 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotationTypes/annotationTypes.video.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotationTypes/annotationTypes.video.js @@ -32,3 +32,20 @@ export const AnnotationVideo = ({ y, annotation, media, timeline, selected, onCl ) } + +export const AnnotationVideoSetVolume = ({ y, annotation, timeline, selected, onClick, onDoubleClick }) => { + const className = selected ? 'annotation utility video_set_volume selected' : 'annotation utility video_set_volume' + let style = { + top: y, + } + return ( +
onClick(e, annotation)} + onDoubleClick={e => onDoubleClick(e, annotation)} + > + Set volume to {annotation.settings.volume} +
+ ) +} diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationTypes/index.js b/animism-align/frontend/app/views/align/components/annotations/annotationTypes/index.js index 8fddee3..1a89dbd 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotationTypes/index.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotationTypes/index.js @@ -12,6 +12,7 @@ import { import { AnnotationVideo, + AnnotationVideoSetVolume, } from './annotationTypes.video' import { @@ -40,6 +41,7 @@ export const AnnotationElementLookup = { subtitle: React.memo(AnnotationSubtitle), video: React.memo(AnnotationVideo), + video_set_volume: React.memo(AnnotationVideoSetVolume), image: React.memo(AnnotationImage), gallery: React.memo(AnnotationGallery), -- cgit v1.2.3-70-g09d2