Skip to content

Commit

Permalink
fix annotation display
Browse files Browse the repository at this point in the history
  • Loading branch information
younes200 committed Jan 17, 2023
1 parent 523778b commit ec0bbf4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@celluloid/client",
"version": "2.0.1-alpha-4",
"version": "2.0.1-alpha-6",
"author": "Erwan Queffélec <[email protected]",
"license": "MIT",
"proxy": "http://localhost:3001",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export default connect(

const [url, setUrl] = useState<string>("");


const controlsOpacity =
showControls || showHints ? classes.visible : classes.hidden;

Expand Down Expand Up @@ -261,7 +262,6 @@ export default connect(
{!showHints && (
<div
className={classes.annotationFrame}
onMouseMove={onUserAction}
>
<Grow appear={true} in={editing}>
<div>
Expand Down
19 changes: 9 additions & 10 deletions packages/client/src/scenes/Project/scenes/Video/VideoContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export default connect(

refreshPlayer() {
const { player } = this.state;

if (player) {
const annotations = this.props.annotations;
const focusedAnnotation = this.props.focusedAnnotation;
Expand All @@ -113,7 +112,7 @@ export default connect(
annotation.startTime >= position - 0.1 &&
annotation.startTime < position + 0.1
) {
// player.pauseVideo();
// player.pause();
this.setState({
playing: false,
});
Expand All @@ -130,6 +129,7 @@ export default connect(
if (shouldBlur) {
this.props.blurAnnotation();
}

if (!this.props.seeking) {
this.setState({
visibleAnnotations,
Expand Down Expand Up @@ -163,9 +163,9 @@ export default connect(
playing: false,
});
}
console.log("seekTo", value)
console.log("seekTo", value);
player.seekTo(value, "seconds");
this.props.requestSeek(value);
// this.props.requestSeek(value);
}
}

Expand All @@ -186,10 +186,10 @@ export default connect(
const onUserAction = this.resetFadeOutTimer.bind(this);

const onPlayerReady = (player: ReactPlayer) => {
console.log("onPlayerReady")
console.log("onPlayerReady");
this.refreshTimer = window.setInterval(
this.refreshPlayer.bind(this),
1000
500
);
this.setState({
player,
Expand All @@ -198,18 +198,17 @@ export default connect(
};

const onPlayerProgress = (state: PlayerProgressState) => {
console.log("onPlayerProgress")
this.setState({
position: state.playedSeconds,
});
};

const onDuration =(duration:number) => {
console.log("onDuration")
const onDuration = (duration: number) => {
console.log("onDuration");
this.setState({
duration,
});
}
};

const onPlayerStateChange = (event: PlayerEvent, data: number) => {
switch (event) {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

0 comments on commit ec0bbf4

Please sign in to comment.