From 4cde39b1825e91f62236dff3fc5fdb159c41bf6a Mon Sep 17 00:00:00 2001 From: j Date: Fri, 24 Jan 2025 19:59:56 +0530 Subject: [PATCH] hook up transcribe option --- source/UI/js/Video/AnnotationPanel.js | 6 +++--- source/UI/js/Video/VideoAnnotationPanel.js | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/UI/js/Video/AnnotationPanel.js b/source/UI/js/Video/AnnotationPanel.js index 1677697f..658dc9f4 100644 --- a/source/UI/js/Video/AnnotationPanel.js +++ b/source/UI/js/Video/AnnotationPanel.js @@ -307,7 +307,7 @@ Ox.AnnotationPanel = function(options, self) { {id: 'export', title: Ox._('Export Annotations...'), disabled: !self.options.enableExport}, ].concat( self.options.enableTranscribe ? [ - {id: 'transcribe', title: Ox._('Transcribe Audio...')}, + {id: 'transcribeaudio', title: Ox._('Transcribe Audio...')}, ]: [] ) ), @@ -357,8 +357,8 @@ Ox.AnnotationPanel = function(options, self) { // ... } else if (data.id == 'showentityinfo') { that.triggerEvent('showentityinfo', annotation.entity); - } else if (data.id == 'transcribe') { - that.triggerEvent('transcribe'); + } else if (data.id == 'transcribeaudio') { + that.triggerEvent('transcribeaudio'); } else if (data.id == 'undo') { // ... } diff --git a/source/UI/js/Video/VideoAnnotationPanel.js b/source/UI/js/Video/VideoAnnotationPanel.js index 08585a7c..64e00a7c 100644 --- a/source/UI/js/Video/VideoAnnotationPanel.js +++ b/source/UI/js/Video/VideoAnnotationPanel.js @@ -67,6 +67,7 @@ Ox.VideoAnnotationPanel = function(options, self) { enableDownload: false, enableImport: false, enableExport: false, + enableTranscribe: false, enableSetPosterFrame: false, enableSubtitles: false, find: '', @@ -849,6 +850,7 @@ Ox.VideoAnnotationPanel = function(options, self) { editable: true, enableExport: self.options.enableExport, enableImport: self.options.enableImport, + enableTranscribe: self.options.enableTranscribe, highlight: self.options.find, highlightAnnotations: self.options.annotationsHighlight, highlightLayer: self.options.findLayer, @@ -951,6 +953,9 @@ Ox.VideoAnnotationPanel = function(options, self) { that.triggerEvent('showentityinfo', data); }, submit: submitAnnotation, + transcribeaudio: function() { + that.triggerEvent('transcribeaudio'); + }, toggle: toggleAnnotations, togglecalendar: function(data) { self.options.showAnnotationsCalendar = !data.collapsed;