From ef2a1037a418ad9fa35d6c60feba914d828d5b84 Mon Sep 17 00:00:00 2001
From: alyssaf16 <alyssa_feinberg@brown.edu>
Date: Sun, 29 Sep 2024 15:54:49 -0400
Subject: clean up

---
 src/client/views/nodes/AudioBox.tsx | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

(limited to 'src/client/views/nodes/AudioBox.tsx')

diff --git a/src/client/views/nodes/AudioBox.tsx b/src/client/views/nodes/AudioBox.tsx
index 63a126aec..8056ced1e 100644
--- a/src/client/views/nodes/AudioBox.tsx
+++ b/src/client/views/nodes/AudioBox.tsx
@@ -300,10 +300,29 @@ export class AudioBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
         console.log('RESPONSE: ' + response.data['transcription']);
     };
 
+    youtubeUpload = async () => {
+        console.log('Here');
+        const audio = {
+            file: 'Cd2ch4XV84s&t=373s',
+        };
+        const response = await axios.post('http://localhost:105/youtube/', audio, {
+            headers: {
+                'Content-Type': 'application/json',
+            },
+        });
+        console.log('RESPONSE: ' + response.data['transcription']);
+    };
+
     // context menu
     specificContextMenu = (): void => {
         const funcs: ContextMenuProps[] = [];
         // funcs.push({ description: 'Push info', event: this.pushInfo, icon: 'redo-alt' });
+
+        funcs.push({
+            description: 'Youtube',
+            event: this.youtubeUpload, // prettier-ignore
+            icon: 'expand-arrows-alt',
+        });
         funcs.push({
             description: (this.layoutDoc.hideAnchors ? "Don't hide" : 'Hide') + ' anchors',
             event: () => { this.layoutDoc.hideAnchors = !this.layoutDoc.hideAnchors; }, // prettier-ignore
-- 
cgit v1.2.3-70-g09d2

