aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/RecordingBox/RecordingBox.tsx
diff options
context:
space:
mode:
authorJenny Yu <jennyyu212@outlook.com>2022-04-28 16:01:49 -0400
committerJenny Yu <jennyyu212@outlook.com>2022-04-28 16:01:49 -0400
commit0a84982e2ea59d737f394bc79fa7f26a4bf29a80 (patch)
treead18d9abbe29692896f7f9df618e40379d3e0f4b /src/client/views/nodes/RecordingBox/RecordingBox.tsx
parent73ed47a8fbc6c4827c5d553e385396661d940787 (diff)
feat: uploading works
Diffstat (limited to 'src/client/views/nodes/RecordingBox/RecordingBox.tsx')
-rw-r--r--src/client/views/nodes/RecordingBox/RecordingBox.tsx14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/client/views/nodes/RecordingBox/RecordingBox.tsx b/src/client/views/nodes/RecordingBox/RecordingBox.tsx
index 4c7fdd278..6f9451925 100644
--- a/src/client/views/nodes/RecordingBox/RecordingBox.tsx
+++ b/src/client/views/nodes/RecordingBox/RecordingBox.tsx
@@ -22,6 +22,12 @@ export class RecordingBox extends ViewBoxBaseComponent() {
}
@observable result: Upload.FileInformation | undefined = undefined
+ @observable videoDuration: number | undefined = undefined
+
+ @action
+ setVideoDuration = (duration: number) => {
+ this.videoDuration = duration
+ }
@action
setResult = (info: Upload.FileInformation) => {
@@ -29,6 +35,9 @@ export class RecordingBox extends ViewBoxBaseComponent() {
this.result = info
console.log(this.result.accessPaths.agnostic.client)
this.dataDoc.type = DocumentType.VID;
+ console.log(this.videoDuration)
+ this.dataDoc[this.fieldKey + "-duration"] = this.videoDuration;
+
this.layoutDoc.layout = VideoBox.LayoutString(this.fieldKey);
this.dataDoc.nativeWidth = this.dataDoc.nativeHeight = undefined;
this.layoutDoc._fitWidth = undefined;
@@ -37,8 +46,9 @@ export class RecordingBox extends ViewBoxBaseComponent() {
render() {
return <div className="recordingBox" ref={this._ref}>
- {!this.result ? <RecordingView setResult={this.setResult} /> :
- <p>video box</p>}
+ {!this.result && <RecordingView setResult={this.setResult} setDuration={this.setVideoDuration} />}
+ {/* {!this.result ? <RecordingView setResult={this.setResult} /> :
+ <p>video box</p>} */}
</div>;
}
}