Skip to content

Commit

Permalink
specify fps in captureStream
Browse files Browse the repository at this point in the history
  • Loading branch information
interim17 committed Nov 15, 2023
1 parent ae96db8 commit 58e9e89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/simularium/StreamRecorder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ class Recorder {
try {
// returns a media stream captured from the viewer canvas
// more details here: https://developer.chrome.com/en/articles/webcodecs/
const stream = this.canvasEl.captureStream();

// fixed at 30 fps for now
const fps = 30;
const stream = this.canvasEl.captureStream(fps);
const track = stream.getVideoTracks()[0];
// MediaStreamTrackProcessor makes the captured stream readable
this.trackProcessor = new MediaStreamTrackProcessor(track);
Expand Down

0 comments on commit 58e9e89

Please sign in to comment.