aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionVideoView.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-07-30 13:43:39 -0400
committerbob <bcz@cs.brown.edu>2019-07-30 13:43:39 -0400
commit2d0c2f56c5160f2796e5dfff31e391d5e64a806f (patch)
tree58f2716aa11f7dcf85d3495dd9805ed6b7e0ece0 /src/client/views/collections/CollectionVideoView.tsx
parent23ba38a9a6ae60f98a72b517fb3a470491da2540 (diff)
parent937af0cd2b2c01e7971c1edf120567ee15a4d5b9 (diff)
Merge branch 'youtube-api-muhammed'
Diffstat (limited to 'src/client/views/collections/CollectionVideoView.tsx')
-rw-r--r--src/client/views/collections/CollectionVideoView.tsx24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionVideoView.tsx b/src/client/views/collections/CollectionVideoView.tsx
index a264cc402..5185d9d0e 100644
--- a/src/client/views/collections/CollectionVideoView.tsx
+++ b/src/client/views/collections/CollectionVideoView.tsx
@@ -9,6 +9,7 @@ import "./CollectionVideoView.scss";
import React = require("react");
import { InkingControl } from "../InkingControl";
import { InkTool } from "../../../new_fields/InkField";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
@observer
@@ -21,18 +22,20 @@ export class CollectionVideoView extends React.Component<FieldViewProps> {
private get uIButtons() {
let scaling = Math.min(1.8, this.props.ScreenToLocalTransform().Scale);
let curTime = NumCast(this.props.Document.curPage);
- return ([<div className="collectionVideoView-time" key="time" onPointerDown={this.onResetDown} style={{ transform: `scale(${scaling}, ${scaling})` }}>
+ return ([<div className="collectionVideoView-time" key="time" onPointerDown={this.onResetDown} style={{ transform: `scale(${scaling})` }}>
<span>{"" + Math.round(curTime)}</span>
<span style={{ fontSize: 8 }}>{" " + Math.round((curTime - Math.trunc(curTime)) * 100)}</span>
</div>,
+ <div className="collectionVideoView-snapshot" key="time" onPointerDown={this.onSnapshot} style={{ transform: `scale(${scaling})` }}>
+ <FontAwesomeIcon icon="camera" size="lg" />
+ </div>,
VideoBox._showControls ? (null) : [
- <div className="collectionVideoView-play" key="play" onPointerDown={this.onPlayDown} style={{ transform: `scale(${scaling}, ${scaling})` }}>
- {this._videoBox && this._videoBox.Playing ? "\"" : ">"}
+ <div className="collectionVideoView-play" key="play" onPointerDown={this.onPlayDown} style={{ transform: `scale(${scaling})` }}>
+ <FontAwesomeIcon icon={this._videoBox && this._videoBox.Playing ? "pause" : "play"} size="lg" />
</div>,
- <div className="collectionVideoView-full" key="full" onPointerDown={this.onFullDown} style={{ transform: `scale(${scaling}, ${scaling})` }}>
+ <div className="collectionVideoView-full" key="full" onPointerDown={this.onFullDown} style={{ transform: `scale(${scaling})` }}>
F
- </div>
-
+ </div>
]]);
}
@@ -56,6 +59,15 @@ export class CollectionVideoView extends React.Component<FieldViewProps> {
}
}
+ @action
+ onSnapshot = (e: React.PointerEvent) => {
+ if (this._videoBox) {
+ this._videoBox.Snapshot();
+ e.stopPropagation();
+ e.preventDefault();
+ }
+ }
+
_isclick = 0;
@action
onResetDown = (e: React.PointerEvent) => {