aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/AudioBox.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-10-23 11:45:08 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-10-23 11:45:08 -0400
commit86e985ef3a96d9849799e436d2158fef0b2b7f94 (patch)
tree959dd162554ac2692611c7ddc8a5ea42ec0f780e /src/client/views/nodes/AudioBox.tsx
parent3c8d5d0a53d03d570fd57789ecf43121eb814b0f (diff)
added scrubbing from text notes
Diffstat (limited to 'src/client/views/nodes/AudioBox.tsx')
-rw-r--r--src/client/views/nodes/AudioBox.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/AudioBox.tsx b/src/client/views/nodes/AudioBox.tsx
index 135874400..e9a11c9b6 100644
--- a/src/client/views/nodes/AudioBox.tsx
+++ b/src/client/views/nodes/AudioBox.tsx
@@ -45,7 +45,8 @@ export class AudioBox extends DocExtendableComponent<FieldViewProps, AudioDocume
_lastUpdate = 0;
@observable private _audioState: "unrecorded" | "recording" | "recorded" = "unrecorded";
- @observable public static ScrubTime = 0;
+ @observable private static _scrubTime = 0;
+ public static SetScrubTime = action((timeInMillisFrom1970: number) => AudioBox._scrubTime = timeInMillisFrom1970);
public static ActiveRecordings: Doc[] = [];
componentDidMount() {
@@ -64,7 +65,7 @@ export class AudioBox extends DocExtendableComponent<FieldViewProps, AudioDocume
let sel = selected.length ? selected[0].props.Document : undefined;
this.Document.playOnSelect && sel && !Doc.AreProtosEqual(sel, this.props.Document) && this.playFrom(DateCast(sel.creationTime).date.getTime());
});
- this._scrubbingDisposer = reaction(() => AudioBox.ScrubTime, timeInMillisecondsFrom1970 => {
+ this._scrubbingDisposer = reaction(() => AudioBox._scrubTime, timeInMillisecondsFrom1970 => {
let start = this.extensionDoc && DateCast(this.extensionDoc.recordingStart);
start && this.playFrom((timeInMillisecondsFrom1970 - start.date.getTime()) / 1000);
});