aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/AudioBox.tsx
diff options
context:
space:
mode:
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);
});