Skip to content

Is it possible to get exact time when first frame is captured? #28

Description

@pie6k

Thank you for this amazing lib!

I record screen and mouse movement info at the same time. I later 'blend it' together, so I need to know the exact time when recording actually started to avoid video<>mouse-data time missmatch.

.startRecording() promise resolves when recording starts, but it can be delayed by multiple reasons, eg main thread being busy.

It would be great if .startRecording() would return promise with something like firstFrameTimestamp

const { firstFrameTimestamp } = await recorder.startRecording(options)

This way I would know exactly at which point in time actual visual recording starts.

Do you have any suggestions how can I do that (even if it requires some hacks)

Alternatives I tried:
I thought 'stopRecording' method is way more lightweight, so I can capture 'endTime' (either before or after calling stopRecording), then measure recording duration reading recording file and then doing startTime = endTime - videoDuration. It might be more precise, but it is still subject to delays.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions