Skip to content
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

Pause media recorder when waiting to load during playback #192

Closed
clabe45 opened this issue Jan 9, 2023 · 0 comments
Closed

Pause media recorder when waiting to load during playback #192

clabe45 opened this issue Jan 9, 2023 · 0 comments
Assignees
Labels
help wanted Extra attention is needed priority:high type:bug Something isn't working

Comments

@clabe45
Copy link
Collaborator

clabe45 commented Jan 9, 2023

When recording a movie with Video or Audio layers, it is possible for the <video> and <audio> elements to buffer during playback. The movie currently waits to start recording until _whenReady resolves, which prevents buffering in the beginning of the recording but not in the middle. If the movie's ready property becomes false during playback, _render keeps noop-looping until it is ready. We need to pause the MediaRecorder object that record uses when this occurs.

Relevant Movie methods:

  • _whenReady resolves when all its layers' and effects' whenReady methods resolve (i.e. when Movie#ready is true)
  • _render renders every layer, and repeats the next frame using requestAnimationFrame
  • record calls _render after the movie is ready
@clabe45 clabe45 added type:bug Something isn't working help wanted Extra attention is needed priority:high labels Jan 9, 2023
@clabe45 clabe45 closed this as completed in b46da40 Apr 9, 2023
@clabe45 clabe45 self-assigned this Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed priority:high type:bug Something isn't working
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant