hook up transcribe option

This commit is contained in:
j 2025-01-24 19:59:56 +05:30
commit 4cde39b182
2 changed files with 8 additions and 3 deletions

View file

@ -307,7 +307,7 @@ Ox.AnnotationPanel = function(options, self) {
{id: 'export', title: Ox._('Export Annotations...'), disabled: !self.options.enableExport}, {id: 'export', title: Ox._('Export Annotations...'), disabled: !self.options.enableExport},
].concat( ].concat(
self.options.enableTranscribe ? [ 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') { } else if (data.id == 'showentityinfo') {
that.triggerEvent('showentityinfo', annotation.entity); that.triggerEvent('showentityinfo', annotation.entity);
} else if (data.id == 'transcribe') { } else if (data.id == 'transcribeaudio') {
that.triggerEvent('transcribe'); that.triggerEvent('transcribeaudio');
} else if (data.id == 'undo') { } else if (data.id == 'undo') {
// ... // ...
} }

View file

@ -67,6 +67,7 @@ Ox.VideoAnnotationPanel = function(options, self) {
enableDownload: false, enableDownload: false,
enableImport: false, enableImport: false,
enableExport: false, enableExport: false,
enableTranscribe: false,
enableSetPosterFrame: false, enableSetPosterFrame: false,
enableSubtitles: false, enableSubtitles: false,
find: '', find: '',
@ -849,6 +850,7 @@ Ox.VideoAnnotationPanel = function(options, self) {
editable: true, editable: true,
enableExport: self.options.enableExport, enableExport: self.options.enableExport,
enableImport: self.options.enableImport, enableImport: self.options.enableImport,
enableTranscribe: self.options.enableTranscribe,
highlight: self.options.find, highlight: self.options.find,
highlightAnnotations: self.options.annotationsHighlight, highlightAnnotations: self.options.annotationsHighlight,
highlightLayer: self.options.findLayer, highlightLayer: self.options.findLayer,
@ -951,6 +953,9 @@ Ox.VideoAnnotationPanel = function(options, self) {
that.triggerEvent('showentityinfo', data); that.triggerEvent('showentityinfo', data);
}, },
submit: submitAnnotation, submit: submitAnnotation,
transcribeaudio: function() {
that.triggerEvent('transcribeaudio');
},
toggle: toggleAnnotations, toggle: toggleAnnotations,
togglecalendar: function(data) { togglecalendar: function(data) {
self.options.showAnnotationsCalendar = !data.collapsed; self.options.showAnnotationsCalendar = !data.collapsed;