diff options
| author | bobzel <zzzman@gmail.com> | 2022-03-22 11:32:47 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-03-22 11:32:47 -0400 |
| commit | 810f86195188503b04d64f9d58ea4dfc3a639398 (patch) | |
| tree | 2e0f252147dd65f36069426df4fe5369423427dc /src/client/views/nodes/AudioBox.tsx | |
| parent | 0885f2b6ea10bdc54f587040ea8e6dc90ef5b0f3 (diff) | |
fixed temporal media merge that had reverted a lot of things.
Diffstat (limited to 'src/client/views/nodes/AudioBox.tsx')
| -rw-r--r-- | src/client/views/nodes/AudioBox.tsx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/nodes/AudioBox.tsx b/src/client/views/nodes/AudioBox.tsx index f5de31fcb..be18cc1de 100644 --- a/src/client/views/nodes/AudioBox.tsx +++ b/src/client/views/nodes/AudioBox.tsx @@ -42,9 +42,6 @@ declare class MediaRecorder { constructor(e: any); // whatever MediaRecorder has } -type AudioDocument = makeInterface<[typeof documentSchema]>; -const AudioDocument = makeInterface(documentSchema); - enum media_state { PendingRecording = "pendingRecording", Recording = "recording", @@ -54,7 +51,7 @@ enum media_state { @observer -export class AudioBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps & FieldViewProps, AudioDocument>(AudioDocument) { +export class AudioBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps & FieldViewProps>() { public static LayoutString(fieldKey: string) { return FieldView.LayoutString(AudioBox, fieldKey); } public static Enabled = false; @@ -240,7 +237,9 @@ export class AudioBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp this.dataDoc[this.fieldKey + "-recordingStart"] = new DateField(); DocUtils.ActiveRecordings.push(this); this._recorder.ondataavailable = async (e: any) => { + console.log("Data available", e); const [{ result }] = await Networking.UploadFilesToServer(e.data); + console.log("Data result", result); if (!(result instanceof Error)) { this.props.Document[this.fieldKey] = new AudioField(result.accessPaths.agnostic.client); } @@ -660,4 +659,4 @@ export class AudioBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp {!this.path ? this.recordingControls : this.playbackControls} </div>; } -}
\ No newline at end of file +} |
