diff options
| author | mehekj <mehek.jethani@gmail.com> | 2023-01-13 18:11:34 -0500 |
|---|---|---|
| committer | mehekj <mehek.jethani@gmail.com> | 2023-01-13 18:11:34 -0500 |
| commit | 82de335e0643f907e44cb193c9b2c6da1b3cbaf1 (patch) | |
| tree | e72a74f8b18bfd1e9d6f7262a0fb5203d82b6921 /src/client/views/nodes/AudioBox.tsx | |
| parent | 73d3c63658c4bdf3268ea81a02eb96566869b855 (diff) | |
| parent | 6d32fe60ce32d650a2ba0d5eb8e36dccb591521f (diff) | |
Merge branch 'master' into schema-mehek
Diffstat (limited to 'src/client/views/nodes/AudioBox.tsx')
| -rw-r--r-- | src/client/views/nodes/AudioBox.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/nodes/AudioBox.tsx b/src/client/views/nodes/AudioBox.tsx index f96be9eef..a5b5ea664 100644 --- a/src/client/views/nodes/AudioBox.tsx +++ b/src/client/views/nodes/AudioBox.tsx @@ -71,6 +71,12 @@ export class AudioBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp @observable _muted: boolean = false; @observable _paused: boolean = false; // is recording paused // @observable rawDuration: number = 0; // computed from the length of the audio element when loaded + + constructor(props: any) { + super(props); + this.props.setContentView?.(this); + } + @computed get recordingStart() { return DateCast(this.dataDoc[this.fieldKey + '-recordingStart'])?.date.getTime(); } @@ -112,8 +118,6 @@ export class AudioBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp @action componentDidMount() { - this.props.setContentView?.(this); // this tells the DocumentView that this AudioBox is the "content" of the document. this allows the DocumentView to indirectly call getAnchor() on the AudioBox when making a link. - if (this.path) { this.mediaState = media_state.Paused; this.setPlayheadTime(NumCast(this.layoutDoc.clipStart)); |
