aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes')
-rw-r--r--src/client/views/nodes/ScreenshotBox.tsx3
-rw-r--r--src/client/views/nodes/VideoBox.tsx9
2 files changed, 8 insertions, 4 deletions
diff --git a/src/client/views/nodes/ScreenshotBox.tsx b/src/client/views/nodes/ScreenshotBox.tsx
index ec97a11e4..dba730d12 100644
--- a/src/client/views/nodes/ScreenshotBox.tsx
+++ b/src/client/views/nodes/ScreenshotBox.tsx
@@ -58,6 +58,9 @@ export class ScreenshotBox extends ViewBoxAnnotatableComponent<FieldViewProps, S
}
}
+ componentDidMount() {
+ this.props.setContentView?.(this); // this tells the DocumentView that this ScreenshotBox is the "content" of the document. this allows the DocumentView to indirectly call getAnchor() on the AudioBox when making a link.
+ }
componentWillUnmount() {
const ind = DocUtils.ActiveRecordings.indexOf(this);
ind !== -1 && (DocUtils.ActiveRecordings.splice(ind, 1));
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx
index 9b14ca390..5a60f9312 100644
--- a/src/client/views/nodes/VideoBox.tsx
+++ b/src/client/views/nodes/VideoBox.tsx
@@ -320,12 +320,13 @@ export class VideoBox extends ViewBoxAnnotatableComponent<FieldViewProps, VideoD
onPause={() => this.Pause()}
onClick={e => e.preventDefault()}>
<source src={field.url.href} type="video/mp4" />
- Not supported.
+ Not supported.
</video>
- <audio ref={this.setAudioRef} className={`audiobox-control${this.active() ? "-interactive" : ""}`}>
- <source src={this.audiopath} type="audio/mpeg" />
+ {!this.audiopath ? (null) :
+ <audio ref={this.setAudioRef} className={`audiobox-control${this.active() ? "-interactive" : ""}`}>
+ <source src={this.audiopath} type="audio/mpeg" />
Not supported.
- </audio>;
+ </audio>}
</div>
</div>;
}