-
Notifications
You must be signed in to change notification settings - Fork 0
limelight-recorder #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| useEffect(() => { | ||
| fetch("http://localhost:5000/") | ||
| .then((res) => res.text()) |
Check failure
Code scanning / ESLint
Require any function or method that returns a Promise to be marked async Error
| fetch("http://localhost:5000/") | ||
| .then((res) => res.text()) | ||
| .then(setMessage) | ||
| .catch((e) => { |
Check failure
Code scanning / ESLint
Enforce typing arguments in Promise rejection callbacks as `unknown` Error
| const interval = setInterval(async () => { | ||
| try { | ||
| const res = await fetch("http://localhost:4590/"); | ||
| const text = await res.text(); | ||
| setMessage(text); | ||
| setRobotOnline(text.includes("Welcome")); | ||
| } catch { | ||
| setRobotOnline(false); | ||
| } | ||
| }, 2000); |
Check failure
Code scanning / ESLint
Disallow Promises in places not designed to handle them Error
|
|
||
| const app = express(); | ||
| const port = 5000; | ||
| app.use(cors()); |
Check warning
Code scanning / ESLint
Disallow calling a value with type `any` Warning
| import "./App.css"; | ||
| import LimelightTable from "./LimelightTable"; | ||
|
|
||
| function App() { |
Check warning
Code scanning / ESLint
Require explicit return and argument types on exported functions' and classes' public class methods Warning
| import './index.css' | ||
| import App from './App' | ||
|
|
||
| createRoot(document.getElementById('root')!).render( |
Check warning
Code scanning / ESLint
Disallow non-null assertions using the `!` postfix operator Warning
| import './index.css' | ||
| import App from './App' | ||
|
|
||
| createRoot(document.getElementById('root')!).render( |
Check warning
Code scanning / ESLint
Disallow non-null assertions using the `!` postfix operator Warning
YoniKiriaty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
| function createSessionFolder(): string { | ||
| if (!fs.existsSync(USB_ROOT)) { | ||
| throw new Error("USB drive not connected"); | ||
| } | ||
|
|
||
| const timestamp = new Date().toISOString().replace(/[:.]/g, "-"); | ||
| const sessionDir = path.join(USB_ROOT, `recording-${timestamp}`); | ||
|
|
||
| fs.mkdirSync(sessionDir, { recursive: true }); | ||
| return sessionDir; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider moving this too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that goes with the whole finding where to save videos thing
| class RecordingProcess { | ||
| public ffmpegProcess: ChildProcess | null = null; | ||
| public cameraUrl: string; | ||
| public outputFile: string; | ||
|
|
||
| // --- CONSTRUCTOR --- | ||
| public constructor(cameraUrl: string, outputFile: string) { | ||
| const time: Date = new Date(); | ||
| this.outputFile = outputFile | ||
| + "/timestamp_" | ||
| + time.getHours() | ||
| + ":" | ||
| + time.getMinutes() | ||
| + ".mp4"; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use classes if u can (backed by yoni)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't
No description provided.