Skip to content

Commit

Permalink
pass down trajTitle for filename
Browse files Browse the repository at this point in the history
  • Loading branch information
interim17 committed Nov 15, 2023
1 parent 3b8fa9b commit ae96db8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 55 deletions.
52 changes: 0 additions & 52 deletions examples/DownloadComponent.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion examples/VideoRecorder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const VideoRecorder = ({ trajectoryTitle }: VideoRecorderProps) => {
if (canvasEl) {
recorderRef.current = new Recorder(canvasEl, trajectoryTitle);
}
}, []);
}, [trajectoryTitle]);

const startRecording = async () => {
if (recorderRef.current) {
Expand Down
3 changes: 1 addition & 2 deletions examples/Viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -637,11 +637,10 @@ class Viewer extends React.Component<InputParams, ViewerState> {
}

public getTrajectoryTitle = (): string => {
console.log("getTrajectoryTitle", this.state.trajectoryTitle);
if (this.state.trajectoryTitle) {
return this.state.trajectoryTitle;
} else {
return "simulation_recording";
return "simulation_movie";
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/simularium/StreamRecorder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ class Recorder {
} else {
// if recording and the queue is not full, encode the frame and then close it
// encoder is passing chunks to muxer
// don't entirely understand the use of keyFrames
// this is from the docs and will make the resulting video larger but also scrubbable
// can optimize/alter these parameters?
this.frameCounter++;
const keyFrame = this.frameCounter % 150 === 0;
this.encoder.encode(frame, { keyFrame });
Expand Down

0 comments on commit ae96db8

Please sign in to comment.