Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
biglittlebigben committed Jan 1, 2025
1 parent 127e330 commit 503d59c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion template-default/src/Room.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@ function CompositeTemplate({ layout: initialLayout }: CompositeTemplateProps) {
onlySubscribed: true,
});

EgressHelper.setRoom(room);

useEffect(() => {
// determines when to start recording
// the algorithm used is:
// * if there are video tracks published, wait for frames to be decoded
// * if there are no video tracks published, start immediately
// * if it's been more than 10s, record as long as there are tracks subscribed
const startTime = Date.now();
EgressHelper.setRoom(room);
const interval = setInterval(async () => {
let shouldStartRecording = false;
let hasVideoTracks = false;
Expand Down

0 comments on commit 503d59c

Please sign in to comment.