Skip to content

fix(core): keep the video on screen while playback waits for another clip - #8849

Open
robinebers wants to merge 1 commit into
heygen-com:mainfrom
robinebers:pr/hold-keeps-video
Open

robinebers wants to merge 1 commit into
heygen-com:mainfrom
robinebers:pr/hold-keeps-video

Conversation

@robinebers

Copy link
Copy Markdown
Contributor

When the film holds for a clip that has no data yet (the music, say), the runtime reloads the other clips that have already played. For a video that means writing its src again, which drops the decoded frame. The picture goes black for as long as the hold lasts.

The fix is one line in reloadPlayedClipsForHold: skip video elements. Audio clips are reloaded as before.

There's a new test in init.buffering.test.ts: the film holds for the music while a video that has played is on screen, and the video's src is never written again. Without the line the test sees two src writes.

Refines the hold from #8138.

…ture stays

While the film holds for a clip that has no data, the runtime reloads the other
clips on screen that have played, so their unread bytes stop competing for the
connection. That included videos: writing a video's src again drops the frame
it decoded, so the picture went black until it decoded again.

The reload now skips video elements; audio clips still reload, as before.

To reproduce: a composition with background music and a video that has played;
when the music runs out of data, the video's src is written twice and its
picture goes black for the length of the hold.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant