From 9819886735988e448d09a292b3369e19f4a79a61 Mon Sep 17 00:00:00 2001
From: mehekj <mehek.jethani@gmail.com>
Date: Mon, 20 Jun 2022 18:42:04 -0400
Subject: Revert "Revert "Merge branch 'master' into temporalmedia-mehek""

This reverts commit 3415f672292bb349c7d9ec66564933a746ee3b25.
---
 .../views/nodes/RecordingBox/ProgressBar.tsx       | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 src/client/views/nodes/RecordingBox/ProgressBar.tsx

(limited to 'src/client/views/nodes/RecordingBox/ProgressBar.tsx')

diff --git a/src/client/views/nodes/RecordingBox/ProgressBar.tsx b/src/client/views/nodes/RecordingBox/ProgressBar.tsx
new file mode 100644
index 000000000..82d5e1f04
--- /dev/null
+++ b/src/client/views/nodes/RecordingBox/ProgressBar.tsx
@@ -0,0 +1,45 @@
+import * as React from 'react';
+import { useEffect } from "react"
+import "./ProgressBar.scss"
+
+interface ProgressBarProps {
+      progress: number,
+      marks: number[],
+}
+
+export function ProgressBar(props: ProgressBarProps) {
+
+      // const handleClick = (e: React.MouseEvent) => {
+      //       let progressbar = document.getElementById('progressbar')!
+      //       let bounds = progressbar!.getBoundingClientRect();
+      //       let x = e.clientX - bounds.left;
+      //       let percent = x / progressbar.clientWidth * 100
+
+      //       for (let i = 0; i < props.marks.length; i++) {
+      //             let start = i == 0 ? 0 : props.marks[i-1];
+      //             if (percent > start && percent < props.marks[i]) {
+      //                   props.playSegment(i)
+      //                   // console.log(i)
+      //                   // console.log(percent)
+      //                   // console.log(props.marks[i])
+      //                   break
+      //             }
+      //       }
+      // }
+
+      return (
+            <div className="progressbar" id="progressbar">
+                  <div
+                        className="progressbar done"
+                        style={{ width: `${props.progress}%` }}
+                  // onClick={handleClick}
+                  ></div>
+                  {props.marks.map((mark) => {
+                        return <div
+                              className="progressbar mark"
+                              style={{ width: `${mark}%` }}
+                        ></div>
+                  })}
+            </div>
+      )
+}
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

